Normalize in infcx instead of globally for `Option::as_deref` suggestion by Nils...
source link: https://github.com/rust-lang/rust/pull/112303
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Member
fixes #112293
The projection may contain inference variables. These inference variables are local to the local inference context. Using tcx.normalize_erasing_regions
doesn't work here because this method is global and does not have access to the inference context. It's therefore unable to deal with the inference variables. We normalize in the local inference context instead, which knowns about the inference variables.
The test looks a little different than the issue example, I made it more minimal and verified that it still ICEs on nightly.
Also contains a drive-by fix to properly compare the types.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK