Auto merge of #67505 - Centril:rollup-7win7ty, r=Centril
Rollup of 6 pull requests Successful merges: - #67148 ( Refactor type & bounds parsing thoroughly) - #67410 (Reenable static linking of libstdc++ on windows-gnu) - #67439 (Cleanup `lower_pattern_unadjusted` & Improve slice pat typeck) - #67480 (Require issue = "none" over issue = "0" in unstable attributes) - #67500 (Tweak non_shorthand_field_patterns' suggestion) - #67504 (Warn against relying on ?Sized being last) Failed merges: r? @ghost
This commit is contained in:
commit
3982d3514e
133 changed files with 991 additions and 862 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#![crate_type = "lib"]
|
||||
#![feature(staged_api)]
|
||||
#![unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#![unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
|
||||
pub fn baz() {}
|
||||
|
|
|
|||
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
#![unstable(feature = "humans",
|
||||
reason = "who ever let humans program computers, we're apparently really bad at it",
|
||||
issue = "0")]
|
||||
issue = "none")]
|
||||
|
||||
#![feature(foo, foo2)]
|
||||
#![feature(staged_api)]
|
||||
|
||||
// @has 'foo/fn.foo.html' '//pre' 'pub unsafe fn foo() -> u32'
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "none")]
|
||||
pub const unsafe fn foo() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.foo2.html' '//pre' 'pub fn foo2() -> u32'
|
||||
#[unstable(feature = "humans", issue="0")]
|
||||
#[unstable(feature = "humans", issue = "none")]
|
||||
pub const fn foo2() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.bar2.html' '//pre' 'pub const fn bar2() -> u32'
|
||||
|
|
@ -22,7 +22,7 @@ pub const fn foo2() -> u32 { 42 }
|
|||
pub const fn bar2() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.foo2_gated.html' '//pre' 'pub unsafe fn foo2_gated() -> u32'
|
||||
#[unstable(feature = "foo2", issue="0")]
|
||||
#[unstable(feature = "foo2", issue = "none")]
|
||||
pub const unsafe fn foo2_gated() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.bar2_gated.html' '//pre' 'pub const unsafe fn bar2_gated() -> u32'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
/// docs for my_macro
|
||||
#[unstable(feature = "macro_test", issue = "0")]
|
||||
#[unstable(feature = "macro_test", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.2.3", reason = "text")]
|
||||
#[macro_export]
|
||||
macro_rules! my_macro {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#![feature(staged_api)]
|
||||
|
||||
#![unstable(feature = "test", issue = "0")]
|
||||
#![unstable(feature = "test", issue = "none")]
|
||||
|
||||
pub struct Unstable {
|
||||
// @has stability/struct.Unstable.html \
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// compile-flags:--cfg foo
|
||||
|
||||
#![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "0"))]
|
||||
#![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "none"))]
|
||||
#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
|
||||
#![feature(staged_api)]
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@
|
|||
#![feature(staged_api)]
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "none")]
|
||||
pub const fn foo() -> u32 { 42 }
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#![unstable(feature = "humans",
|
||||
reason = "who ever let humans program computers,
|
||||
we're apparently really bad at it",
|
||||
issue = "0")]
|
||||
issue = "none")]
|
||||
|
||||
#![feature(const_fn)]
|
||||
#![feature(staged_api)]
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "none")]
|
||||
const fn foo() -> u32 { 42 }
|
||||
|
||||
fn meh() -> u32 { 42 }
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#![unstable(feature = "humans",
|
||||
reason = "who ever let humans program computers,
|
||||
we're apparently really bad at it",
|
||||
issue = "0")]
|
||||
issue = "none")]
|
||||
|
||||
#![feature(const_fn, foo, foo2)]
|
||||
#![feature(staged_api)]
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "none")]
|
||||
const fn foo() -> u32 { 42 }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -15,7 +15,7 @@ const fn foo() -> u32 { 42 }
|
|||
// can't call non-min_const_fn
|
||||
const fn bar() -> u32 { foo() } //~ ERROR can only call other `const fn`
|
||||
|
||||
#[unstable(feature = "rust1", issue="0")]
|
||||
#[unstable(feature = "rust1", issue = "none")]
|
||||
const fn foo2() -> u32 { 42 }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -29,7 +29,7 @@ const fn bar2() -> u32 { foo2() } //~ ERROR can only call other `const fn`
|
|||
const fn bar3() -> u32 { (5f32 + 6f32) as u32 } //~ ERROR only int, `bool` and `char` operations
|
||||
|
||||
// check whether this function cannot be called even with the feature gate active
|
||||
#[unstable(feature = "foo2", issue="0")]
|
||||
#[unstable(feature = "foo2", issue = "none")]
|
||||
const fn foo2_gated() -> u32 { 42 }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#![unstable(feature = "humans",
|
||||
reason = "who ever let humans program computers,
|
||||
we're apparently really bad at it",
|
||||
issue = "0")]
|
||||
issue = "none")]
|
||||
|
||||
#![feature(const_fn, foo, foo2)]
|
||||
#![feature(staged_api)]
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "none")]
|
||||
const unsafe fn foo() -> u32 { 42 }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -15,7 +15,7 @@ const unsafe fn foo() -> u32 { 42 }
|
|||
// can't call non-min_const_fn
|
||||
const unsafe fn bar() -> u32 { unsafe { foo() } } //~ ERROR can only call other `const fn`
|
||||
|
||||
#[unstable(feature = "rust1", issue="0")]
|
||||
#[unstable(feature = "rust1", issue = "none")]
|
||||
const unsafe fn foo2() -> u32 { 42 }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -29,7 +29,7 @@ const unsafe fn bar2() -> u32 { unsafe { foo2() } } //~ ERROR can only call othe
|
|||
const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 } //~ ERROR only int, `bool` and `char` op
|
||||
|
||||
// check whether this function cannot be called even with the feature gate active
|
||||
#[unstable(feature = "foo2", issue="0")]
|
||||
#[unstable(feature = "foo2", issue = "none")]
|
||||
const unsafe fn foo2_gated() -> u32 { 42 }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#![unstable(feature = "humans",
|
||||
reason = "who ever let humans program computers,
|
||||
we're apparently really bad at it",
|
||||
issue = "0")]
|
||||
issue = "none")]
|
||||
|
||||
#![feature(const_fn, foo, foo2)]
|
||||
#![feature(staged_api)]
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "none")]
|
||||
const fn foo() -> u32 { 42 }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -15,7 +15,7 @@ const fn foo() -> u32 { 42 }
|
|||
// can't call non-min_const_fn
|
||||
const unsafe fn bar() -> u32 { foo() } //~ ERROR can only call other `const fn`
|
||||
|
||||
#[unstable(feature = "rust1", issue="0")]
|
||||
#[unstable(feature = "rust1", issue = "none")]
|
||||
const fn foo2() -> u32 { 42 }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -24,7 +24,7 @@ const fn foo2() -> u32 { 42 }
|
|||
const unsafe fn bar2() -> u32 { foo2() } //~ ERROR can only call other `const fn`
|
||||
|
||||
// check whether this function cannot be called even with the feature gate active
|
||||
#[unstable(feature = "foo2", issue="0")]
|
||||
#[unstable(feature = "foo2", issue = "none")]
|
||||
const fn foo2_gated() -> u32 { 42 }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ enum Opt<T> {
|
|||
}
|
||||
|
||||
impl<T> Opt<T> {
|
||||
#[rustc_const_unstable(feature = "foo", issue = "0")]
|
||||
#[rustc_const_unstable(feature = "foo", issue = "none")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
const fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T {
|
||||
//~^ ERROR destructors cannot be evaluated at compile-time
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ fn foo_stable_1_0_0() {}
|
|||
//~^ ERROR feature `foo` is declared stable since 1.29.0
|
||||
fn foo_stable_1_29_0() {}
|
||||
|
||||
#[unstable(feature = "foo", issue = "0")]
|
||||
#[unstable(feature = "foo", issue = "none")]
|
||||
//~^ ERROR feature `foo` is declared unstable
|
||||
fn foo_unstable() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ LL | #[stable(feature = "foo", since = "1.29.0")]
|
|||
error[E0711]: feature `foo` is declared unstable, but was previously declared stable
|
||||
--> $DIR/stability-attribute-consistency.rs:12:1
|
||||
|
|
||||
LL | #[unstable(feature = "foo", issue = "0")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[unstable(feature = "foo", issue = "none")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Check that an issue value can be explicitly set to "none" instead of "0"
|
||||
// Check that an issue value can be explicitly set to "0" instead of "none"
|
||||
#![crate_type = "lib"]
|
||||
#![feature(staged_api)]
|
||||
#![stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0545]: incorrect 'issue'
|
||||
--> $DIR/unstable-attribute-allow-issue-none.rs:12:1
|
||||
--> $DIR/unstable-attribute-allow-issue-0.rs:12:1
|
||||
|
|
||||
LL | #[unstable(feature = "unstable_test_feature", issue = "something")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -1,24 +1,24 @@
|
|||
#![feature(staged_api, allow_internal_unstable)]
|
||||
#![stable(feature = "stable", since = "1.0.0")]
|
||||
|
||||
#[unstable(feature = "function", issue = "0")]
|
||||
#[unstable(feature = "function", issue = "none")]
|
||||
pub fn unstable() {}
|
||||
|
||||
|
||||
#[stable(feature = "stable", since = "1.0.0")]
|
||||
pub struct Foo {
|
||||
#[unstable(feature = "struct_field", issue = "0")]
|
||||
#[unstable(feature = "struct_field", issue = "none")]
|
||||
pub x: u8
|
||||
}
|
||||
|
||||
impl Foo {
|
||||
#[unstable(feature = "method", issue = "0")]
|
||||
#[unstable(feature = "method", issue = "none")]
|
||||
pub fn method(&self) {}
|
||||
}
|
||||
|
||||
#[stable(feature = "stable", since = "1.0.0")]
|
||||
pub struct Bar {
|
||||
#[unstable(feature = "struct2_field", issue = "0")]
|
||||
#[unstable(feature = "struct2_field", issue = "none")]
|
||||
pub x: u8
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#![crate_type = "lib"]
|
||||
#![unstable(feature = "issue_52489_unstable", issue = "0")]
|
||||
#![unstable(feature = "issue_52489_unstable", issue = "none")]
|
||||
#![feature(staged_api)]
|
||||
|
|
|
|||
|
|
@ -15,16 +15,16 @@ pub fn deprecated_text() {}
|
|||
#[rustc_deprecated(since = "99.99.99", reason = "text")]
|
||||
pub fn deprecated_future() {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated_unstable() {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated_unstable_text() {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn unstable() {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn unstable_text() {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -43,16 +43,16 @@ impl MethodTester {
|
|||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated_unstable_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn method_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn method_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -70,16 +70,16 @@ pub trait Trait {
|
|||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated_unstable_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
fn trait_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
fn trait_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -90,7 +90,7 @@ pub trait Trait {
|
|||
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
pub trait TraitWithAssociatedTypes {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
type TypeUnstable = u8;
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
|
|
@ -100,7 +100,7 @@ pub trait TraitWithAssociatedTypes {
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
impl Trait for MethodTester {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub trait UnstableTrait { fn dummy(&self) { } }
|
||||
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
|
|
@ -114,12 +114,12 @@ pub trait DeprecatedTrait {
|
|||
pub struct DeprecatedStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
||||
}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnstableStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
||||
}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ pub struct UnstableStruct {
|
|||
pub struct StableStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
||||
}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub enum UnstableEnum {}
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub enum StableEnum {}
|
||||
|
|
@ -135,10 +135,10 @@ pub enum StableEnum {}
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnitStruct;
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnstableUnitStruct;
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableUnitStruct;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct StableUnitStruct;
|
||||
|
|
@ -148,10 +148,10 @@ pub enum Enum {
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
DeprecatedVariant,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
DeprecatedUnstableVariant,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
UnstableVariant,
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -161,10 +161,10 @@ pub enum Enum {
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#![feature(staged_api)]
|
||||
#![deny(deprecated)]
|
||||
|
||||
#![unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#![unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
|
||||
struct Foo;
|
||||
|
||||
impl Foo {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn foo(self) {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ struct Conj<A> {a : A}
|
|||
trait Valid {}
|
||||
|
||||
impl<A: !Valid> Conj<A>{}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
error: negative trait bounds are not supported
|
||||
error: negative bounds are not supported
|
||||
--> $DIR/issue-58857.rs:4:7
|
||||
|
|
||||
LL | impl<A: !Valid> Conj<A>{}
|
||||
| ^^^^^^^^ negative trait bounds are not supported
|
||||
|
|
||||
= help: remove the trait bound
|
||||
| ^^^^^^^^ negative bounds are not supported
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#![crate_name="inherited_stability"]
|
||||
#![crate_type = "lib"]
|
||||
#![unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#![unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#![feature(staged_api)]
|
||||
|
||||
pub fn unstable() {}
|
||||
|
|
@ -10,14 +10,14 @@ pub fn stable() {}
|
|||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub mod stable_mod {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn unstable() {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub fn stable() {}
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub mod unstable_mod {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
|
|
@ -28,7 +28,7 @@ pub mod unstable_mod {
|
|||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait Stable {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
fn unstable(&self);
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#![crate_name="lint_output_format"]
|
||||
#![crate_type = "lib"]
|
||||
#![feature(staged_api)]
|
||||
#![unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#![unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
|
|
@ -9,12 +9,12 @@ pub fn foo() -> usize {
|
|||
20
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn bar() -> usize {
|
||||
40
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn baz() -> usize {
|
||||
30
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,16 +15,16 @@ pub fn deprecated_text() {}
|
|||
#[rustc_deprecated(since = "99.99.99", reason = "text")]
|
||||
pub fn deprecated_future() {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated_unstable() {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated_unstable_text() {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn unstable() {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn unstable_text() {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -43,16 +43,16 @@ impl MethodTester {
|
|||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated_unstable_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn method_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn method_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -70,16 +70,16 @@ pub trait Trait {
|
|||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated_unstable_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
fn trait_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
fn trait_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -90,7 +90,7 @@ pub trait Trait {
|
|||
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
pub trait TraitWithAssociatedTypes {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
type TypeUnstable = u8;
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
|
|
@ -100,7 +100,7 @@ pub trait TraitWithAssociatedTypes {
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
impl Trait for MethodTester {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub trait UnstableTrait { fn dummy(&self) { } }
|
||||
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
|
|
@ -114,12 +114,12 @@ pub trait DeprecatedTrait {
|
|||
pub struct DeprecatedStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
||||
}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnstableStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
||||
}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ pub struct UnstableStruct {
|
|||
pub struct StableStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
|
||||
}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub enum UnstableEnum {}
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub enum StableEnum {}
|
||||
|
|
@ -135,10 +135,10 @@ pub enum StableEnum {}
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnitStruct;
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnstableUnitStruct;
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableUnitStruct;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct StableUnitStruct;
|
||||
|
|
@ -148,10 +148,10 @@ pub enum Enum {
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
DeprecatedVariant,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
DeprecatedUnstableVariant,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
UnstableVariant,
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -161,10 +161,10 @@ pub enum Enum {
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -5,47 +5,47 @@
|
|||
pub struct Stable {
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub inherit: u8, // it's a lie (stable doesn't inherit)
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub override1: u8,
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub override2: u8,
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct Stable2(#[stable(feature = "rust1", since = "1.0.0")] pub u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")] pub u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")] pub u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct Unstable {
|
||||
pub inherit: u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub override1: u8,
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub override2: u8,
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct Unstable2(pub u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")] pub u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct Deprecated {
|
||||
pub inherit: u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub override1: u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub override2: u8,
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct Deprecated2(pub u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")] pub u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")] pub u8);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")] pub u8);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// compile-flags:--cfg foo
|
||||
|
||||
#![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "0"))]
|
||||
#![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "none"))]
|
||||
#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
|
||||
#![feature(staged_api)]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// compile-flags:--cfg foo
|
||||
|
||||
#![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "0"))]
|
||||
#![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "none"))]
|
||||
#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
|
||||
#![feature(staged_api)]
|
||||
|
|
|
|||
70
src/test/ui/lint/lint-shorthand-field.fixed
Normal file
70
src/test/ui/lint/lint-shorthand-field.fixed
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
// run-rustfix
|
||||
|
||||
#![allow(nonstandard_style, unused_variables, unused_mut)]
|
||||
#![deny(non_shorthand_field_patterns)]
|
||||
|
||||
struct Foo {
|
||||
x: isize,
|
||||
y: isize,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
{
|
||||
let Foo {
|
||||
x, //~ ERROR the `x:` in this pattern is redundant
|
||||
ref y, //~ ERROR the `y:` in this pattern is redundant
|
||||
} = Foo { x: 0, y: 0 };
|
||||
|
||||
let Foo {
|
||||
x,
|
||||
ref y,
|
||||
} = Foo { x: 0, y: 0 };
|
||||
}
|
||||
|
||||
{
|
||||
const x: isize = 1;
|
||||
|
||||
match (Foo { x: 1, y: 1 }) {
|
||||
Foo { x: x, ..} => {},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
struct Bar {
|
||||
x: x,
|
||||
}
|
||||
|
||||
struct x;
|
||||
|
||||
match (Bar { x: x }) {
|
||||
Bar { x: x } => {},
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
struct Bar {
|
||||
x: Foo,
|
||||
}
|
||||
|
||||
enum Foo { x }
|
||||
|
||||
match (Bar { x: Foo::x }) {
|
||||
Bar { x: Foo::x } => {},
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
struct Baz {
|
||||
x: isize,
|
||||
y: isize,
|
||||
z: isize,
|
||||
}
|
||||
|
||||
let Baz {
|
||||
mut x, //~ ERROR the `x:` in this pattern is redundant
|
||||
ref y, //~ ERROR the `y:` in this pattern is redundant
|
||||
ref mut z, //~ ERROR the `z:` in this pattern is redundant
|
||||
} = Baz { x: 0, y: 0, z: 0 };
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
#![allow(nonstandard_style, unused_variables)]
|
||||
// run-rustfix
|
||||
|
||||
#![allow(nonstandard_style, unused_variables, unused_mut)]
|
||||
#![deny(non_shorthand_field_patterns)]
|
||||
|
||||
struct Foo {
|
||||
|
|
@ -51,4 +53,18 @@ fn main() {
|
|||
Bar { x: Foo::x } => {},
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
struct Baz {
|
||||
x: isize,
|
||||
y: isize,
|
||||
z: isize,
|
||||
}
|
||||
|
||||
let Baz {
|
||||
x: mut x, //~ ERROR the `x:` in this pattern is redundant
|
||||
y: ref y, //~ ERROR the `y:` in this pattern is redundant
|
||||
z: ref mut z, //~ ERROR the `z:` in this pattern is redundant
|
||||
} = Baz { x: 0, y: 0, z: 0 };
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,38 @@
|
|||
error: the `x:` in this pattern is redundant
|
||||
--> $DIR/lint-shorthand-field.rs:12:13
|
||||
--> $DIR/lint-shorthand-field.rs:14:13
|
||||
|
|
||||
LL | x: x,
|
||||
| --^^
|
||||
| |
|
||||
| help: remove this
|
||||
| ^^^^ help: use shorthand field pattern: `x`
|
||||
|
|
||||
note: lint level defined here
|
||||
--> $DIR/lint-shorthand-field.rs:2:9
|
||||
--> $DIR/lint-shorthand-field.rs:4:9
|
||||
|
|
||||
LL | #![deny(non_shorthand_field_patterns)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: the `y:` in this pattern is redundant
|
||||
--> $DIR/lint-shorthand-field.rs:13:13
|
||||
--> $DIR/lint-shorthand-field.rs:15:13
|
||||
|
|
||||
LL | y: ref y,
|
||||
| --^^^^^^
|
||||
| |
|
||||
| help: remove this
|
||||
| ^^^^^^^^ help: use shorthand field pattern: `ref y`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: the `x:` in this pattern is redundant
|
||||
--> $DIR/lint-shorthand-field.rs:65:13
|
||||
|
|
||||
LL | x: mut x,
|
||||
| ^^^^^^^^ help: use shorthand field pattern: `mut x`
|
||||
|
||||
error: the `y:` in this pattern is redundant
|
||||
--> $DIR/lint-shorthand-field.rs:66:13
|
||||
|
|
||||
LL | y: ref y,
|
||||
| ^^^^^^^^ help: use shorthand field pattern: `ref y`
|
||||
|
||||
error: the `z:` in this pattern is redundant
|
||||
--> $DIR/lint-shorthand-field.rs:67:13
|
||||
|
|
||||
LL | z: ref mut z,
|
||||
| ^^^^^^^^^^^^ help: use shorthand field pattern: `ref mut z`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -168,16 +168,16 @@ mod cross_crate {
|
|||
}
|
||||
|
||||
mod this_crate {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated() {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated_text() {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn unstable() {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn unstable_text() {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -189,16 +189,16 @@ mod this_crate {
|
|||
pub struct MethodTester;
|
||||
|
||||
impl MethodTester {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn method_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn method_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -208,16 +208,16 @@ mod this_crate {
|
|||
}
|
||||
|
||||
pub trait Trait {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
fn trait_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
fn trait_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -228,12 +228,12 @@ mod this_crate {
|
|||
|
||||
impl Trait for MethodTester {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
|
||||
}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
|
||||
}
|
||||
|
|
@ -242,29 +242,29 @@ mod this_crate {
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnitStruct;
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableUnitStruct;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct StableUnitStruct;
|
||||
|
||||
pub enum Enum {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
DeprecatedVariant,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
UnstableVariant,
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
StableVariant,
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedTupleStruct(isize);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableTupleStruct(isize);
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct StableTupleStruct(isize);
|
||||
|
|
@ -381,7 +381,7 @@ mod this_crate {
|
|||
foo.trait_stable();
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn test_fn_body() {
|
||||
fn fn_in_body() {}
|
||||
|
|
@ -389,7 +389,7 @@ mod this_crate {
|
|||
}
|
||||
|
||||
impl MethodTester {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn test_method_body(&self) {
|
||||
fn fn_in_body() {}
|
||||
|
|
@ -397,7 +397,7 @@ mod this_crate {
|
|||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub trait DeprecatedTrait {
|
||||
fn dummy(&self) { }
|
||||
|
|
|
|||
|
|
@ -216,16 +216,16 @@ mod inheritance {
|
|||
}
|
||||
|
||||
mod this_crate {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated() {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated_text() {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn unstable() {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn unstable_text() {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -237,16 +237,16 @@ mod this_crate {
|
|||
pub struct MethodTester;
|
||||
|
||||
impl MethodTester {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn method_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn method_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -256,16 +256,16 @@ mod this_crate {
|
|||
}
|
||||
|
||||
pub trait Trait {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
fn trait_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
fn trait_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -276,12 +276,12 @@ mod this_crate {
|
|||
|
||||
impl Trait for MethodTester {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
|
||||
}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
|
||||
}
|
||||
|
|
@ -290,29 +290,29 @@ mod this_crate {
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnitStruct;
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableUnitStruct;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct StableUnitStruct;
|
||||
|
||||
pub enum Enum {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
DeprecatedVariant,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
UnstableVariant,
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
StableVariant,
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedTupleStruct(isize);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableTupleStruct(isize);
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct StableTupleStruct(isize);
|
||||
|
|
@ -430,7 +430,7 @@ mod this_crate {
|
|||
foo.trait_stable();
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn test_fn_body() {
|
||||
fn fn_in_body() {}
|
||||
|
|
@ -438,7 +438,7 @@ mod this_crate {
|
|||
}
|
||||
|
||||
impl MethodTester {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn test_method_body(&self) {
|
||||
fn fn_in_body() {}
|
||||
|
|
@ -446,7 +446,7 @@ mod this_crate {
|
|||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub trait DeprecatedTrait {
|
||||
fn dummy(&self) { }
|
||||
|
|
|
|||
|
|
@ -153,50 +153,50 @@ mod this_crate {
|
|||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
struct Stable {
|
||||
inherit: u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
override1: u8,
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
override2: u8,
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
struct Stable2(u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")] u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
struct Unstable {
|
||||
inherit: u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
override1: u8,
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
override2: u8,
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
struct Unstable2(u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")] u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
struct Deprecated {
|
||||
inherit: u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
override1: u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
override2: u8,
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
struct Deprecated2(u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")] u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")] u8);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")] u8);
|
||||
|
||||
pub fn foo() {
|
||||
let x = Stable {
|
||||
|
|
|
|||
|
|
@ -128,50 +128,50 @@ mod this_crate {
|
|||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
struct Stable {
|
||||
inherit: u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
override1: u8,
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
override2: u8,
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
struct Stable2(u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")] u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
struct Unstable {
|
||||
inherit: u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
override1: u8,
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
override2: u8,
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
struct Unstable2(u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")] u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
struct Deprecated {
|
||||
inherit: u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
override1: u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
override2: u8,
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
struct Deprecated2(u8,
|
||||
#[stable(feature = "rust1", since = "1.0.0")] u8,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")] u8);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")] u8);
|
||||
|
||||
pub fn foo() {
|
||||
let x = Stable {
|
||||
|
|
|
|||
|
|
@ -203,10 +203,10 @@ mod inheritance {
|
|||
}
|
||||
|
||||
mod this_crate {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated() {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn deprecated_text() {}
|
||||
|
||||
|
|
@ -214,9 +214,9 @@ mod this_crate {
|
|||
#[rustc_deprecated(since = "99.99.99", reason = "text")]
|
||||
pub fn deprecated_future() {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn unstable() {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn unstable_text() {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -228,16 +228,16 @@ mod this_crate {
|
|||
pub struct MethodTester;
|
||||
|
||||
impl MethodTester {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub fn method_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub fn method_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
pub fn method_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -247,16 +247,16 @@ mod this_crate {
|
|||
}
|
||||
|
||||
pub trait Trait {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn trait_deprecated_text(&self) {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
fn trait_unstable(&self) {}
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
|
||||
fn trait_unstable_text(&self) {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -267,12 +267,12 @@ mod this_crate {
|
|||
|
||||
impl Trait for MethodTester {}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
|
||||
}
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableStruct {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
|
||||
}
|
||||
|
|
@ -281,29 +281,29 @@ mod this_crate {
|
|||
#[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedUnitStruct;
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableUnitStruct;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct StableUnitStruct;
|
||||
|
||||
pub enum Enum {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
DeprecatedVariant,
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
UnstableVariant,
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
StableVariant,
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub struct DeprecatedTupleStruct(isize);
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub struct UnstableTupleStruct(isize);
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct StableTupleStruct(isize);
|
||||
|
|
@ -422,7 +422,7 @@ mod this_crate {
|
|||
foo.trait_stable();
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn test_fn_body() {
|
||||
fn fn_in_body() {}
|
||||
|
|
@ -430,7 +430,7 @@ mod this_crate {
|
|||
}
|
||||
|
||||
impl MethodTester {
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
fn test_method_body(&self) {
|
||||
fn fn_in_body() {}
|
||||
|
|
@ -438,7 +438,7 @@ mod this_crate {
|
|||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
||||
pub trait DeprecatedTrait {
|
||||
fn dummy(&self) { }
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ fn main() {
|
|||
match d {
|
||||
Equinox { warp_factor: warp_factor } => {}
|
||||
//~^ WARN this pattern is redundant
|
||||
//~| HELP remove this
|
||||
//~| HELP use shorthand field pattern
|
||||
}
|
||||
println!("{} {}", registry_no, b);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,9 +77,7 @@ warning: the `warp_factor:` in this pattern is redundant
|
|||
--> $DIR/suggestions.rs:61:23
|
||||
|
|
||||
LL | Equinox { warp_factor: warp_factor } => {}
|
||||
| ------------^^^^^^^^^^^^
|
||||
| |
|
||||
| help: remove this
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use shorthand field pattern: `warp_factor`
|
||||
|
|
||||
= note: `#[warn(non_shorthand_field_patterns)]` on by default
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#![feature(staged_api)]
|
||||
#![stable(feature = "unit_test", since = "1.0.0")]
|
||||
|
||||
#[unstable(feature = "unstable_macros", issue = "0")]
|
||||
#[unstable(feature = "unstable_macros", issue = "none")]
|
||||
#[macro_export]
|
||||
macro_rules! unstable_macro{ () => () }
|
||||
|
||||
|
|
@ -12,5 +12,5 @@ macro_rules! unstable_macro{ () => () }
|
|||
macro_rules! deprecated_macro{ () => () }
|
||||
|
||||
// FIXME: Cannot use a `pub` macro 2.0 in a staged API crate due to reachability issues.
|
||||
// #[unstable(feature = "unstable_macros", issue = "0")]
|
||||
// #[unstable(feature = "unstable_macros", issue = "none")]
|
||||
// pub macro unstable_macro_modern() {}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#[macro_use] extern crate unstable_macros;
|
||||
|
||||
#[unstable(feature = "local_unstable", issue = "0")]
|
||||
#[unstable(feature = "local_unstable", issue = "none")]
|
||||
macro_rules! local_unstable { () => () }
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
#![feature(staged_api)]
|
||||
#[macro_use] extern crate unstable_macros;
|
||||
|
||||
#[unstable(feature = "local_unstable", issue = "0")]
|
||||
#[unstable(feature = "local_unstable", issue = "none")]
|
||||
macro_rules! local_unstable { () => () }
|
||||
|
||||
#[unstable(feature = "local_unstable", issue = "0")]
|
||||
#[unstable(feature = "local_unstable", issue = "none")]
|
||||
macro local_unstable_modern() {}
|
||||
|
||||
#[stable(feature = "deprecated_macros", since = "1.0.0")]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ pub fn unmarked() {
|
|||
()
|
||||
}
|
||||
|
||||
#[unstable(feature = "unstable_test_feature", issue = "0")]
|
||||
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
||||
pub mod foo {
|
||||
// #[unstable] is inherited
|
||||
pub fn unmarked() {}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
// run-rustfix
|
||||
|
||||
trait Tr {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
trait Tr2: SuperA {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
trait Tr3: SuperB {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
trait Tr4: SuperB + SuperD {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
trait Tr5 {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
|
||||
trait SuperA {}
|
||||
trait SuperB {}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
// run-rustfix
|
||||
|
||||
trait Tr: !SuperA {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
trait Tr2: SuperA + !SuperB {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
trait Tr3: !SuperA + SuperB {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
trait Tr4: !SuperA + SuperB
|
||||
+ !SuperC + SuperD {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
trait Tr5: !SuperA
|
||||
+ !SuperB {}
|
||||
//~^ ERROR negative trait bounds are not supported
|
||||
//~^ ERROR negative bounds are not supported
|
||||
|
||||
trait SuperA {}
|
||||
trait SuperB {}
|
||||
|
|
|
|||
|
|
@ -1,46 +1,36 @@
|
|||
error: negative trait bounds are not supported
|
||||
error: negative bounds are not supported
|
||||
--> $DIR/issue-33418.rs:3:9
|
||||
|
|
||||
LL | trait Tr: !SuperA {}
|
||||
| ^^^^^^^^^ negative trait bounds are not supported
|
||||
|
|
||||
= help: remove the trait bound
|
||||
| ^^^^^^^^^ negative bounds are not supported
|
||||
|
||||
error: negative trait bounds are not supported
|
||||
error: negative bounds are not supported
|
||||
--> $DIR/issue-33418.rs:5:19
|
||||
|
|
||||
LL | trait Tr2: SuperA + !SuperB {}
|
||||
| ^^^^^^^^^ negative trait bounds are not supported
|
||||
|
|
||||
= help: remove the trait bound
|
||||
| ^^^^^^^^^ negative bounds are not supported
|
||||
|
||||
error: negative trait bounds are not supported
|
||||
error: negative bounds are not supported
|
||||
--> $DIR/issue-33418.rs:7:10
|
||||
|
|
||||
LL | trait Tr3: !SuperA + SuperB {}
|
||||
| ^^^^^^^^^ negative trait bounds are not supported
|
||||
|
|
||||
= help: remove the trait bound
|
||||
| ^^^^^^^^^ negative bounds are not supported
|
||||
|
||||
error: negative trait bounds are not supported
|
||||
error: negative bounds are not supported
|
||||
--> $DIR/issue-33418.rs:9:10
|
||||
|
|
||||
LL | trait Tr4: !SuperA + SuperB
|
||||
| ^^^^^^^^^
|
||||
LL | + !SuperC + SuperD {}
|
||||
| ^^^^^^^^^ negative trait bounds are not supported
|
||||
|
|
||||
= help: remove the trait bounds
|
||||
| ^^^^^^^^^ negative bounds are not supported
|
||||
|
||||
error: negative trait bounds are not supported
|
||||
error: negative bounds are not supported
|
||||
--> $DIR/issue-33418.rs:12:10
|
||||
|
|
||||
LL | trait Tr5: !SuperA
|
||||
| ^^^^^^^^^
|
||||
LL | + !SuperB {}
|
||||
| ^^^^^^^^^ negative trait bounds are not supported
|
||||
|
|
||||
= help: remove the trait bounds
|
||||
| ^^^^^^^^^ negative bounds are not supported
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
// In this regression test for #67146, we check that the
|
||||
// negative outlives bound `!'a` is rejected by the parser.
|
||||
// This regression was first introduced in PR #57364.
|
||||
|
||||
fn main() {}
|
||||
|
||||
fn f1<T: !'static>() {}
|
||||
//~^ ERROR negative bounds are not supported
|
||||
fn f2<'a, T: Ord + !'a>() {}
|
||||
//~^ ERROR negative bounds are not supported
|
||||
fn f3<'a, T: !'a + Ord>() {}
|
||||
//~^ ERROR negative bounds are not supported
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
error: negative bounds are not supported
|
||||
--> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:7:8
|
||||
|
|
||||
LL | fn f1<T: !'static>() {}
|
||||
| ^^^^^^^^^^ negative bounds are not supported
|
||||
|
||||
error: negative bounds are not supported
|
||||
--> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:9:18
|
||||
|
|
||||
LL | fn f2<'a, T: Ord + !'a>() {}
|
||||
| ^^^^^ negative bounds are not supported
|
||||
|
||||
error: negative bounds are not supported
|
||||
--> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:11:12
|
||||
|
|
||||
LL | fn f3<'a, T: !'a + Ord>() {}
|
||||
| ^^^^^ negative bounds are not supported
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ mod bogus_attribute_types_1 {
|
|||
}
|
||||
|
||||
mod missing_feature_names {
|
||||
#[unstable(issue = "0")] //~ ERROR missing 'feature' [E0546]
|
||||
#[unstable(issue = "none")] //~ ERROR missing 'feature' [E0546]
|
||||
fn f1() { }
|
||||
|
||||
#[unstable(feature = "b")] //~ ERROR missing 'issue' [E0547]
|
||||
|
|
@ -45,12 +45,12 @@ mod missing_version {
|
|||
fn f3() { }
|
||||
}
|
||||
|
||||
#[unstable(feature = "b", issue = "0")]
|
||||
#[unstable(feature = "b", issue = "none")]
|
||||
#[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
|
||||
fn multiple1() { }
|
||||
|
||||
#[unstable(feature = "b", issue = "0")]
|
||||
#[unstable(feature = "b", issue = "0")] //~ ERROR multiple stability levels [E0544]
|
||||
#[unstable(feature = "b", issue = "none")]
|
||||
#[unstable(feature = "b", issue = "none")] //~ ERROR multiple stability levels [E0544]
|
||||
fn multiple2() { }
|
||||
|
||||
#[stable(feature = "a", since = "b")]
|
||||
|
|
@ -60,8 +60,8 @@ fn multiple3() { }
|
|||
#[stable(feature = "a", since = "b")]
|
||||
#[rustc_deprecated(since = "b", reason = "text")]
|
||||
#[rustc_deprecated(since = "b", reason = "text")]
|
||||
#[rustc_const_unstable(feature = "c", issue = "0")]
|
||||
#[rustc_const_unstable(feature = "d", issue = "0")] //~ ERROR multiple stability levels
|
||||
#[rustc_const_unstable(feature = "c", issue = "none")]
|
||||
#[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels
|
||||
pub const fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes [E0540]
|
||||
//~^ ERROR Invalid stability or deprecation version found
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ LL | #[stable(feature(b), since = "a")]
|
|||
error[E0546]: missing 'feature'
|
||||
--> $DIR/stability-attribute-sanity.rs:25:5
|
||||
|
|
||||
LL | #[unstable(issue = "0")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[unstable(issue = "none")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0547]: missing 'issue'
|
||||
--> $DIR/stability-attribute-sanity.rs:28:5
|
||||
|
|
@ -73,8 +73,8 @@ LL | #[stable(feature = "a", since = "b")]
|
|||
error[E0544]: multiple stability levels
|
||||
--> $DIR/stability-attribute-sanity.rs:53:1
|
||||
|
|
||||
LL | #[unstable(feature = "b", issue = "0")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[unstable(feature = "b", issue = "none")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0544]: multiple stability levels
|
||||
--> $DIR/stability-attribute-sanity.rs:57:1
|
||||
|
|
@ -91,8 +91,8 @@ LL | pub const fn multiple4() { }
|
|||
error[E0544]: multiple stability levels
|
||||
--> $DIR/stability-attribute-sanity.rs:64:1
|
||||
|
|
||||
LL | #[rustc_const_unstable(feature = "d", issue = "0")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_const_unstable(feature = "d", issue = "none")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: Invalid stability or deprecation version found
|
||||
--> $DIR/stability-attribute-sanity.rs:65:1
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ LL | let _ = Option:Some(vec![0, 1]);
|
|||
|
|
||||
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/23416
|
||||
= note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue