Skip to content

Commit

Permalink
Update failing ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 12, 2023
1 parent ac4ea52 commit 7b0fa08
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/ui/imports/issue-99695-b.fixed
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// run-rustfix
#![allow(unused, nonstandard_style)]
#![allow(unused, nonstandard_style, useless_anonymous_reexport)]
mod m {

mod p {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/imports/issue-99695-b.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// run-rustfix
#![allow(unused, nonstandard_style)]
#![allow(unused, nonstandard_style, useless_anonymous_reexport)]
mod m {

mod p {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/imports/issue-99695.fixed
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// run-rustfix
#![allow(unused, nonstandard_style)]
#![allow(unused, nonstandard_style, useless_anonymous_reexport)]
mod m {
#[macro_export]
macro_rules! nu {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/imports/issue-99695.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// run-rustfix
#![allow(unused, nonstandard_style)]
#![allow(unused, nonstandard_style, useless_anonymous_reexport)]
mod m {
#[macro_export]
macro_rules! nu {
Expand Down
5 changes: 5 additions & 0 deletions tests/ui/lint/anonymous-reexport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _;
37 changes: 36 additions & 1 deletion tests/ui/lint/anonymous-reexport.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
|
Expand All @@ -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

0 comments on commit 7b0fa08

Please sign in to comment.