diff options
Diffstat (limited to 'tests/ui/feature-gates/feature-gate-inherent_associated_types.rs')
-rw-r--r-- | tests/ui/feature-gates/feature-gate-inherent_associated_types.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/feature-gates/feature-gate-inherent_associated_types.rs b/tests/ui/feature-gates/feature-gate-inherent_associated_types.rs new file mode 100644 index 000000000..fc7c6dbc0 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-inherent_associated_types.rs @@ -0,0 +1,10 @@ +// Test that inherent associated types cannot be used when inherent_associated_types +// feature gate is not used. + +struct Foo; + +impl Foo { + type Bar = isize; //~ERROR inherent associated types are unstable +} + +fn main() {} |