mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
17 lines
289 B
Rust
17 lines
289 B
Rust
![]() |
#![feature(associated_const_equality)]
|
||
|
|
||
|
// Issue 110549
|
||
|
|
||
|
pub trait TraitWAssocConst {
|
||
|
const A: usize;
|
||
|
}
|
||
|
|
||
|
fn foo<T: TraitWAssocConst<A = 32>>() {}
|
||
|
|
||
|
fn bar<T: TraitWAssocConst>() {
|
||
|
foo::<T>();
|
||
|
//~^ ERROR type mismatch resolving `<T as TraitWAssocConst>::A == 32`
|
||
|
}
|
||
|
|
||
|
fn main() {}
|