diff options
| author | kadmin <julianknodt@gmail.com> | 2022-01-26 17:02:58 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2022-01-28 00:25:36 +0000 |
| commit | bd03d8167f856044df6430f1dd69142f7511aca8 (patch) | |
| tree | c7a85a4397297096fb24bb75ba5862d498c2caf0 /src | |
| parent | 1c4fe64bdcb0cc27c91c5405430f0ca189fcd065 (diff) | |
Remove generalization over projection
Instead, just use a term everywhere.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/associated-consts/assoc-const-ty-mismatch.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/ui/associated-consts/assoc-const-ty-mismatch.rs b/src/test/ui/associated-consts/assoc-const-ty-mismatch.rs new file mode 100644 index 00000000000..53e49e77b3e --- /dev/null +++ b/src/test/ui/associated-consts/assoc-const-ty-mismatch.rs @@ -0,0 +1,29 @@ +#![feature(associated_const_equality)] +#![allow(unused)] + +pub trait Foo { + const N: usize; +} + +pub trait FooTy { + type T; +} + +pub struct Bar; + +impl Foo for Bar { + const N: usize = 3; +} + +impl FooTy for Bar { + type T = usize; +} + + +fn foo<F: Foo<N=usize>>() {} +fn foo2<F: FooTy<T=3usize>>() {} + +fn main() { + foo::<Bar>(); + foo2::<Bar>(); +} |
