rust/tests/ui/traits/alias/issue-72415-assoc-const-resolve.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
267 B
Rust
Raw Normal View History

// check-pass
#![feature(trait_alias)]
trait Bounded { const MAX: Self; }
impl Bounded for u32 {
// This should correctly resolve to the associated const in the inherent impl of u32.
const MAX: Self = u32::MAX;
}
trait Num = Bounded + Copy;
fn main() {}