add comments explaining where post-mono const eval errors abort compilation
This commit is contained in:
parent
39db6a0972
commit
d765fb8faf
5 changed files with 15 additions and 8 deletions
|
@ -1114,6 +1114,9 @@ fn collect_and_partition_mono_items(tcx: TyCtxt<'_>, (): ()) -> (&DefIdSet, &[Co
|
|||
|
||||
let (items, usage_map) = collector::collect_crate_mono_items(tcx, collection_mode);
|
||||
|
||||
// If there was an error during collection (e.g. from one of the constants we evaluated),
|
||||
// then we stop here. This way codegen does not have to worry about failing constants.
|
||||
// (codegen relies on this and ICEs will happen if this is violated.)
|
||||
tcx.dcx().abort_if_errors();
|
||||
|
||||
let (codegen_units, _) = tcx.sess.time("partition_and_assert_distinct_symbols", || {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue