Skip to content

Commit 991dfe7

Browse files
committed
bless all
1 parent 5fbef22 commit 991dfe7

File tree

54 files changed

+151
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+151
-76
lines changed

src/test/compile-fail/specialization/issue-50452.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// compile-fail
2-
32
#![feature(specialization)]
3+
//~^ WARN the feature `specialization` is incomplete
44

55
pub trait Foo {
66
fn foo();

src/test/ui/associated-types/defaults-specialization.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
22
--> $DIR/defaults-specialization.rs:3:38
33
|
44
LL | #![feature(associated_type_defaults, specialization)]

src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//
55
// No we expect to run into a more user-friendly cycle error instead.
66
#![feature(specialization)]
7+
//~^ WARN the feature `specialization` is incomplete
78

89
trait Trait<T> { type Assoc; }
910
//~^ ERROR E0391
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:6:12
3+
|
4+
LL | #![feature(specialization)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
9+
110
error[E0391]: cycle detected when building specialization graph of trait `Trait`
2-
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:8:1
11+
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1
312
|
413
LL | trait Trait<T> { type Assoc; }
514
| ^^^^^^^^^^^^^^
615
|
716
= note: ...which again requires building specialization graph of trait `Trait`, completing the cycle
817
note: cycle used when coherence checking all impls of trait `Trait`
9-
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:8:1
18+
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1
1019
|
1120
LL | trait Trait<T> { type Assoc; }
1221
| ^^^^^^^^^^^^^^
1322

14-
error: aborting due to previous error
23+
error: aborting due to previous error; 1 warning emitted
1524

1625
For more information about this error, try `rustc --explain E0391`.

src/test/ui/error-codes/E0520.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(specialization)]
2+
//~^ WARN the feature `specialization` is incomplete
23

34
trait SpaceLlama {
45
fn fly(&self);

src/test/ui/error-codes/E0520.stderr

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/E0520.rs:1:12
3+
|
4+
LL | #![feature(specialization)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
9+
110
error[E0520]: `fly` specializes an item from a parent `impl`, but that item is not marked `default`
2-
--> $DIR/E0520.rs:16:5
11+
--> $DIR/E0520.rs:17:5
312
|
413
LL | / impl<T: Clone> SpaceLlama for T {
514
LL | | fn fly(&self) {}
@@ -11,6 +20,6 @@ LL | default fn fly(&self) {}
1120
|
1221
= note: to specialize, `fly` in the parent `impl` must be marked `default`
1322

14-
error: aborting due to previous error
23+
error: aborting due to previous error; 1 warning emitted
1524

1625
For more information about this error, try `rustc --explain E0520`.

src/test/ui/issues/issue-35376.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// check-pass
22
#![feature(specialization)]
3+
//~^ WARN the feature `specialization` is incomplete
34

45
fn main() {}
56

src/test/ui/issues/issue-35376.stderr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/issue-35376.rs:2:12
3+
|
4+
LL | #![feature(specialization)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
9+
10+
warning: 1 warning emitted
11+

src/test/ui/issues/issue-38091.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
#![feature(specialization)]
3+
//~^ WARN the feature `specialization` is incomplete
34

45
trait Iterate<'a> {
56
type Ty: Valid;

src/test/ui/issues/issue-38091.stderr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/issue-38091.rs:2:12
3+
|
4+
LL | #![feature(specialization)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
9+
10+
warning: 1 warning emitted
11+

src/test/ui/issues/issue-55380.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-pass
2-
32
#![feature(specialization)]
3+
//~^ WARN the feature `specialization` is incomplete
44

55
pub trait Foo {
66
fn abc() -> u32;

src/test/ui/issues/issue-55380.stderr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/issue-55380.rs:2:12
3+
|
4+
LL | #![feature(specialization)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
9+
10+
warning: 1 warning emitted
11+

src/test/ui/overlap-doesnt-conflict-with-specialization.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
22
--> $DIR/overlap-doesnt-conflict-with-specialization.rs:4:12
33
|
44
LL | #![feature(specialization)]

src/test/ui/parser/assoc-static-semantic-fail.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Semantically, we do not allow e.g., `static X: u8 = 0;` as an associated item.
22

33
#![feature(specialization)]
4+
//~^ WARN the feature `specialization` is incomplete
45

56
fn main() {}
67

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,167 +1,176 @@
11
error: associated `static` items are not allowed
2-
--> $DIR/assoc-static-semantic-fail.rs:9:5
2+
--> $DIR/assoc-static-semantic-fail.rs:10:5
33
|
44
LL | static IA: u8 = 0;
55
| ^^^^^^^^^^^^^^^^^^
66

77
error: associated `static` items are not allowed
8-
--> $DIR/assoc-static-semantic-fail.rs:11:5
8+
--> $DIR/assoc-static-semantic-fail.rs:12:5
99
|
1010
LL | static IB: u8;
1111
| ^^^^^^^^^^^^^^
1212

1313
error: a static item cannot be `default`
14-
--> $DIR/assoc-static-semantic-fail.rs:14:5
14+
--> $DIR/assoc-static-semantic-fail.rs:15:5
1515
|
1616
LL | default static IC: u8 = 0;
1717
| ^^^^^^^ `default` because of this
1818
|
1919
= note: only associated `fn`, `const`, and `type` items can be `default`
2020

2121
error: associated `static` items are not allowed
22-
--> $DIR/assoc-static-semantic-fail.rs:14:5
22+
--> $DIR/assoc-static-semantic-fail.rs:15:5
2323
|
2424
LL | default static IC: u8 = 0;
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2626

2727
error: a static item cannot be `default`
28-
--> $DIR/assoc-static-semantic-fail.rs:17:16
28+
--> $DIR/assoc-static-semantic-fail.rs:18:16
2929
|
3030
LL | pub(crate) default static ID: u8;
3131
| ^^^^^^^ `default` because of this
3232
|
3333
= note: only associated `fn`, `const`, and `type` items can be `default`
3434

3535
error: associated `static` items are not allowed
36-
--> $DIR/assoc-static-semantic-fail.rs:17:5
36+
--> $DIR/assoc-static-semantic-fail.rs:18:5
3737
|
3838
LL | pub(crate) default static ID: u8;
3939
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4040

4141
error: associated `static` items are not allowed
42-
--> $DIR/assoc-static-semantic-fail.rs:24:5
42+
--> $DIR/assoc-static-semantic-fail.rs:25:5
4343
|
4444
LL | static TA: u8 = 0;
4545
| ^^^^^^^^^^^^^^^^^^
4646

4747
error: associated `static` items are not allowed
48-
--> $DIR/assoc-static-semantic-fail.rs:26:5
48+
--> $DIR/assoc-static-semantic-fail.rs:27:5
4949
|
5050
LL | static TB: u8;
5151
| ^^^^^^^^^^^^^^
5252

5353
error: a static item cannot be `default`
54-
--> $DIR/assoc-static-semantic-fail.rs:28:5
54+
--> $DIR/assoc-static-semantic-fail.rs:29:5
5555
|
5656
LL | default static TC: u8 = 0;
5757
| ^^^^^^^ `default` because of this
5858
|
5959
= note: only associated `fn`, `const`, and `type` items can be `default`
6060

6161
error: associated `static` items are not allowed
62-
--> $DIR/assoc-static-semantic-fail.rs:28:5
62+
--> $DIR/assoc-static-semantic-fail.rs:29:5
6363
|
6464
LL | default static TC: u8 = 0;
6565
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6666

6767
error: a static item cannot be `default`
68-
--> $DIR/assoc-static-semantic-fail.rs:31:16
68+
--> $DIR/assoc-static-semantic-fail.rs:32:16
6969
|
7070
LL | pub(crate) default static TD: u8;
7171
| ^^^^^^^ `default` because of this
7272
|
7373
= note: only associated `fn`, `const`, and `type` items can be `default`
7474

7575
error: associated `static` items are not allowed
76-
--> $DIR/assoc-static-semantic-fail.rs:31:5
76+
--> $DIR/assoc-static-semantic-fail.rs:32:5
7777
|
7878
LL | pub(crate) default static TD: u8;
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8080

8181
error: associated `static` items are not allowed
82-
--> $DIR/assoc-static-semantic-fail.rs:38:5
82+
--> $DIR/assoc-static-semantic-fail.rs:39:5
8383
|
8484
LL | static TA: u8 = 0;
8585
| ^^^^^^^^^^^^^^^^^^
8686

8787
error: associated `static` items are not allowed
88-
--> $DIR/assoc-static-semantic-fail.rs:40:5
88+
--> $DIR/assoc-static-semantic-fail.rs:41:5
8989
|
9090
LL | static TB: u8;
9191
| ^^^^^^^^^^^^^^
9292

9393
error: a static item cannot be `default`
94-
--> $DIR/assoc-static-semantic-fail.rs:43:5
94+
--> $DIR/assoc-static-semantic-fail.rs:44:5
9595
|
9696
LL | default static TC: u8 = 0;
9797
| ^^^^^^^ `default` because of this
9898
|
9999
= note: only associated `fn`, `const`, and `type` items can be `default`
100100

101101
error: associated `static` items are not allowed
102-
--> $DIR/assoc-static-semantic-fail.rs:43:5
102+
--> $DIR/assoc-static-semantic-fail.rs:44:5
103103
|
104104
LL | default static TC: u8 = 0;
105105
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
106106

107107
error: a static item cannot be `default`
108-
--> $DIR/assoc-static-semantic-fail.rs:46:9
108+
--> $DIR/assoc-static-semantic-fail.rs:47:9
109109
|
110110
LL | pub default static TD: u8;
111111
| ^^^^^^^ `default` because of this
112112
|
113113
= note: only associated `fn`, `const`, and `type` items can be `default`
114114

115115
error: associated `static` items are not allowed
116-
--> $DIR/assoc-static-semantic-fail.rs:46:5
116+
--> $DIR/assoc-static-semantic-fail.rs:47:5
117117
|
118118
LL | pub default static TD: u8;
119119
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
120120

121121
error: associated constant in `impl` without body
122-
--> $DIR/assoc-static-semantic-fail.rs:11:5
122+
--> $DIR/assoc-static-semantic-fail.rs:12:5
123123
|
124124
LL | static IB: u8;
125125
| ^^^^^^^^^^^^^-
126126
| |
127127
| help: provide a definition for the constant: `= <expr>;`
128128

129129
error: associated constant in `impl` without body
130-
--> $DIR/assoc-static-semantic-fail.rs:17:5
130+
--> $DIR/assoc-static-semantic-fail.rs:18:5
131131
|
132132
LL | pub(crate) default static ID: u8;
133133
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
134134
| |
135135
| help: provide a definition for the constant: `= <expr>;`
136136

137137
error[E0449]: unnecessary visibility qualifier
138-
--> $DIR/assoc-static-semantic-fail.rs:31:5
138+
--> $DIR/assoc-static-semantic-fail.rs:32:5
139139
|
140140
LL | pub(crate) default static TD: u8;
141141
| ^^^^^^^^^^
142142

143143
error: associated constant in `impl` without body
144-
--> $DIR/assoc-static-semantic-fail.rs:40:5
144+
--> $DIR/assoc-static-semantic-fail.rs:41:5
145145
|
146146
LL | static TB: u8;
147147
| ^^^^^^^^^^^^^-
148148
| |
149149
| help: provide a definition for the constant: `= <expr>;`
150150

151151
error: associated constant in `impl` without body
152-
--> $DIR/assoc-static-semantic-fail.rs:46:5
152+
--> $DIR/assoc-static-semantic-fail.rs:47:5
153153
|
154154
LL | pub default static TD: u8;
155155
| ^^^^^^^^^^^^^^^^^^^^^^^^^-
156156
| |
157157
| help: provide a definition for the constant: `= <expr>;`
158158

159159
error[E0449]: unnecessary visibility qualifier
160-
--> $DIR/assoc-static-semantic-fail.rs:46:5
160+
--> $DIR/assoc-static-semantic-fail.rs:47:5
161161
|
162162
LL | pub default static TD: u8;
163163
| ^^^ `pub` not permitted here because it's implied
164164

165-
error: aborting due to 24 previous errors
165+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
166+
--> $DIR/assoc-static-semantic-fail.rs:3:12
167+
|
168+
LL | #![feature(specialization)]
169+
| ^^^^^^^^^^^^^^
170+
|
171+
= note: `#[warn(incomplete_features)]` on by default
172+
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
173+
174+
error: aborting due to 24 previous errors; 1 warning emitted
166175

167176
For more information about this error, try `rustc --explain E0449`.

src/test/ui/parser/default.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Test successful and unsuccessful parsing of the `default` contextual keyword
22

33
#![feature(specialization)]
4+
//~^ WARN the feature `specialization` is incomplete
45

56
trait Foo {
67
fn foo<T: Default>() -> T;

0 commit comments

Comments
 (0)