]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-47309.rs
New upstream version 1.38.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-47309.rs
1 // Make sure that the mono-item collector does not crash when trying to
2 // instantiate a default impl of a method with lifetime parameters.
3 // See https://github.com/rust-lang/rust/issues/47309
4
5 // compile-flags:-Clink-dead-code
6 // build-pass (FIXME(62277): could be check-pass?)
7
8 #![crate_type="rlib"]
9
10 pub trait EnvFuture {
11 type Item;
12
13 fn boxed_result<'a>(self) where Self: Sized, Self::Item: 'a, {
14 }
15 }
16
17 struct Foo;
18
19 impl<'a> EnvFuture for &'a Foo {
20 type Item = ();
21 }