2016-04-26 12:51:14 -05:00
|
|
|
#![crate_name="lint_stability"]
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
#![feature(staged_api)]
|
2016-06-11 10:47:47 -05:00
|
|
|
#![feature(associated_type_defaults)]
|
2016-04-26 12:51:14 -05:00
|
|
|
#![stable(feature = "lint_stability", since = "1.0.0")]
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn deprecated() {}
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn deprecated_text() {}
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "99.99.99", note = "text")]
|
2018-06-21 08:37:35 -05:00
|
|
|
pub fn deprecated_future() {}
|
|
|
|
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn deprecated_unstable() {}
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn deprecated_unstable_text() {}
|
|
|
|
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn unstable() {}
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn unstable_text() {}
|
|
|
|
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub fn stable() {}
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub fn stable_text() {}
|
|
|
|
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub struct MethodTester;
|
|
|
|
|
|
|
|
impl MethodTester {
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn method_deprecated(&self) {}
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn method_deprecated_text(&self) {}
|
|
|
|
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn method_deprecated_unstable(&self) {}
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn method_deprecated_unstable_text(&self) {}
|
|
|
|
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn method_unstable(&self) {}
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub fn method_unstable_text(&self) {}
|
|
|
|
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub fn method_stable(&self) {}
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub fn method_stable_text(&self) {}
|
|
|
|
}
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub trait Trait {
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
fn trait_deprecated(&self) {}
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
fn trait_deprecated_text(&self) {}
|
|
|
|
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
fn trait_deprecated_unstable(&self) {}
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
fn trait_deprecated_unstable_text(&self) {}
|
|
|
|
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
fn trait_unstable(&self) {}
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
fn trait_unstable_text(&self) {}
|
|
|
|
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
fn trait_stable(&self) {}
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
fn trait_stable_text(&self) {}
|
|
|
|
}
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2016-06-11 10:47:47 -05:00
|
|
|
pub trait TraitWithAssociatedTypes {
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-06-11 10:47:47 -05:00
|
|
|
type TypeUnstable = u8;
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-06-11 10:47:47 -05:00
|
|
|
type TypeDeprecated = u8;
|
|
|
|
}
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2016-04-26 12:51:14 -05:00
|
|
|
impl Trait for MethodTester {}
|
|
|
|
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub trait UnstableTrait { fn dummy(&self) { } }
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub trait DeprecatedTrait {
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")] fn dummy(&self) { }
|
2016-04-26 12:51:14 -05:00
|
|
|
}
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub struct DeprecatedStruct {
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
2016-04-26 12:51:14 -05:00
|
|
|
}
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub struct DeprecatedUnstableStruct {
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
2016-04-26 12:51:14 -05:00
|
|
|
}
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub struct UnstableStruct {
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
2016-04-26 12:51:14 -05:00
|
|
|
}
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub struct StableStruct {
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
2016-04-26 12:51:14 -05:00
|
|
|
}
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-11-30 16:35:25 -06:00
|
|
|
pub enum UnstableEnum {}
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub enum StableEnum {}
|
2016-04-26 12:51:14 -05:00
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub struct DeprecatedUnitStruct;
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub struct DeprecatedUnstableUnitStruct;
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub struct UnstableUnitStruct;
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub struct StableUnitStruct;
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub enum Enum {
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
DeprecatedVariant,
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
DeprecatedUnstableVariant,
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
UnstableVariant,
|
|
|
|
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
StableVariant,
|
|
|
|
}
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2022-03-04 20:59:18 -06:00
|
|
|
#[deprecated(since = "1.0.0", note = "text")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
|
2019-12-21 05:16:18 -06:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2016-04-26 12:51:14 -05:00
|
|
|
pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2016-04-26 12:51:14 -05:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! macro_test {
|
|
|
|
() => (deprecated());
|
|
|
|
}
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2016-04-26 12:51:14 -05:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! macro_test_arg {
|
|
|
|
($func:expr) => ($func);
|
|
|
|
}
|
|
|
|
|
2018-07-23 06:22:23 -05:00
|
|
|
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
2016-04-26 12:51:14 -05:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! macro_test_arg_nested {
|
|
|
|
($func:ident) => (macro_test_arg!($func()));
|
|
|
|
}
|