diff options
| author | bors <bors@rust-lang.org> | 2023-09-18 19:41:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-18 19:41:21 +0000 |
| commit | cebb9cfd4f0052fbb5e98f9b6f3a61dae8fd96a7 (patch) | |
| tree | 8cab476d937833d4744831c22fd1d5493e857455 /compiler/rustc_monomorphize | |
| parent | b1575cb72ef40459666f802af8636faf8428e3eb (diff) | |
| parent | 9ac8b363e3227fdc08634ce445b7787aa0fa6bba (diff) | |
| download | rust-cebb9cfd4f0052fbb5e98f9b6f3a61dae8fd96a7.tar.gz rust-cebb9cfd4f0052fbb5e98f9b6f3a61dae8fd96a7.zip | |
Auto merge of #115748 - RalfJung:post-mono, r=oli-obk
move required_consts check to general post-mono-check function This factors some code that is common between the interpreter and the codegen backends into shared helper functions. Also as a side-effect the interpreter now uses the same `eval` functions as everyone else to get the evaluated MIR constants. Also this is in preparation for another post-mono check that will be needed for (the current hackfix for) https://github.com/rust-lang/rust/issues/115709: ensuring that all locals are dynamically sized. I didn't expect this to change diagnostics, but it's just cycle errors that change. r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_monomorphize')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index f5cfc4153b8..92abd0c3b6e 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -752,8 +752,8 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> { let param_env = ty::ParamEnv::reveal_all(); let val = match literal.eval(self.tcx, param_env, None) { Ok(v) => v, - Err(ErrorHandled::Reported(_)) => return, - Err(ErrorHandled::TooGeneric) => span_bug!( + Err(ErrorHandled::Reported(..)) => return, + Err(ErrorHandled::TooGeneric(..)) => span_bug!( self.body.source_info(location).span, "collection encountered polymorphic constant: {:?}", literal |
