-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #96736 - oli-obk:tait_missing_wf_check, r=davidtwco
Check hidden types for well formedness at the definition site instead of only at the opaque type itself work towards #90409 . We'll need to look into closure and generator bodies of closures and generators nested inside the hidden type in order to fix that. In hindsight this PR is not necessary for that, but it may be a bit easier with it and we'll get better diagnostics from it on its own.
- Loading branch information
Showing
32 changed files
with
301 additions
and
140 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
6 changes: 3 additions & 3 deletions
6
src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr
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
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
6 changes: 3 additions & 3 deletions
6
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr
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
29 changes: 14 additions & 15 deletions
29
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.stderr
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 |
---|---|---|
@@ -1,26 +1,25 @@ | ||
error: concrete type differs from previous defining opaque type use | ||
--> $DIR/generic_duplicate_param_use3.rs:16:5 | ||
| | ||
LL | u | ||
| ^ expected `T`, got `U` | ||
| | ||
note: previous use here | ||
--> $DIR/generic_duplicate_param_use3.rs:12:5 | ||
| | ||
LL | t | ||
| ^ | ||
|
||
error[E0277]: `T` doesn't implement `Debug` | ||
--> $DIR/generic_duplicate_param_use3.rs:8:18 | ||
--> $DIR/generic_duplicate_param_use3.rs:11:5 | ||
| | ||
LL | type Two<T, U> = impl Debug; | ||
| ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` | ||
LL | t | ||
| ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` | ||
| | ||
help: consider restricting type parameter `T` | ||
| | ||
LL | type Two<T: std::fmt::Debug, U> = impl Debug; | ||
| +++++++++++++++++ | ||
|
||
error[E0277]: `U` doesn't implement `Debug` | ||
--> $DIR/generic_duplicate_param_use3.rs:16:5 | ||
| | ||
LL | u | ||
| ^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` | ||
| | ||
help: consider restricting type parameter `U` | ||
| | ||
LL | type Two<T, U: std::fmt::Debug> = impl Debug; | ||
| +++++++++++++++++ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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
6 changes: 3 additions & 3 deletions
6
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr
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
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
Oops, something went wrong.