diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-03-12 15:23:32 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-03-12 16:38:54 +0100 |
| commit | 7b0fa085b093be4cca285441703d91caa216e4dc (patch) | |
| tree | dfc5aa6682f3146dde12f9af20da7bb6210709cb | |
| parent | ac4ea529801ed087041768f1708637cc8277db49 (diff) | |
| download | rust-7b0fa085b093be4cca285441703d91caa216e4dc.tar.gz rust-7b0fa085b093be4cca285441703d91caa216e4dc.zip | |
Update failing ui tests
| -rw-r--r-- | tests/ui/imports/issue-99695-b.fixed | 2 | ||||
| -rw-r--r-- | tests/ui/imports/issue-99695-b.rs | 2 | ||||
| -rw-r--r-- | tests/ui/imports/issue-99695.fixed | 2 | ||||
| -rw-r--r-- | tests/ui/imports/issue-99695.rs | 2 | ||||
| -rw-r--r-- | tests/ui/lint/anonymous-reexport.rs | 5 | ||||
| -rw-r--r-- | tests/ui/lint/anonymous-reexport.stderr | 37 |
6 files changed, 45 insertions, 5 deletions
diff --git a/tests/ui/imports/issue-99695-b.fixed b/tests/ui/imports/issue-99695-b.fixed index 0e60c73b67a..0f688fa2823 100644 --- a/tests/ui/imports/issue-99695-b.fixed +++ b/tests/ui/imports/issue-99695-b.fixed @@ -1,5 +1,5 @@ // run-rustfix -#![allow(unused, nonstandard_style)] +#![allow(unused, nonstandard_style, useless_anonymous_reexport)] mod m { mod p { diff --git a/tests/ui/imports/issue-99695-b.rs b/tests/ui/imports/issue-99695-b.rs index 031443a1f5d..b433997e53f 100644 --- a/tests/ui/imports/issue-99695-b.rs +++ b/tests/ui/imports/issue-99695-b.rs @@ -1,5 +1,5 @@ // run-rustfix -#![allow(unused, nonstandard_style)] +#![allow(unused, nonstandard_style, useless_anonymous_reexport)] mod m { mod p { diff --git a/tests/ui/imports/issue-99695.fixed b/tests/ui/imports/issue-99695.fixed index 6bf228b23aa..17ff409324e 100644 --- a/tests/ui/imports/issue-99695.fixed +++ b/tests/ui/imports/issue-99695.fixed @@ -1,5 +1,5 @@ // run-rustfix -#![allow(unused, nonstandard_style)] +#![allow(unused, nonstandard_style, useless_anonymous_reexport)] mod m { #[macro_export] macro_rules! nu { diff --git a/tests/ui/imports/issue-99695.rs b/tests/ui/imports/issue-99695.rs index f7199f1497a..b8979bcb734 100644 --- a/tests/ui/imports/issue-99695.rs +++ b/tests/ui/imports/issue-99695.rs @@ -1,5 +1,5 @@ // run-rustfix -#![allow(unused, nonstandard_style)] +#![allow(unused, nonstandard_style, useless_anonymous_reexport)] mod m { #[macro_export] macro_rules! nu { diff --git a/tests/ui/lint/anonymous-reexport.rs b/tests/ui/lint/anonymous-reexport.rs index 380e7792bdd..5d56ae6f969 100644 --- a/tests/ui/lint/anonymous-reexport.rs +++ b/tests/ui/lint/anonymous-reexport.rs @@ -12,5 +12,10 @@ pub use self::my_mod::Foo as _; pub use self::my_mod::TyFoo as _; pub use self::my_mod::Bar as _; //~ ERROR pub use self::my_mod::TyBar as _; //~ ERROR +pub use self::my_mod::{Bar as _}; //~ ERROR +pub use self::my_mod::{Bar as _, Foo as _}; //~ ERROR +pub use self::my_mod::{Bar as _, TyBar as _}; +//~^ ERROR +//~| ERROR #[allow(unused_imports)] use self::my_mod::TyBar as _; diff --git a/tests/ui/lint/anonymous-reexport.stderr b/tests/ui/lint/anonymous-reexport.stderr index fafa855e5fa..f4f8b41c417 100644 --- a/tests/ui/lint/anonymous-reexport.stderr +++ b/tests/ui/lint/anonymous-reexport.stderr @@ -4,6 +4,7 @@ error: useless anonymous re-export LL | pub use self::my_mod::Bar as _; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: only anonymous re-exports of traits are useful, this is a `struct` note: the lint level is defined here --> $DIR/anonymous-reexport.rs:1:9 | @@ -15,6 +16,40 @@ error: useless anonymous re-export | LL | pub use self::my_mod::TyBar as _; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: only anonymous re-exports of traits are useful, this is a `type alias` + +error: useless anonymous re-export + --> $DIR/anonymous-reexport.rs:15:24 + | +LL | pub use self::my_mod::{Bar as _}; + | ^^^^^^^^ + | + = note: only anonymous re-exports of traits are useful, this is a `struct` + +error: useless anonymous re-export + --> $DIR/anonymous-reexport.rs:16:24 + | +LL | pub use self::my_mod::{Bar as _, Foo as _}; + | ^^^^^^^^ + | + = note: only anonymous re-exports of traits are useful, this is a `struct` + +error: useless anonymous re-export + --> $DIR/anonymous-reexport.rs:17:24 + | +LL | pub use self::my_mod::{Bar as _, TyBar as _}; + | ^^^^^^^^ + | + = note: only anonymous re-exports of traits are useful, this is a `struct` + +error: useless anonymous re-export + --> $DIR/anonymous-reexport.rs:17:34 + | +LL | pub use self::my_mod::{Bar as _, TyBar as _}; + | ^^^^^^^^^^ + | + = note: only anonymous re-exports of traits are useful, this is a `type alias` -error: aborting due to 2 previous errors +error: aborting due to 6 previous errors |
