rust/tests/ui/issues/issue-33096.rs
2023-10-28 23:11:03 -07:00

19 lines
225 B
Rust

// run-pass
// compile-flags: -g
use std::ops::Deref;
trait Foo {
fn foo() {}
}
impl Foo for u8 {}
fn bar<T: Deref>() where T::Target: Foo {
<<T as Deref>::Target as Foo>::foo()
}
fn main() {
bar::<&u8>();
}