diff options
Diffstat (limited to 'tests/ui/const-generics/mgca/ambiguous-assoc-const.rs')
| -rw-r--r-- | tests/ui/const-generics/mgca/ambiguous-assoc-const.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs b/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs new file mode 100644 index 00000000000..d7df9c22afd --- /dev/null +++ b/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs @@ -0,0 +1,15 @@ +#![feature(min_generic_const_args)] +#![expect(incomplete_features)] + +trait Tr { + const N: usize; +} + +struct Blah<const N: usize>; + +fn foo() -> Blah<{ Tr::N }> { + //~^ ERROR ambiguous associated constant + todo!() +} + +fn main() {} |
