forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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 rust-lang#123531 - compiler-errors:closure-wf, r=
Enforce closure args + return type are WF I found this out when investigating rust-lang#123461 (comment). Turns out we don't register WF obligations for closure args and return types, leading to the ICE. I think this is a useful thing to check for, but I'd like to check what the fallout is. Worst case, I think we should enforce this across an edition boundary (and possibly eventually migrate this for all editions).
- Loading branch information
Showing
11 changed files
with
75 additions
and
39 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
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,20 @@ | ||
error[E0277]: the trait bound `usize: Fsm` is not satisfied | ||
--> $DIR/issue-80409.rs:36:31 | ||
| | ||
LL | builder.state().on_entry(|_| {}); | ||
| ^ the trait `Fsm` is not implemented for `usize` | ||
| | ||
help: this trait has no implementations, consider adding one | ||
--> $DIR/issue-80409.rs:26:1 | ||
| | ||
LL | trait Fsm { | ||
| ^^^^^^^^^ | ||
note: required by a bound in `StateContext` | ||
--> $DIR/issue-80409.rs:30:31 | ||
| | ||
LL | struct StateContext<'a, TFsm: Fsm> { | ||
| ^^^ required by this bound in `StateContext` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
error: internal compiler error: error performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: ImpliedOutlivesBounds { ty: &'?2 mut StateContext<'?3, usize> } } | ||
--> $DIR/issue-80409.rs:49:30 | ||
error[E0277]: the trait bound `usize: Fsm` is not satisfied | ||
--> $DIR/issue-80409.rs:36:31 | ||
| | ||
LL | builder.state().on_entry(|_| {}); | ||
| ^^^ | ||
| ^ the trait `Fsm` is not implemented for `usize` | ||
| | ||
note: | ||
--> $DIR/issue-80409.rs:49:30 | ||
help: this trait has no implementations, consider adding one | ||
--> $DIR/issue-80409.rs:26:1 | ||
| | ||
LL | builder.state().on_entry(|_| {}); | ||
| ^^^ | ||
LL | trait Fsm { | ||
| ^^^^^^^^^ | ||
note: required by a bound in `StateContext` | ||
--> $DIR/issue-80409.rs:30:31 | ||
| | ||
LL | struct StateContext<'a, TFsm: Fsm> { | ||
| ^^^ required by this bound in `StateContext` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
query stack during panic: | ||
end of query stack | ||
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
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
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