mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
add regression test
This commit is contained in:
parent
73936ab57a
commit
ab6ea2bba7
25
src/test/pretty/gat-bounds.pp
Normal file
25
src/test/pretty/gat-bounds.pp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Check that associated types print generic parameters and where clauses.
|
||||||
|
// See issue #67509.
|
||||||
|
|
||||||
|
// pretty-compare-only
|
||||||
|
// pp-exact:gat-bounds.pp
|
||||||
|
|
||||||
|
#![feature(generic_associated_types)]
|
||||||
|
|
||||||
|
trait X {
|
||||||
|
type
|
||||||
|
Y<T>: Trait
|
||||||
|
where
|
||||||
|
Self: Sized;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl X for () {
|
||||||
|
type
|
||||||
|
Y<T>
|
||||||
|
where
|
||||||
|
Self: Sized
|
||||||
|
=
|
||||||
|
u32;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() { }
|
17
src/test/pretty/gat-bounds.rs
Normal file
17
src/test/pretty/gat-bounds.rs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Check that associated types print generic parameters and where clauses.
|
||||||
|
// See issue #67509.
|
||||||
|
|
||||||
|
// pretty-compare-only
|
||||||
|
// pp-exact:gat-bounds.pp
|
||||||
|
|
||||||
|
#![feature(generic_associated_types)]
|
||||||
|
|
||||||
|
trait X {
|
||||||
|
type Y<T>: Trait where Self: Sized;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl X for () {
|
||||||
|
type Y<T> where Self: Sized = u32;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() { }
|
Loading…
Reference in New Issue
Block a user