mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
20 lines
282 B
Rust
20 lines
282 B
Rust
// run-pass
|
|
// compile-flags: -g
|
|
// ignore-asmjs wasm2js does not support source maps yet
|
|
|
|
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>();
|
|
}
|