forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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#97642 - oli-obk:backport_undo_closure_wf_chec…
…k, r=compiler-errors Revert "Check that closures satisfy their where bounds" This reverts commit 253408b from rust-lang#96899 This is only performed on beta to give us another few weeks to fix rust-lang#97607 on nightly. The planned fix is likely way too large to backport anyway. r? `@compiler-errors`
- Loading branch information
Showing
10 changed files
with
25 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#![feature(generic_const_exprs)] | ||
#![allow(incomplete_features)] | ||
fn test<const N: usize>() -> [u8; N + (|| 42)()] {} | ||
//~^ ERROR cycle detected when building an abstract representation | ||
//~^ ERROR overly complex generic constant | ||
|
||
fn main() {} |
25 changes: 6 additions & 19 deletions
25
src/test/ui/const-generics/generic_const_exprs/closures.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,13 @@ | ||
error[E0391]: cycle detected when building an abstract representation for test::{constant#0} | ||
error: overly complex generic constant | ||
--> $DIR/closures.rs:3:35 | ||
| | ||
LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {} | ||
| ^^^^^^^^^^^^^ | ||
| ^^^^-------^^ | ||
| | | ||
| borrowing is not supported in generic constants | ||
| | ||
note: ...which requires building THIR for `test::{constant#0}`... | ||
--> $DIR/closures.rs:3:35 | ||
| | ||
LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {} | ||
| ^^^^^^^^^^^^^ | ||
note: ...which requires type-checking `test::{constant#0}`... | ||
--> $DIR/closures.rs:3:35 | ||
| | ||
LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {} | ||
| ^^^^^^^^^^^^^ | ||
= note: ...which again requires building an abstract representation for test::{constant#0}, completing the cycle | ||
note: cycle used when checking that `test` is well-formed | ||
--> $DIR/closures.rs:3:1 | ||
| | ||
LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= help: consider moving this anonymous constant into a `const` function | ||
= note: this operation may be supported in the future | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0391`. |
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 |
---|---|---|
@@ -1,15 +1,10 @@ | ||
error[E0477]: the type `&'a V` does not fulfill the required lifetime | ||
--> $DIR/issue-59311.rs:17:5 | ||
error: higher-ranked lifetime error | ||
--> $DIR/issue-59311.rs:17:9 | ||
| | ||
LL | v.t(|| {}); | ||
| ^^^^^^^^^^ | ||
| ^^^^^ | ||
| | ||
note: type must satisfy the static lifetime as required by this binding | ||
--> $DIR/issue-59311.rs:15:24 | ||
| | ||
LL | for<'a> &'a V: T + 'static, | ||
| ^^^^^^^ | ||
= note: could not prove for<'a> &'a V: 'static | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0477`. |
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 was deleted.
Oops, something went wrong.
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
19 changes: 0 additions & 19 deletions
19
src/test/ui/type-alias-impl-trait/wf_check_closures.stderr
This file was deleted.
Oops, something went wrong.