about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/reference-shrink.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-05 23:47:59 +0200
committerGitHub <noreply@github.com>2023-06-05 23:47:59 +0200
commitff43249b0efd274322cbd53441ff15fcdb7096ba (patch)
tree12b88e1283e15bc709000578948d56ef04eea717 /tests/rustdoc-js-std/reference-shrink.js
parent9ce0c7951c3f36d81809e43584c601536badb45f (diff)
parentc12575d3173eb6ba985482808a87e54f23ad328e (diff)
downloadrust-ff43249b0efd274322cbd53441ff15fcdb7096ba.tar.gz
rust-ff43249b0efd274322cbd53441ff15fcdb7096ba.zip
Rollup merge of #112303 - Nilstrieb:as-deref, r=compiler-errors
Normalize in infcx instead of globally for `Option::as_deref` suggestion

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.

r? `@compiler-errors`
Diffstat (limited to 'tests/rustdoc-js-std/reference-shrink.js')
0 files changed, 0 insertions, 0 deletions