diff options
| author | Mikhail Babenko <misha-babenko@yandex.ru> | 2020-02-07 05:17:38 +0300 |
|---|---|---|
| committer | Mikhail Babenko <misha-babenko@yandex.ru> | 2020-02-07 18:18:07 +0300 |
| commit | ab6ea2bba771836ebbf8759e718fedd2c6d229d2 (patch) | |
| tree | e3387c4bcc6b3076047ed198fa05e95e03c21ca3 /src/test/pretty | |
| parent | 73936ab57ad567802a613157ae9db0cccf31eda3 (diff) | |
| download | rust-ab6ea2bba771836ebbf8759e718fedd2c6d229d2.tar.gz rust-ab6ea2bba771836ebbf8759e718fedd2c6d229d2.zip | |
add regression test
Diffstat (limited to 'src/test/pretty')
| -rw-r--r-- | src/test/pretty/gat-bounds.pp | 25 | ||||
| -rw-r--r-- | src/test/pretty/gat-bounds.rs | 17 |
2 files changed, 42 insertions, 0 deletions
diff --git a/src/test/pretty/gat-bounds.pp b/src/test/pretty/gat-bounds.pp new file mode 100644 index 00000000000..0c95add4901 --- /dev/null +++ b/src/test/pretty/gat-bounds.pp @@ -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() { } diff --git a/src/test/pretty/gat-bounds.rs b/src/test/pretty/gat-bounds.rs new file mode 100644 index 00000000000..1275f432a3c --- /dev/null +++ b/src/test/pretty/gat-bounds.rs @@ -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() { } |
