Skip to content

Instantly share code, notes, and snippets.

@nikomatsakis
Created June 15, 2021 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikomatsakis/95a0663584c575837f40d957c7c3c8ca to your computer and use it in GitHub Desktop.
Save nikomatsakis/95a0663584c575837f40d957c7c3c8ca to your computer and use it in GitHub Desktop.
// failure-status: 101
// rustc-env:RUST_BACKTRACE=0
// normalize-stderr-test "note: .*\n\n" -> ""
// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
// compile-flags: --crate-type=rlib
// Regression test for https://github.com/rust-lang/rust/issues/78450
#![feature(min_type_alias_impl_trait)]
pub trait AssociatedImpl {
type ImplTrait;
fn f() -> Self::ImplTrait;
}
struct S<T>(T);
trait Associated {
type A;
}
// ICE
impl<'a, T: Associated<A = &'a ()>> AssociatedImpl for S<T> {
type ImplTrait = impl core::fmt::Debug;
fn f() -> Self::ImplTrait {
//~^ ERROR unexpected concrete region in borrowck: ReEarlyBound(0, 'a)
()
}
}
fn main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment