diff options
Diffstat (limited to 'src/test/ui/typeck/issue-90319.rs')
-rw-r--r-- | src/test/ui/typeck/issue-90319.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/typeck/issue-90319.rs b/src/test/ui/typeck/issue-90319.rs new file mode 100644 index 000000000..57e6ac7cf --- /dev/null +++ b/src/test/ui/typeck/issue-90319.rs @@ -0,0 +1,17 @@ +struct Wrapper<T>(T); + +trait Trait { + fn method(&self) {} +} + +impl<'a, T> Trait for Wrapper<&'a T> where Wrapper<T>: Trait {} + +fn get<T>() -> T { + unimplemented!() +} + +fn main() { + let thing = get::<Thing>();//~ERROR cannot find type `Thing` in this scope [E0412] + let wrapper = Wrapper(thing); + Trait::method(&wrapper); +} |