Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings on pass tests get reported twice #175

Open
dtolnay opened this issue Jun 4, 2022 · 0 comments
Open

Warnings on pass tests get reported twice #175

dtolnay opened this issue Jun 4, 2022 · 0 comments

Comments

@dtolnay
Copy link
Owner

dtolnay commented Jun 4, 2022

// src/lib.rs

pub struct Thing;
// tests/compiletest.rs

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

use repro::Thing;

fn main() {}
$ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant