summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/type-dependent/type-mismatch.rs
blob: 3335ab870f49f9c1120f7b784aa2158bbb03dd89 (plain)
1
2
3
4
5
6
7
8
9
10
// revisions: full min
struct R;

impl R {
    fn method<const N: u8>(&self) -> u8 { N }
}
fn main() {
    assert_eq!(R.method::<1u16>(), 1);
    //~^ ERROR mismatched types
}