diff options
Diffstat (limited to 'tests/ui/methods/method-call-lifetime-args-subst-index.rs')
-rw-r--r-- | tests/ui/methods/method-call-lifetime-args-subst-index.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/methods/method-call-lifetime-args-subst-index.rs b/tests/ui/methods/method-call-lifetime-args-subst-index.rs new file mode 100644 index 000000000..8df58a348 --- /dev/null +++ b/tests/ui/methods/method-call-lifetime-args-subst-index.rs @@ -0,0 +1,15 @@ +// build-pass (FIXME(62277): could be check-pass?) +#![allow(unused)] + +struct S; + +impl S { + fn early_and_type<'a, T>(self) -> &'a T { loop {} } +} + +fn test() { + S.early_and_type::<u16>(); +} + + +fn main() {} |