mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Update existing UI tests
This commit is contained in:
parent
6636916b66
commit
55aba32ac5
@ -1,7 +1,12 @@
|
||||
#![feature(generic_const_items)]
|
||||
#![allow(incomplete_features, dead_code)]
|
||||
|
||||
// check-pass
|
||||
|
||||
trait Foo<T> {
|
||||
const BAR: bool
|
||||
where //~ ERROR: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found keyword `where`
|
||||
Self: Sized;
|
||||
where
|
||||
Self: Sized;
|
||||
}
|
||||
|
||||
trait Cake {}
|
||||
|
@ -1,15 +0,0 @@
|
||||
error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found keyword `where`
|
||||
--> $DIR/assoc_const_bounds.rs:3:9
|
||||
|
|
||||
LL | trait Foo<T> {
|
||||
| - while parsing this item list starting here
|
||||
LL | const BAR: bool
|
||||
| - expected one of 7 possible tokens
|
||||
LL | where
|
||||
| ^^^^^ unexpected token
|
||||
LL | Self: Sized;
|
||||
LL | }
|
||||
| - the item list ends here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,7 +1,12 @@
|
||||
#![feature(generic_const_items)]
|
||||
#![allow(incomplete_features, dead_code)]
|
||||
|
||||
// check-pass
|
||||
|
||||
trait Foo {
|
||||
const BAR: bool
|
||||
where //~ ERROR: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found keyword `where`
|
||||
Self: Sized;
|
||||
where
|
||||
Self: Sized;
|
||||
}
|
||||
|
||||
fn foo(_: &dyn Foo) {}
|
||||
|
@ -1,15 +0,0 @@
|
||||
error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found keyword `where`
|
||||
--> $DIR/assoc_const_bounds_sized.rs:3:9
|
||||
|
|
||||
LL | trait Foo {
|
||||
| - while parsing this item list starting here
|
||||
LL | const BAR: bool
|
||||
| - expected one of 7 possible tokens
|
||||
LL | where
|
||||
| ^^^^^ unexpected token
|
||||
LL | Self: Sized;
|
||||
LL | }
|
||||
| - the item list ends here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:2:14
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:6:14
|
||||
|
|
||||
LL | const A: &str = "";
|
||||
| ^ expected named lifetime parameter
|
||||
@ -11,7 +11,7 @@ LL ~ const A: &'a str = "";
|
||||
|
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:3:14
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:7:14
|
||||
|
|
||||
LL | const B: S = S { s: &() };
|
||||
| ^ expected named lifetime parameter
|
||||
@ -24,7 +24,7 @@ LL ~ const B: S<'a> = S { s: &() };
|
||||
|
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:4:15
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:8:15
|
||||
|
|
||||
LL | const C: &'_ str = "";
|
||||
| ^^ expected named lifetime parameter
|
||||
@ -38,7 +38,7 @@ LL ~ const C: &'a str = "";
|
||||
|
|
||||
|
||||
error[E0106]: missing lifetime specifiers
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:5:14
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:9:14
|
||||
|
|
||||
LL | const D: T = T { a: &(), b: &() };
|
||||
| ^ expected 2 lifetime parameters
|
@ -0,0 +1,47 @@
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:6:14
|
||||
|
|
||||
LL | const A: &str = "";
|
||||
| ^ expected named lifetime parameter
|
||||
|
|
||||
help: consider introducing a named lifetime parameter
|
||||
|
|
||||
LL | const A<'a>: &'a str = "";
|
||||
| ++++ ++
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:7:14
|
||||
|
|
||||
LL | const B: S = S { s: &() };
|
||||
| ^ expected named lifetime parameter
|
||||
|
|
||||
help: consider introducing a named lifetime parameter
|
||||
|
|
||||
LL | const B<'a>: S<'a> = S { s: &() };
|
||||
| ++++ ++++
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:8:15
|
||||
|
|
||||
LL | const C: &'_ str = "";
|
||||
| ^^ expected named lifetime parameter
|
||||
|
|
||||
help: consider introducing a named lifetime parameter
|
||||
|
|
||||
LL | const C<'a>: &'a str = "";
|
||||
| ++++ ~~
|
||||
|
||||
error[E0106]: missing lifetime specifiers
|
||||
--> $DIR/missing-lifetime-in-assoc-const-type.rs:9:14
|
||||
|
|
||||
LL | const D: T = T { a: &(), b: &() };
|
||||
| ^ expected 2 lifetime parameters
|
||||
|
|
||||
help: consider introducing a named lifetime parameter
|
||||
|
|
||||
LL | const D<'a>: T<'a, 'a> = T { a: &(), b: &() };
|
||||
| ++++ ++++++++
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0106`.
|
@ -1,3 +1,7 @@
|
||||
// revisions: default generic_const_items
|
||||
|
||||
#![cfg_attr(generic_const_items, feature(generic_const_items), allow(incomplete_features))]
|
||||
|
||||
trait ZstAssert: Sized {
|
||||
const A: &str = ""; //~ ERROR missing lifetime specifier
|
||||
const B: S = S { s: &() }; //~ ERROR missing lifetime specifier
|
||||
|
Loading…
Reference in New Issue
Block a user