Skip to content

Commit e9d219e

Browse files
committed
Make the test actually show the problematic case
1 parent 90ec6f8 commit e9d219e

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
trait Mirror<'a> {
2-
type Item;
3-
}
1+
#![feature(type_alias_impl_trait)]
2+
3+
// known-bug: #99840
4+
// this should not compile
5+
// check-pass
6+
7+
type Alias = impl Sized;
48

5-
impl<'a, T> Mirror<'a> for T {
6-
type Item = T;
9+
fn constrain() -> Alias {
10+
1i32
711
}
812

9-
trait AnotherTrait {
10-
type Blah;
13+
trait HideIt {
14+
type Assoc;
1115
}
1216

13-
impl<'a> AnotherTrait for <u32 as Mirror<'a>>::Item {
14-
//~^ ERROR: the lifetime parameter `'a` is not constrained
15-
type Blah = &'a u32;
17+
impl HideIt for () {
18+
type Assoc = Alias;
1619
}
1720

21+
pub trait Yay {}
22+
23+
impl Yay for <() as HideIt>::Assoc {}
24+
// impl Yay for i32 {} // this already errors
25+
// impl Yay for u32 {} // this also already errors
26+
1827
fn main() {}

src/test/ui/type-alias-impl-trait/implied_lifetime_wf_check.stderr

-9
This file was deleted.

0 commit comments

Comments
 (0)