diff options
| author | Ralf Jung <post@ralfj.de> | 2024-07-13 16:13:55 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-07-18 11:58:16 +0200 |
| commit | fa74a9e6aa525a285cfd530cdea2ddeb9fca013c (patch) | |
| tree | 6767ebdfc36f6fd76566d99166af20674e2e73ce /compiler/rustc_middle/src/ty | |
| parent | 52f3c71c8dc4aaed71e3035995fcbdd6d78c98c6 (diff) | |
| download | rust-fa74a9e6aa525a285cfd530cdea2ddeb9fca013c.tar.gz rust-fa74a9e6aa525a285cfd530cdea2ddeb9fca013c.zip | |
valtree construction: keep track of which type was valtree-incompatible
Diffstat (limited to 'compiler/rustc_middle/src/ty')
| -rw-r--r-- | compiler/rustc_middle/src/ty/consts.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/consts.rs b/compiler/rustc_middle/src/ty/consts.rs index 32d01d07c17..d4c39a25a1f 100644 --- a/compiler/rustc_middle/src/ty/consts.rs +++ b/compiler/rustc_middle/src/ty/consts.rs @@ -328,8 +328,7 @@ impl<'tcx> Const<'tcx> { let (param_env, unevaluated) = unevaluated.prepare_for_eval(tcx, param_env); // try to resolve e.g. associated constants to their definition on an impl, and then // evaluate the const. - let Some(c) = tcx.const_eval_resolve_for_typeck(param_env, unevaluated, span)? - else { + let Ok(c) = tcx.const_eval_resolve_for_typeck(param_env, unevaluated, span)? else { // This can happen when we run on ill-typed code. let e = tcx.dcx().span_delayed_bug( span, |
