Skip to content

Commit ab6ea2b

Browse files
committed
add regression test
1 parent 73936ab commit ab6ea2b

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

src/test/pretty/gat-bounds.pp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Check that associated types print generic parameters and where clauses.
2+
// See issue #67509.
3+
4+
// pretty-compare-only
5+
// pp-exact:gat-bounds.pp
6+
7+
#![feature(generic_associated_types)]
8+
9+
trait X {
10+
type
11+
Y<T>: Trait
12+
where
13+
Self: Sized;
14+
}
15+
16+
impl X for () {
17+
type
18+
Y<T>
19+
where
20+
Self: Sized
21+
=
22+
u32;
23+
}
24+
25+
fn main() { }

src/test/pretty/gat-bounds.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Check that associated types print generic parameters and where clauses.
2+
// See issue #67509.
3+
4+
// pretty-compare-only
5+
// pp-exact:gat-bounds.pp
6+
7+
#![feature(generic_associated_types)]
8+
9+
trait X {
10+
type Y<T>: Trait where Self: Sized;
11+
}
12+
13+
impl X for () {
14+
type Y<T> where Self: Sized = u32;
15+
}
16+
17+
fn main() { }

0 commit comments

Comments
 (0)