File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1414extern crate to_reuse_functions;
1515
1616mod to_reuse {
17- # [attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
1817 # [attr = MustUse]
1918 # [attr = Cold]
2019 fn foo(x: usize) -> usize { x }
2423 fn bar(x: usize) -> usize { x }
2524}
2625
26+ # [attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
2727# [attr = MustUse]
2828# [attr = Inline(Hint)]
2929fn foo1(arg0: _) -> _ { to_reuse::foo(self + 1) }
3030
31+ # [attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
32+ # [attr = MustUse {reason: "some reason"}]
33+ # [attr = Inline(Hint)]
34+ fn foo2(arg0: _) -> _ { to_reuse::foo(self + 1) }
35+
3136# [attr = Inline(Hint)]
3237fn bar(arg0: _) -> _ { to_reuse::bar(arg0) }
3338
4045 -> _ { to_reuse_functions::extern_fn_extern() }
4146# [attr = Inline(Hint)]
4247const fn const_fn_extern() -> _ { to_reuse_functions::const_fn_extern() }
43- # [attr = MustUse]
48+ # [attr = MustUse {reason: "some reason"} ]
4449# [attr = Inline(Hint)]
4550async fn async_fn_extern() -> _ { to_reuse_functions::async_fn_extern() }
4651
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ extern crate to_reuse_functions;
1212mod to_reuse {
1313 #[ must_use]
1414 #[ cold]
15- #[ deprecated]
1615 pub fn foo ( x : usize ) -> usize {
1716 x
1817 }
@@ -24,15 +23,23 @@ mod to_reuse {
2423 }
2524}
2625
26+ #[ deprecated]
2727reuse to_reuse:: foo as foo1 {
2828 self + 1
2929}
3030
31+ #[ deprecated]
32+ #[ must_use = "some reason" ]
33+ reuse to_reuse:: foo as foo2 {
34+ self + 1
35+ }
36+
3137reuse to_reuse:: bar;
3238
3339reuse to_reuse_functions:: unsafe_fn_extern;
3440reuse to_reuse_functions:: extern_fn_extern;
3541reuse to_reuse_functions:: const_fn_extern;
42+ #[ must_use = "some reason" ]
3643reuse to_reuse_functions:: async_fn_extern;
3744
3845
You can’t perform that action at this time.
0 commit comments