Skip to content

Commit ca664bb

Browse files
committed
Merge #[deprecated] on use test with existing deprecation-sanity UI test
1 parent 12a833a commit ca664bb

File tree

5 files changed

+14
-32
lines changed

5 files changed

+14
-32
lines changed

tests/ui/deprecation/deprecated_use.fixed

-10
This file was deleted.

tests/ui/deprecation/deprecated_use.rs

-11
This file was deleted.

tests/ui/deprecation/deprecated_use.stderr

-10
This file was deleted.

tests/ui/deprecation/deprecation-sanity.rs

+7
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,11 @@ impl Default for X {
3939
}
4040
}
4141

42+
mod inner {
43+
pub struct Y;
44+
}
45+
46+
#[deprecated] //~ ERROR this `#[deprecated]` annotation has no effect
47+
pub use inner::Y;
48+
4249
fn main() { }

tests/ui/deprecation/deprecation-sanity.stderr

+7-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ LL | #[deprecated = "hello"]
6868
|
6969
= note: `#[deny(useless_deprecated)]` on by default
7070

71-
error: aborting due to 10 previous errors
71+
error: this `#[deprecated]` annotation has no effect
72+
--> $DIR/deprecation-sanity.rs:46:1
73+
|
74+
LL | #[deprecated]
75+
| ^^^^^^^^^^^^^ help: remove the unnecessary deprecation attribute
76+
77+
error: aborting due to 11 previous errors
7278

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

0 commit comments

Comments
 (0)