diff options
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs')
-rw-r--r-- | tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs new file mode 100644 index 000000000..f8ac793e4 --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs @@ -0,0 +1,22 @@ +// check-pass +#![feature(const_trait_impl)] + +struct S; + +#[const_trait] +trait A {} +#[const_trait] +trait B {} + +impl const A for S {} +impl const B for S {} + +impl S { + const fn a<T: ~const A>() where T: ~const B { + + } +} + +const _: () = S::a::<S>(); + +fn main() {} |