]> git.lizzy.rs Git - rust.git/commitdiff
Remove related tests
authorYuki Okushi <jtitor@2k36.org>
Wed, 8 Jun 2022 12:07:46 +0000 (21:07 +0900)
committerYuki Okushi <jtitor@2k36.org>
Wed, 8 Jun 2022 12:11:15 +0000 (21:11 +0900)
src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.rs [deleted file]
src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.stderr [deleted file]
src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs
src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr
src/test/ui/rfc-2093-infer-outlives/infer-static.rs [deleted file]
src/test/ui/rfc-2093-infer-outlives/infer-static.stderr [deleted file]

diff --git a/src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.rs b/src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.rs
deleted file mode 100644 (file)
index 65792a7..0000000
+++ /dev/null
@@ -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() { }
diff --git a/src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.stderr b/src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.stderr
deleted file mode 100644 (file)
index 7ffebab..0000000
+++ /dev/null
@@ -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`.
index 5297d0d9842e28835b5da3be1a2fc913a8925fbb..d3940b13b11ae71bdd418db61fdf92cae93f986b 100644 (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> {
index 950ffd6c89bd31ed2757c2d17d1a95b7ba628562..0c388f5fe411b14d111d5d52634b51ef03826da9 100644 (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> {
    |               ^^^^^^^
diff --git a/src/test/ui/rfc-2093-infer-outlives/infer-static.rs b/src/test/ui/rfc-2093-infer-outlives/infer-static.rs
deleted file mode 100644 (file)
index bd778e3..0000000
+++ /dev/null
@@ -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() {}
diff --git a/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr b/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr
deleted file mode 100644 (file)
index 6fbb7cf..0000000
+++ /dev/null
@@ -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
-