]> git.lizzy.rs Git - rust.git/blob - src/test/ui/deprecation/suggestion.fixed
Cache expansion hash.
[rust.git] / src / test / ui / deprecation / suggestion.fixed
1 // run-rustfix
2
3 #![feature(staged_api)]
4
5 #![stable(since = "1.0.0", feature = "test")]
6
7 #![deny(deprecated)]
8 #![allow(dead_code)]
9
10 struct Foo;
11
12 impl Foo {
13     #[rustc_deprecated(
14         since = "1.0.0",
15         reason = "replaced by `replacement`",
16         suggestion = "replacement",
17     )]
18     #[stable(since = "1.0.0", feature = "test")]
19     fn deprecated(&self) {}
20
21     fn replacement(&self) {}
22 }
23
24 fn main() {
25     let foo = Foo;
26
27     foo.replacement(); //~ ERROR use of deprecated
28 }