rust/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.rs

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

24 lines
274 B
Rust
Raw Normal View History

#![feature(trivial_bounds)]
#![allow(unused)]
struct B;
trait A {
type X;
fn get_x() -> Self::X;
}
impl A for B {
type X = u8;
fn get_x() -> u8 { 0 }
}
fn global_bound_is_hidden() -> u8
where
B: A<X = i32>
{
B::get_x() //~ ERROR
}
fn main () {}