Skip to content

Commit 7b0fa08

Browse files
Update failing ui tests
1 parent ac4ea52 commit 7b0fa08

6 files changed

+45
-5
lines changed

tests/ui/imports/issue-99695-b.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![allow(unused, nonstandard_style)]
2+
#![allow(unused, nonstandard_style, useless_anonymous_reexport)]
33
mod m {
44

55
mod p {

tests/ui/imports/issue-99695-b.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![allow(unused, nonstandard_style)]
2+
#![allow(unused, nonstandard_style, useless_anonymous_reexport)]
33
mod m {
44

55
mod p {

tests/ui/imports/issue-99695.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![allow(unused, nonstandard_style)]
2+
#![allow(unused, nonstandard_style, useless_anonymous_reexport)]
33
mod m {
44
#[macro_export]
55
macro_rules! nu {

tests/ui/imports/issue-99695.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![allow(unused, nonstandard_style)]
2+
#![allow(unused, nonstandard_style, useless_anonymous_reexport)]
33
mod m {
44
#[macro_export]
55
macro_rules! nu {

tests/ui/lint/anonymous-reexport.rs

+5
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@ pub use self::my_mod::Foo as _;
1212
pub use self::my_mod::TyFoo as _;
1313
pub use self::my_mod::Bar as _; //~ ERROR
1414
pub use self::my_mod::TyBar as _; //~ ERROR
15+
pub use self::my_mod::{Bar as _}; //~ ERROR
16+
pub use self::my_mod::{Bar as _, Foo as _}; //~ ERROR
17+
pub use self::my_mod::{Bar as _, TyBar as _};
18+
//~^ ERROR
19+
//~| ERROR
1520
#[allow(unused_imports)]
1621
use self::my_mod::TyBar as _;

tests/ui/lint/anonymous-reexport.stderr

+36-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ error: useless anonymous re-export
44
LL | pub use self::my_mod::Bar as _;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7+
= note: only anonymous re-exports of traits are useful, this is a `struct`
78
note: the lint level is defined here
89
--> $DIR/anonymous-reexport.rs:1:9
910
|
@@ -15,6 +16,40 @@ error: useless anonymous re-export
1516
|
1617
LL | pub use self::my_mod::TyBar as _;
1718
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19+
|
20+
= note: only anonymous re-exports of traits are useful, this is a `type alias`
21+
22+
error: useless anonymous re-export
23+
--> $DIR/anonymous-reexport.rs:15:24
24+
|
25+
LL | pub use self::my_mod::{Bar as _};
26+
| ^^^^^^^^
27+
|
28+
= note: only anonymous re-exports of traits are useful, this is a `struct`
29+
30+
error: useless anonymous re-export
31+
--> $DIR/anonymous-reexport.rs:16:24
32+
|
33+
LL | pub use self::my_mod::{Bar as _, Foo as _};
34+
| ^^^^^^^^
35+
|
36+
= note: only anonymous re-exports of traits are useful, this is a `struct`
37+
38+
error: useless anonymous re-export
39+
--> $DIR/anonymous-reexport.rs:17:24
40+
|
41+
LL | pub use self::my_mod::{Bar as _, TyBar as _};
42+
| ^^^^^^^^
43+
|
44+
= note: only anonymous re-exports of traits are useful, this is a `struct`
45+
46+
error: useless anonymous re-export
47+
--> $DIR/anonymous-reexport.rs:17:34
48+
|
49+
LL | pub use self::my_mod::{Bar as _, TyBar as _};
50+
| ^^^^^^^^^^
51+
|
52+
= note: only anonymous re-exports of traits are useful, this is a `type alias`
1853

19-
error: aborting due to 2 previous errors
54+
error: aborting due to 6 previous errors
2055

0 commit comments

Comments
 (0)