Skip to content

Commit

Permalink
Merge #[deprecated] on use test with existing `deprecation-sanity…
Browse files Browse the repository at this point in the history
…` UI test
  • Loading branch information
kailan committed Oct 22, 2024
1 parent 12a833a commit ca664bb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 32 deletions.
10 changes: 0 additions & 10 deletions tests/ui/deprecation/deprecated_use.fixed

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/deprecation/deprecated_use.rs

This file was deleted.

10 changes: 0 additions & 10 deletions tests/ui/deprecation/deprecated_use.stderr

This file was deleted.

7 changes: 7 additions & 0 deletions tests/ui/deprecation/deprecation-sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ impl Default for X {
}
}

mod inner {
pub struct Y;
}

#[deprecated] //~ ERROR this `#[deprecated]` annotation has no effect
pub use inner::Y;

fn main() { }
8 changes: 7 additions & 1 deletion tests/ui/deprecation/deprecation-sanity.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ LL | #[deprecated = "hello"]
|
= note: `#[deny(useless_deprecated)]` on by default

error: aborting due to 10 previous errors
error: this `#[deprecated]` annotation has no effect
--> $DIR/deprecation-sanity.rs:46:1
|
LL | #[deprecated]
| ^^^^^^^^^^^^^ help: remove the unnecessary deprecation attribute

error: aborting due to 11 previous errors

Some errors have detailed explanations: E0538, E0539, E0541, E0565.
For more information about an error, try `rustc --explain E0538`.

0 comments on commit ca664bb

Please sign in to comment.