Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8021b29

Browse files
committed
Add a test for rust-lang#3006
1 parent 829dbfa commit 8021b29

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/source/trait.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,12 @@ trait FooBar = Foo
9797
auto trait Example {}
9898
pub auto trait PubExample {}
9999
pub unsafe auto trait PubUnsafeExample {}
100+
101+
// #3006
102+
trait Foo<'a> {
103+
type Bar< 'a >;
104+
}
105+
106+
impl<'a> Foo<'a> for i32 {
107+
type Bar< 'a > = i32;
108+
}

tests/target/trait.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,12 @@ trait FooBar = Foo
135135
auto trait Example {}
136136
pub auto trait PubExample {}
137137
pub unsafe auto trait PubUnsafeExample {}
138+
139+
// #3006
140+
trait Foo<'a> {
141+
type Bar<'a>;
142+
}
143+
144+
impl<'a> Foo<'a> for i32 {
145+
type Bar<'a> = i32;
146+
}

0 commit comments

Comments
 (0)