Remove related tests
This commit is contained in:
parent
153f01e42c
commit
40913c6061
@ -1,12 +0,0 @@
|
||||
// Needs an explicit where clause stating outlives condition. (RFC 2093)
|
||||
|
||||
// Type T needs to outlive lifetime 'static.
|
||||
struct Foo<U> {
|
||||
bar: Bar<U> //~ ERROR the parameter type `U` may not live long enough [E0310]
|
||||
}
|
||||
struct Bar<T: 'static> {
|
||||
x: T,
|
||||
}
|
||||
|
||||
|
||||
fn main() { }
|
@ -1,19 +0,0 @@
|
||||
error[E0310]: the parameter type `U` may not live long enough
|
||||
--> $DIR/feature-gate-infer_static_outlives_requirements.rs:5:10
|
||||
|
|
||||
LL | bar: Bar<U>
|
||||
| ^^^^^^ ...so that the type `U` will meet its required lifetime bounds...
|
||||
|
|
||||
note: ...that is required by this bound
|
||||
--> $DIR/feature-gate-infer_static_outlives_requirements.rs:7:15
|
||||
|
|
||||
LL | struct Bar<T: 'static> {
|
||||
| ^^^^^^^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | struct Foo<U: 'static> {
|
||||
| +++++++++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0310`.
|
@ -1,7 +1,5 @@
|
||||
/*
|
||||
* We don't infer `T: 'static` outlives relationships by default.
|
||||
* Instead an additional feature gate `infer_static_outlives_requirements`
|
||||
* is required.
|
||||
* We don't infer `T: 'static` outlives relationships.
|
||||
*/
|
||||
|
||||
struct Foo<U> {
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0310]: the parameter type `U` may not live long enough
|
||||
--> $DIR/dont-infer-static.rs:8:10
|
||||
--> $DIR/dont-infer-static.rs:6:10
|
||||
|
|
||||
LL | bar: Bar<U>
|
||||
| ^^^^^^ ...so that the type `U` will meet its required lifetime bounds...
|
||||
|
|
||||
note: ...that is required by this bound
|
||||
--> $DIR/dont-infer-static.rs:10:15
|
||||
--> $DIR/dont-infer-static.rs:8:15
|
||||
|
|
||||
LL | struct Bar<T: 'static> {
|
||||
| ^^^^^^^
|
||||
|
@ -1,12 +0,0 @@
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(infer_static_outlives_requirements)]
|
||||
|
||||
#[rustc_outlives]
|
||||
struct Foo<U> { //~ ERROR rustc_outlives
|
||||
bar: Bar<U>
|
||||
}
|
||||
struct Bar<T: 'static> {
|
||||
x: T,
|
||||
}
|
||||
|
||||
fn main() {}
|
@ -1,12 +0,0 @@
|
||||
error: rustc_outlives
|
||||
--> $DIR/infer-static.rs:5:1
|
||||
|
|
||||
LL | / struct Foo<U> {
|
||||
LL | | bar: Bar<U>
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
= note: U: 'static
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
Reference in New Issue
Block a user