1
Fork 0

Rollup merge of #125451 - oli-obk:const_type_mismatch, r=compiler-errors

Fail relating constants of different types

fixes #121585
fixes #121858
fixes #124151

I gave this several attempts before, but we lost too many important diagnostics until I managed to make compilation never bail out early. We have reached this point, so now we can finally fix all those ICEs by bubbling up an error instead of continueing when we encounter a bug.
This commit is contained in:
Matthias Krüger 2024-05-25 12:54:34 +02:00 committed by GitHub
commit 7ea507e041
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 129 additions and 180 deletions

View file

@ -2218,15 +2218,6 @@ rustc_queries! {
separate_provide_extern
}
/// Used in `super_combine_consts` to ICE if the type of the two consts are definitely not going to end up being
/// equal to eachother. This might return `Ok` even if the types are not equal, but will never return `Err` if
/// the types might be equal.
query check_tys_might_be_eq(
arg: Canonical<'tcx, ty::ParamEnvAnd<'tcx, (Ty<'tcx>, Ty<'tcx>)>>
) -> Result<(), NoSolution> {
desc { "check whether two const param are definitely not equal to eachother"}
}
/// Get all item paths that were stripped by a `#[cfg]` in a particular crate.
/// Should not be called for the local crate before the resolver outputs are created, as it
/// is only fed there.