Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9480767

Browse files
committedJan 9, 2024
Auto merge of rust-lang#117449 - oli-obk:query_merge_immobile_game, r=matthewjasper
Avoid silencing relevant follow-up errors r? `@matthewjasper` This PR only adds new errors to tests that are already failing and fixes one ICE. Several tests were changed to not emit new errors. I believe all of them were faulty tests, and not explicitly testing for the code that had new errors.
2 parents 190f4c9 + 0978f6e commit 9480767

File tree

184 files changed

+2700
-631
lines changed

Some content is hidden

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

184 files changed

+2700
-631
lines changed
 

‎compiler/rustc_hir_analysis/src/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,12 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
166166

167167
// this ensures that later parts of type checking can assume that items
168168
// have valid types and not error
169-
// FIXME(matthewjasper) We shouldn't need to use `track_errors`.
170-
tcx.sess.track_errors(|| {
171-
tcx.sess.time("type_collecting", || {
172-
tcx.hir().for_each_module(|module| tcx.ensure().collect_mod_item_types(module))
173-
});
174-
})?;
169+
tcx.sess.time("type_collecting", || {
170+
tcx.hir().for_each_module(|module| tcx.ensure().collect_mod_item_types(module))
171+
});
175172

173+
// FIXME(matthewjasper) We shouldn't need to use `track_errors` anywhere in this function
174+
// or the compiler in general.
176175
if tcx.features().rustc_attrs {
177176
tcx.sess.track_errors(|| {
178177
tcx.sess.time("outlives_testing", || outlives::test::test_inferred_outlives(tcx));

‎compiler/rustc_trait_selection/src/traits/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ pub fn normalize_param_env_or_error<'tcx>(
279279
}
280280

281281
fn fold_const(&mut self, c: ty::Const<'tcx>) -> ty::Const<'tcx> {
282+
// FIXME(return_type_notation): track binders in this normalizer, as
283+
// `ty::Const::normalize` can only work with properly preserved binders.
284+
285+
if c.has_escaping_bound_vars() {
286+
return ty::Const::new_misc_error(self.0, c.ty());
287+
}
282288
// While it is pretty sus to be evaluating things with an empty param env, it
283289
// should actually be okay since without `feature(generic_const_exprs)` the only
284290
// const arguments that have a non-empty param env are array repeat counts. These

0 commit comments

Comments
 (0)