-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #68913 - Areredify:gat_pretty, r=cramertj
Pretty-print generic params and where clauses on associated types closes #67509
- Loading branch information
Showing
4 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() { } |