dtolnay / dtolnay/trybuild

Warnings on pass tests get reported twice

Open
#175 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
998
Forks
84
PR merge metrics
No merged PRs in 30d

Description

```rust
// src/lib.rs

pub struct Thing;
```

```rust
// tests/compiletest.rs

#[test]
fn ui() {
let t = trybuild::TestCases::new();
t.pass("tests/ui/test.rs");
}
```

```rust
// tests/ui/test.rs

use repro::Thing;

fn main() {}
```

```console
$ cargo test

running 1 test

test tests/ui/test.rs ... ok

WARNINGS:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
warning: unused import: `repro::Thing`
--> tests/ui/test.rs:1:5
|
1 | use repro::Thing;
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default

warning: 1 warning emitted
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

STDERR:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
warning: unused import: `repro::Thing`
--> /git/repro/tests/ui/test.rs:1:5
|
1 | use repro::Thing;
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

test ui ... ok
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.