1
Fork 0

Rollup merge of #110510 - bryangarza:issue-110467-safe-transmute, r=compiler-errors

Fix ICE for transmutability in candidate assembly

Don't skip transmutability check just because there may be generics in the ParamEnv.

Fixes #110467
This commit is contained in:
Matthias Krüger 2023-04-19 06:35:36 +02:00 committed by GitHub
commit fdd2f4bde8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -775,7 +775,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>,
) {
if obligation.has_non_region_param() {
if obligation.predicate.has_non_region_param() {
return;
}