about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-06-04 22:39:38 +0200
committerGitHub <noreply@github.com>2019-06-04 22:39:38 +0200
commitd5643be9b400e3a2966429840f5449e53d428ed4 (patch)
tree0aa0638b9da4d562d7b4ef74c85d0f26183a3b8c /src/test/ui/thinlto
parent98176fc8fbd0ae9ae2629a4929aea18bee8acb9b (diff)
parent794239d9a4f9ce0e1a0fb26ee737c80044b76587 (diff)
downloadrust-d5643be9b400e3a2966429840f5449e53d428ed4.tar.gz
rust-d5643be9b400e3a2966429840f5449e53d428ed4.zip
Rollup merge of #61488 - matthewjasper:fix-nll-typeck-ices, r=pnkfelix
Fix NLL typeck ICEs

* Don't ICE when a type containing a region is constrained by nothing
* Don't ICE trying to normalize a type in a `ParamEnv` containing global bounds.

To explain what was happening in the `issue-61311-normalize.rs` case:

* When borrow checking the `the_fn` in the last `impl` we would try to normalize `Self::Proj` (`<Unit as HasProjFn>::Proj`).
* We would find the `impl` that we're checking and and check its `where` clause.
* This would need us to check `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`
* We find two possible implementations, the blanket impl and the bound in our `ParamEnv`.
* The bound in our `ParamEnv` was canonicalized, so we don't see it as a global bound. As such we prefer it to the `impl`.
* This means that we cannot normalize `<Box<dyn Obj + 'static> as HasProj>::Proj` to `Unit`.
* The `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound` bound, which looks like it should be in our `ParamEnv` has been normalized to `Unit: Bound`.
* We fail to prove `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`.
* We ICE, since we believe typeck have errored.

Closes #61311
Closes #61315
Closes #61320

r? @pnkfelix
cc @nikomatsakis
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions