]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/trait-alias/issue-72415-assoc-const-resolve.rs
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / ui / traits / trait-alias / issue-72415-assoc-const-resolve.rs
1 // check-pass
2
3 #![feature(trait_alias)]
4
5 trait Bounded { const MAX: Self; }
6
7 impl Bounded for u32 {
8 // This should correctly resolve to the associated const in the inherent impl of u32.
9 const MAX: Self = u32::MAX;
10 }
11
12 trait Num = Bounded + Copy;
13
14 fn main() {}