mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 21:55:31 +00:00
18 lines
339 B
Rust
18 lines
339 B
Rust
// Regression test for <github.com/rust-lang/rust/issues/145185>.
|
|
|
|
mod module {
|
|
pub trait Trait {
|
|
fn method(&self);
|
|
}
|
|
}
|
|
|
|
// Note that we do not import Trait
|
|
use std::ops::Deref;
|
|
|
|
fn foo(x: impl Deref<Target: module::Trait>) {
|
|
x.method();
|
|
//~^ ERROR no method named `method` found for type parameter
|
|
}
|
|
|
|
fn main() {}
|