Update uitests
This commit is contained in:
parent
28eca4a8fe
commit
6dc27bf7de
4 changed files with 33 additions and 33 deletions
|
|
@ -21,8 +21,8 @@ mod to_reuse {
|
|||
#[attr = Cold]
|
||||
fn foo_no_reason(x: usize) -> usize { x }
|
||||
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
#[attr = Cold]
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
fn bar(x: usize) -> usize { x }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ impl Trait for S {
|
|||
fn foo0(arg0: _) -> _ { to_reuse::foo(self + 1) }
|
||||
|
||||
// Check that #[inline(hint)] is added when other attributes present in inner reuse
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
#[attr = MustUse]
|
||||
#[attr = Cold]
|
||||
#[attr = MustUse]
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
#[attr = Inline(Hint)]
|
||||
fn foo1(arg0: _) -> _ { to_reuse::foo(self / 2) }
|
||||
|
||||
|
|
@ -59,18 +59,18 @@ impl Trait for S {
|
|||
fn foo3(arg0: _) -> _ { to_reuse::foo(self / 2) }
|
||||
|
||||
// Check that #[inline(never)] is preserved when there are other attributes in inner reuse
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
#[attr = Inline(Never)]
|
||||
#[attr = MustUse]
|
||||
#[attr = Cold]
|
||||
#[attr = MustUse]
|
||||
#[attr = Inline(Never)]
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
fn foo4(arg0: _) -> _ { to_reuse::foo(self / 2) }
|
||||
}.foo()
|
||||
}
|
||||
|
||||
// Check that #[inline(hint)] is added when there are other attributes present in trait reuse
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
#[attr = MustUse]
|
||||
#[attr = Cold]
|
||||
#[attr = MustUse]
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
#[attr = Inline(Hint)]
|
||||
fn foo1(self: _) -> _ { self.0.foo1() }
|
||||
|
||||
|
|
@ -83,10 +83,10 @@ impl Trait for S {
|
|||
fn foo3(self: _) -> _ { self.0.foo3() }
|
||||
|
||||
// Check that #[inline(never)] is preserved when there are other attributes in trait reuse
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
#[attr = Inline(Never)]
|
||||
#[attr = MustUse]
|
||||
#[attr = Cold]
|
||||
#[attr = MustUse]
|
||||
#[attr = Inline(Never)]
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
fn foo4(self: _) -> _ { self.0.foo4() }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
error: can't mark as unstable using an already stable feature
|
||||
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
|
||||
|
|
||||
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
|
||||
LL | const fn my_fun() {}
|
||||
| -------------------- the stability attribute annotates this item
|
||||
|
|
||||
help: consider removing the attribute
|
||||
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
|
||||
|
|
||||
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: can't mark as unstable using an already stable feature
|
||||
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:6:1
|
||||
|
|
||||
|
|
@ -27,5 +13,19 @@ help: consider removing the attribute
|
|||
LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: can't mark as unstable using an already stable feature
|
||||
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
|
||||
|
|
||||
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
|
||||
LL | const fn my_fun() {}
|
||||
| -------------------- the stability attribute annotates this item
|
||||
|
|
||||
help: consider removing the attribute
|
||||
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
|
||||
|
|
||||
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -94,14 +94,6 @@ LL | #[const_continue]
|
|||
|
|
||||
= help: `#[const_continue]` can be applied to
|
||||
|
||||
error: `#[const_continue]` should be applied to a break expression
|
||||
--> $DIR/invalid-attribute.rs:40:9
|
||||
|
|
||||
LL | #[const_continue]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
LL | 5
|
||||
| - not a break expression
|
||||
|
||||
error: `#[loop_match]` should be applied to a loop
|
||||
--> $DIR/invalid-attribute.rs:39:9
|
||||
|
|
||||
|
|
@ -111,5 +103,13 @@ LL | #[const_continue]
|
|||
LL | 5
|
||||
| - not a loop
|
||||
|
||||
error: `#[const_continue]` should be applied to a break expression
|
||||
--> $DIR/invalid-attribute.rs:40:9
|
||||
|
|
||||
LL | #[const_continue]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
LL | 5
|
||||
| - not a break expression
|
||||
|
||||
error: aborting due to 14 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue