Skip to content

Commit 441c1a6

Browse files
committed
Bless tests.
1 parent 2e0a80c commit 441c1a6

7 files changed

+216
-199
lines changed

src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr

+84-84
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,3 @@
1-
error[E0261]: use of undeclared lifetime name `'a`
2-
--> $DIR/feature-gate-in_band_lifetimes.rs:50:14
3-
|
4-
LL | impl MyTrait<'a> for Y<&'a u8> {
5-
| - ^^ undeclared lifetime
6-
| |
7-
| help: consider introducing lifetime `'a` here: `<'a>`
8-
|
9-
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
10-
11-
error[E0261]: use of undeclared lifetime name `'a`
12-
--> $DIR/feature-gate-in_band_lifetimes.rs:50:25
13-
|
14-
LL | impl MyTrait<'a> for Y<&'a u8> {
15-
| - ^^ undeclared lifetime
16-
| |
17-
| help: consider introducing lifetime `'a` here: `<'a>`
18-
|
19-
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
20-
21-
error[E0261]: use of undeclared lifetime name `'a`
22-
--> $DIR/feature-gate-in_band_lifetimes.rs:53:31
23-
|
24-
LL | fn my_lifetime(&self) -> &'a u8 { self.0 }
25-
| ^^ undeclared lifetime
26-
|
27-
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
28-
help: consider introducing lifetime `'a` here
29-
|
30-
LL | impl<'a> MyTrait<'a> for Y<&'a u8> {
31-
| ++++
32-
help: consider introducing lifetime `'a` here
33-
|
34-
LL | fn my_lifetime<'a>(&self) -> &'a u8 { self.0 }
35-
| ++++
36-
37-
error[E0261]: use of undeclared lifetime name `'b`
38-
--> $DIR/feature-gate-in_band_lifetimes.rs:55:27
39-
|
40-
LL | fn any_lifetime() -> &'b u8 { &0 }
41-
| ^^ undeclared lifetime
42-
|
43-
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
44-
help: consider introducing lifetime `'b` here
45-
|
46-
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
47-
| ++++
48-
help: consider introducing lifetime `'b` here
49-
|
50-
LL | fn any_lifetime<'b>() -> &'b u8 { &0 }
51-
| ++++
52-
53-
error[E0261]: use of undeclared lifetime name `'b`
54-
--> $DIR/feature-gate-in_band_lifetimes.rs:57:27
55-
|
56-
LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
57-
| ^^ undeclared lifetime
58-
|
59-
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
60-
help: consider introducing lifetime `'b` here
61-
|
62-
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
63-
| ++++
64-
help: consider introducing lifetime `'b` here
65-
|
66-
LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
67-
| ++++
68-
69-
error[E0261]: use of undeclared lifetime name `'b`
70-
--> $DIR/feature-gate-in_band_lifetimes.rs:57:40
71-
|
72-
LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
73-
| ^^ undeclared lifetime
74-
|
75-
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
76-
help: consider introducing lifetime `'b` here
77-
|
78-
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
79-
| ++++
80-
help: consider introducing lifetime `'b` here
81-
|
82-
LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
83-
| ++++
84-
851
error[E0261]: use of undeclared lifetime name `'x`
862
--> $DIR/feature-gate-in_band_lifetimes.rs:3:12
873
|
@@ -178,6 +94,90 @@ help: consider introducing lifetime `'a` here
17894
LL | fn inner<'a>(&self) -> &'a u8 {
17995
| ++++
18096

97+
error[E0261]: use of undeclared lifetime name `'a`
98+
--> $DIR/feature-gate-in_band_lifetimes.rs:50:14
99+
|
100+
LL | impl MyTrait<'a> for Y<&'a u8> {
101+
| - ^^ undeclared lifetime
102+
| |
103+
| help: consider introducing lifetime `'a` here: `<'a>`
104+
|
105+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
106+
107+
error[E0261]: use of undeclared lifetime name `'a`
108+
--> $DIR/feature-gate-in_band_lifetimes.rs:50:25
109+
|
110+
LL | impl MyTrait<'a> for Y<&'a u8> {
111+
| - ^^ undeclared lifetime
112+
| |
113+
| help: consider introducing lifetime `'a` here: `<'a>`
114+
|
115+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
116+
117+
error[E0261]: use of undeclared lifetime name `'a`
118+
--> $DIR/feature-gate-in_band_lifetimes.rs:53:31
119+
|
120+
LL | fn my_lifetime(&self) -> &'a u8 { self.0 }
121+
| ^^ undeclared lifetime
122+
|
123+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
124+
help: consider introducing lifetime `'a` here
125+
|
126+
LL | impl<'a> MyTrait<'a> for Y<&'a u8> {
127+
| ++++
128+
help: consider introducing lifetime `'a` here
129+
|
130+
LL | fn my_lifetime<'a>(&self) -> &'a u8 { self.0 }
131+
| ++++
132+
133+
error[E0261]: use of undeclared lifetime name `'b`
134+
--> $DIR/feature-gate-in_band_lifetimes.rs:55:27
135+
|
136+
LL | fn any_lifetime() -> &'b u8 { &0 }
137+
| ^^ undeclared lifetime
138+
|
139+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
140+
help: consider introducing lifetime `'b` here
141+
|
142+
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
143+
| ++++
144+
help: consider introducing lifetime `'b` here
145+
|
146+
LL | fn any_lifetime<'b>() -> &'b u8 { &0 }
147+
| ++++
148+
149+
error[E0261]: use of undeclared lifetime name `'b`
150+
--> $DIR/feature-gate-in_band_lifetimes.rs:57:27
151+
|
152+
LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
153+
| ^^ undeclared lifetime
154+
|
155+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
156+
help: consider introducing lifetime `'b` here
157+
|
158+
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
159+
| ++++
160+
help: consider introducing lifetime `'b` here
161+
|
162+
LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
163+
| ++++
164+
165+
error[E0261]: use of undeclared lifetime name `'b`
166+
--> $DIR/feature-gate-in_band_lifetimes.rs:57:40
167+
|
168+
LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
169+
| ^^ undeclared lifetime
170+
|
171+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
172+
help: consider introducing lifetime `'b` here
173+
|
174+
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
175+
| ++++
176+
help: consider introducing lifetime `'b` here
177+
|
178+
LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
179+
| ++++
180+
181181
error[E0261]: use of undeclared lifetime name `'b`
182182
--> $DIR/feature-gate-in_band_lifetimes.rs:43:27
183183
|

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ fn foo<T>() {
55

66
impl<T> Drop for Foo<T> {
77
//~^ ERROR this struct takes 0 generic arguments but 1 generic argument
8-
//~| ERROR the type parameter `T` is not constrained by the impl trait, self type, or predicates
98
fn drop(&mut self) {}
109
}
1110
}
12-
fn main() { }
11+
fn main() {}

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

+2-8
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,7 @@ note: struct defined here, with 0 generic parameters
2323
LL | struct Foo {
2424
| ^^^
2525

26-
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
27-
--> $DIR/issue-3214.rs:6:10
28-
|
29-
LL | impl<T> Drop for Foo<T> {
30-
| ^ unconstrained type parameter
31-
32-
error: aborting due to 3 previous errors
26+
error: aborting due to 2 previous errors
3327

34-
Some errors have detailed explanations: E0107, E0207, E0401.
28+
Some errors have detailed explanations: E0107, E0401.
3529
For more information about an error, try `rustc --explain E0107`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// aux-build:unstable_generic_param.rs
2+
#![feature(unstable_default6)]
3+
4+
extern crate unstable_generic_param;
5+
6+
use unstable_generic_param::*;
7+
8+
struct R;
9+
10+
impl Trait1 for S {
11+
fn foo() -> () { () } // ok
12+
}
13+
14+
struct S;
15+
16+
impl Trait1<usize> for S { //~ ERROR use of unstable library feature 'unstable_default'
17+
fn foo() -> usize { 0 }
18+
}
19+
20+
impl Trait1<isize> for S { //~ ERROR use of unstable library feature 'unstable_default'
21+
fn foo() -> isize { 0 }
22+
}
23+
24+
impl Trait2<usize> for S { //~ ERROR use of unstable library feature 'unstable_default'
25+
fn foo() -> usize { 0 }
26+
}
27+
28+
impl Trait3<usize> for S {
29+
fn foo() -> usize { 0 } // ok
30+
}
31+
32+
fn main() {
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
error[E0658]: use of unstable library feature 'unstable_default'
2+
--> $DIR/generics-default-stability-trait.rs:16:13
3+
|
4+
LL | impl Trait1<usize> for S {
5+
| ^^^^^
6+
|
7+
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
8+
9+
error[E0658]: use of unstable library feature 'unstable_default'
10+
--> $DIR/generics-default-stability-trait.rs:20:13
11+
|
12+
LL | impl Trait1<isize> for S {
13+
| ^^^^^
14+
|
15+
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
16+
17+
error[E0658]: use of unstable library feature 'unstable_default'
18+
--> $DIR/generics-default-stability-trait.rs:24:13
19+
|
20+
LL | impl Trait2<usize> for S {
21+
| ^^^^^
22+
|
23+
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
24+
25+
error: aborting due to 3 previous errors
26+
27+
For more information about this error, try `rustc --explain E0658`.

src/test/ui/stability-attribute/generics-default-stability.rs

-12
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ impl Trait1 for S {
1313

1414
struct S;
1515

16-
impl Trait1<usize> for S { //~ ERROR use of unstable library feature 'unstable_default'
17-
fn foo() -> usize { 0 }
18-
}
19-
20-
impl Trait1<isize> for S { //~ ERROR use of unstable library feature 'unstable_default'
21-
fn foo() -> isize { 0 }
22-
}
23-
24-
impl Trait2<usize> for S { //~ ERROR use of unstable library feature 'unstable_default'
25-
fn foo() -> usize { 0 }
26-
}
27-
2816
impl Trait3<usize> for S {
2917
fn foo() -> usize { 0 } // ok
3018
}

0 commit comments

Comments
 (0)