1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![feature(deprecated)]
13 #[deprecated(since = "1.0.0", note = "text")]
14 pub fn deprecated() {}
15 #[deprecated(since = "1.0.0", note = "text")]
16 pub fn deprecated_text() {}
18 pub struct MethodTester
;
21 #[deprecated(since = "1.0.0", note = "text")]
22 pub fn method_deprecated(&self) {}
23 #[deprecated(since = "1.0.0", note = "text")]
24 pub fn method_deprecated_text(&self) {}
28 #[deprecated(since = "1.0.0", note = "text")]
29 fn trait_deprecated(&self) {}
30 #[deprecated(since = "1.0.0", note = "text")]
31 fn trait_deprecated_text(&self) {}
34 #[deprecated(since = "1.0.0", note = "text")]
35 pub trait DeprecatedTrait { fn dummy(&self) { }
}
37 impl Trait
for MethodTester {}
39 #[deprecated(since = "1.0.0", note = "text")]
40 pub struct DeprecatedStruct
{
44 #[deprecated(since = "1.0.0", note = "text")]
45 pub struct DeprecatedUnitStruct
;
48 #[deprecated(since = "1.0.0", note = "text")]
52 #[deprecated(since = "1.0.0", note = "text")]
53 pub struct DeprecatedTupleStruct(pub isize);
56 #[deprecated(since = "1.0.0", note = "text")]
57 pub struct DeprecatedStruct
{
61 #[deprecated(since = "1.0.0", note = "text")]
62 pub struct DeprecatedUnitStruct
;
65 #[deprecated(since = "1.0.0", note = "text")]
69 #[deprecated(since = "1.0.0", note = "text")]
70 pub struct DeprecatedTupleStruct(pub isize);
74 #[deprecated(since = "1.0.0", note = "text")]
78 pub struct Stable2(pub u8, pub u8, #[deprecated(since = "1.0.0", note = "text")] pub u8);
80 #[deprecated(since = "1.0.0", note = "text")]
81 pub struct Deprecated
{
85 #[deprecated(since = "1.0.0", note = "text")]
86 pub struct Deprecated2(pub u8,
90 #[deprecated(since = "1.0.0", note = "text")]
91 pub mod deprecated_mod
{
92 pub fn deprecated() {}
96 macro_rules
! macro_test
{
101 macro_rules
! macro_test_arg
{
102 ($func
:expr
) => ($func
);
106 macro_rules
! macro_test_arg_nested
{
107 ($func
:ident
) => (macro_test_arg
!($
func()));