]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/associated-type-lifetime-ice.rs
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / associated-type-lifetime-ice.rs
CommitLineData
6a06907d
XL
1// failure-status: 101
2// rustc-env:RUST_BACKTRACE=0
3// normalize-stderr-test "note: .*\n\n" -> ""
4// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
5
6// compile-flags: --crate-type=rlib
7
8// Regression test for https://github.com/rust-lang/rust/issues/78450
9
10#![feature(min_type_alias_impl_trait)]
11#![no_std]
12
13pub trait AssociatedImpl {
14 type ImplTrait;
15
16 fn f() -> Self::ImplTrait;
17}
18
19struct S<T>(T);
20
21trait Associated {
22 type A;
23}
24
25// ICE
26impl<'a, T: Associated<A = &'a ()>> AssociatedImpl for S<T> {
27 type ImplTrait = impl core::fmt::Debug;
28
29 fn f() -> Self::ImplTrait {
30 //~^ ERROR unexpected concrete region in borrowck: ReEarlyBound(0, 'a)
31 ()
32 }
33}