diff options
Diffstat (limited to 'tests/ui/self/self-ctor-inner-const.rs')
-rw-r--r-- | tests/ui/self/self-ctor-inner-const.rs | 17 |
1 files changed, 0 insertions, 17 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() {} |