diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/use_self.rs | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/tests/ui/use_self.rs b/tests/ui/use_self.rs index a01cb3e7021..f3bd4a05005 100644 --- a/tests/ui/use_self.rs +++ b/tests/ui/use_self.rs @@ -242,6 +242,28 @@ mod macros { } } +mod nesting { + struct Foo {} + impl Foo { + fn foo() { + use self::Foo; // Can't use Self here + struct Bar { + foo: Foo, // Foo != Self + } + } + } + + enum Enum { + A, + } + impl Enum { + fn method() { + use self::Enum::*; + static STATIC: Enum = Enum::A; // Can't use Self as type + } + } +} + mod issue3410 { struct A; @@ -255,14 +277,3 @@ mod issue3410 { fn a(_: Vec<A>) {} } } - -mod issue3425 { - enum Enum { - A, - } - impl Enum { - fn a() { - use self::Enum::*; - } - } -} |
