-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #124846 - compiler-errors:const-eval, r=lcnr
Don't ICE when we cannot eval a const to a valtree in the new solver Use `const_eval_resolve` instead of `try_const_eval_resolve` because naming aside, the former doesn't ICE when a value can't be evaluated to a valtree. r? lcnr
- Loading branch information
Showing
3 changed files
with
13 additions
and
5 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
3 changes: 2 additions & 1 deletion
3
tests/ui/traits/next-solver/canonical/const-region-infer-to-static-in-binder.rs
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,8 +1,9 @@ | ||
//@ compile-flags: -Znext-solver=coherence | ||
//@ compile-flags: -Znext-solver | ||
|
||
#[derive(Debug)] | ||
struct X<const FN: fn() = { || {} }>; | ||
//~^ ERROR using function pointers as const generic parameters is forbidden | ||
//~| ERROR using function pointers as const generic parameters is forbidden | ||
//~| ERROR type annotations needed | ||
|
||
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