Remove related tests

This commit is contained in:
Yuki Okushi 2022-06-08 21:07:46 +09:00
parent 153f01e42c
commit 40913c6061
No known key found for this signature in database
GPG Key ID: 379CEEFDD63E5DD7
6 changed files with 3 additions and 60 deletions

View File

@ -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() { }

View File

@ -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`.

View File

@ -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> {

View File

@ -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> {
| ^^^^^^^

View File

@ -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() {}

View File

@ -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