diff options
| author | Alexander Regueiro <alexreg@me.com> | 2018-12-18 00:40:22 +0000 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2018-12-26 21:54:18 +0000 |
| commit | 8eb1a9e4e7337dd17827e00f0e1d2e10f11de30c (patch) | |
| tree | f8f952c5bf48af13c7613aa3db015f9bc5670f8a /src/test/ui/mod-subitem-as-enum-variant.rs | |
| parent | 5a36f9e6e1eaf0330e499d15ab428350be837657 (diff) | |
| download | rust-8eb1a9e4e7337dd17827e00f0e1d2e10f11de30c.tar.gz rust-8eb1a9e4e7337dd17827e00f0e1d2e10f11de30c.zip | |
Added regression test for using generic parameters on modules.
Diffstat (limited to 'src/test/ui/mod-subitem-as-enum-variant.rs')
| -rw-r--r-- | src/test/ui/mod-subitem-as-enum-variant.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/mod-subitem-as-enum-variant.rs b/src/test/ui/mod-subitem-as-enum-variant.rs new file mode 100644 index 00000000000..ec809d44e94 --- /dev/null +++ b/src/test/ui/mod-subitem-as-enum-variant.rs @@ -0,0 +1,10 @@ + +mod Mod { + pub struct FakeVariant<T>(pub T); +} + +fn main() { + Mod::FakeVariant::<i32>(0); + Mod::<i32>::FakeVariant(0); + //~^ ERROR type arguments are not allowed on this entity [E0109] +} |
