about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/self/self-ctor-inner-const.rs17
-rw-r--r--tests/ui/self/self-ctor-inner-const.stderr33
2 files changed, 0 insertions, 50 deletions
diff --git a/tests/ui/self/self-ctor-inner-const.rs b/tests/ui/self/self-ctor-inner-const.rs
deleted file mode 100644
index b015397a5bc..00000000000
--- a/tests/ui/self/self-ctor-inner-const.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Verify that we ban usage of `Self` as constructor from inner items.
-
-struct S0<T>(T);
-
-impl<T> S0<T> {
-    fn foo() {
-        const C: S0<u8> = Self(0);
-        //~^ ERROR can't use generic parameters from outer function
-        fn bar() -> Self {
-            //~^ ERROR can't use generic parameters from outer function
-            Self(0)
-            //~^ ERROR can't use generic parameters from outer function
-        }
-    }
-}
-
-fn main() {}
diff --git a/tests/ui/self/self-ctor-inner-const.stderr b/tests/ui/self/self-ctor-inner-const.stderr
deleted file mode 100644
index 7287c64c659..00000000000
--- a/tests/ui/self/self-ctor-inner-const.stderr
+++ /dev/null
@@ -1,33 +0,0 @@
-error[E0401]: can't use generic parameters from outer function
-  --> $DIR/self-ctor-inner-const.rs:7:27
-   |
-LL |         const C: S0<u8> = Self(0);
-   |                           ^^^^
-   |                           |
-   |                           use of generic parameter from outer function
-   |                           can't use `Self` here
-
-error[E0401]: can't use generic parameters from outer function
-  --> $DIR/self-ctor-inner-const.rs:9:21
-   |
-LL | impl<T> S0<T> {
-   | ---- `Self` type implicitly declared here, by this `impl`
-...
-LL |         fn bar() -> Self {
-   |                     ^^^^
-   |                     |
-   |                     use of generic parameter from outer function
-   |                     use a type here instead
-
-error[E0401]: can't use generic parameters from outer function
-  --> $DIR/self-ctor-inner-const.rs:11:13
-   |
-LL |             Self(0)
-   |             ^^^^
-   |             |
-   |             use of generic parameter from outer function
-   |             can't use `Self` here
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0401`.