]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/type-dependent/type-mismatch.rs
Auto merge of #75207 - dylni:add-slice-check-range, r=KodrAus
[rust.git] / src / test / ui / const-generics / type-dependent / type-mismatch.rs
1 // revisions: full min
2 #![cfg_attr(full, feature(const_generics))]
3 #![cfg_attr(full, allow(incomplete_features))]
4 #![cfg_attr(min, feature(min_const_generics))]
5
6 struct R;
7
8 impl R {
9     fn method<const N: u8>(&self) -> u8 { N }
10 }
11 fn main() {
12     assert_eq!(R.method::<1u16>(), 1);
13     //~^ ERROR mismatched types
14 }