Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Add ICE from Issue 85113 #746

Merged
merged 1 commit into from
May 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ices/85113.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#![feature(min_type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)]

type OpaqueOutputImpl<'a> = impl Output<'a> + 'a;

trait Output<'a> {}

impl<'a> Output<'a> for &'a str {}

fn cool_fn<'a>(arg: &'a str) -> OpaqueOutputImpl<'a> {
let out: OpaqueOutputImpl<'a> = arg;
arg // This was supposed to be `out`
}

fn main() {
let s = String::from("wassup");
cool_fn(&s);
}