diff options
Diffstat (limited to 'tests/ui/rfc-2632-const-trait-impl/inherent-impl.rs')
-rw-r--r-- | tests/ui/rfc-2632-const-trait-impl/inherent-impl.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/rfc-2632-const-trait-impl/inherent-impl.rs b/tests/ui/rfc-2632-const-trait-impl/inherent-impl.rs new file mode 100644 index 000000000..afd0d137b --- /dev/null +++ b/tests/ui/rfc-2632-const-trait-impl/inherent-impl.rs @@ -0,0 +1,13 @@ +#![feature(const_trait_impl)] +#![allow(bare_trait_objects)] + +struct S; +trait T {} + +impl const S {} +//~^ ERROR inherent impls cannot be `const` + +impl const T {} +//~^ ERROR inherent impls cannot be `const` + +fn main() {} |