Skip to content

Commit 6dc27bf

Browse files
Update uitests
1 parent 28eca4a commit 6dc27bf

4 files changed

Lines changed: 30 additions & 30 deletions

File tree

tests/pretty/delegation-inherit-attributes.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#[attr = Cold]
2222
fn foo_no_reason(x: usize) -> usize { x }
2323

24-
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
2524
#[attr = Cold]
25+
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
2626
fn bar(x: usize) -> usize { x }
2727
}
2828

tests/pretty/delegation-inline-attribute.pp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
fn foo0(arg0: _) -> _ { to_reuse::foo(self + 1) }
4545

4646
// Check that #[inline(hint)] is added when other attributes present in inner reuse
47-
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
48-
#[attr = MustUse]
4947
#[attr = Cold]
48+
#[attr = MustUse]
49+
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
5050
#[attr = Inline(Hint)]
5151
fn foo1(arg0: _) -> _ { to_reuse::foo(self / 2) }
5252

@@ -59,18 +59,18 @@
5959
fn foo3(arg0: _) -> _ { to_reuse::foo(self / 2) }
6060

6161
// Check that #[inline(never)] is preserved when there are other attributes in inner reuse
62-
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
63-
#[attr = Inline(Never)]
64-
#[attr = MustUse]
6562
#[attr = Cold]
63+
#[attr = MustUse]
64+
#[attr = Inline(Never)]
65+
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
6666
fn foo4(arg0: _) -> _ { to_reuse::foo(self / 2) }
6767
}.foo()
6868
}
6969

7070
// Check that #[inline(hint)] is added when there are other attributes present in trait reuse
71-
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
72-
#[attr = MustUse]
7371
#[attr = Cold]
72+
#[attr = MustUse]
73+
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
7474
#[attr = Inline(Hint)]
7575
fn foo1(self: _) -> _ { self.0.foo1() }
7676

@@ -83,10 +83,10 @@
8383
fn foo3(self: _) -> _ { self.0.foo3() }
8484

8585
// Check that #[inline(never)] is preserved when there are other attributes in trait reuse
86-
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
87-
#[attr = Inline(Never)]
88-
#[attr = MustUse]
8986
#[attr = Cold]
87+
#[attr = MustUse]
88+
#[attr = Inline(Never)]
89+
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
9090
fn foo4(self: _) -> _ { self.0.foo4() }
9191
}
9292

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
error: can't mark as unstable using an already stable feature
2-
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
2+
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:6:1
33
|
4+
LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
46
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
67
LL | const fn my_fun() {}
78
| -------------------- the stability attribute annotates this item
89
|
910
help: consider removing the attribute
10-
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
11+
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:6:1
1112
|
12-
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13+
LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1415

1516
error: can't mark as unstable using an already stable feature
16-
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:6:1
17+
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
1718
|
18-
LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
19-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
2019
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
20+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
2121
LL | const fn my_fun() {}
2222
| -------------------- the stability attribute annotates this item
2323
|
2424
help: consider removing the attribute
25-
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:6:1
25+
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
2626
|
27-
LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
28-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27+
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
28+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2929

3030
error: aborting due to 2 previous errors
3131

tests/ui/loop-match/invalid-attribute.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,6 @@ LL | #[const_continue]
9494
|
9595
= help: `#[const_continue]` can be applied to
9696

97-
error: `#[const_continue]` should be applied to a break expression
98-
--> $DIR/invalid-attribute.rs:40:9
99-
|
100-
LL | #[const_continue]
101-
| ^^^^^^^^^^^^^^^^^
102-
LL | 5
103-
| - not a break expression
104-
10597
error: `#[loop_match]` should be applied to a loop
10698
--> $DIR/invalid-attribute.rs:39:9
10799
|
@@ -111,5 +103,13 @@ LL | #[const_continue]
111103
LL | 5
112104
| - not a loop
113105

106+
error: `#[const_continue]` should be applied to a break expression
107+
--> $DIR/invalid-attribute.rs:40:9
108+
|
109+
LL | #[const_continue]
110+
| ^^^^^^^^^^^^^^^^^
111+
LL | 5
112+
| - not a break expression
113+
114114
error: aborting due to 14 previous errors
115115

0 commit comments

Comments
 (0)