fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
488 B28 linesraw
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
10struct Foo;
11
12impl 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
24fn main() {
25    let foo = Foo;
26
27    foo.replacement(); //~ ERROR use of deprecated
28}