Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 63a199c

Browse files
committedFeb 5, 2024
Auto merge of rust-lang#120687 - oli-obk:early_const_prop, r=<try>
Run const_prop_lint in check builds, too implements rust-lang#108730 (comment) Turns the const_prop_lint pass into a query that is run alongside borrowck.
2 parents ea37e80 + 74cde5f commit 63a199c

File tree

127 files changed

+1293
-531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+1293
-531
lines changed
 

‎compiler/rustc_abi/src/layout.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,11 @@ where
426426
}
427427
}
428428
}
429-
_ => assert!(
430-
start == Bound::Unbounded && end == Bound::Unbounded,
431-
"nonscalar layout for layout_scalar_valid_range type: {st:#?}",
432-
),
429+
_ => {
430+
if start != Bound::Unbounded || end != Bound::Unbounded {
431+
return None;
432+
}
433+
}
433434
}
434435

435436
Some(st)

‎compiler/rustc_interface/src/passes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
738738
// Run unsafety check because it's responsible for stealing and
739739
// deallocating THIR.
740740
tcx.ensure().check_unsafety(def_id);
741+
tcx.ensure().const_prop_lint(def_id);
741742
tcx.ensure().mir_borrowck(def_id)
742743
});
743744
});

0 commit comments

Comments
 (0)
This repository has been archived.