]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #91329 - Aaron1011:modulo-regions-test, r=jackh726
authorMatthias Krüger <matthias.krueger@famsik.de>
Thu, 2 Dec 2021 21:16:10 +0000 (22:16 +0100)
committerGitHub <noreply@github.com>
Thu, 2 Dec 2021 21:16:10 +0000 (22:16 +0100)
commitfd6e66f42382f40625dc8f03cefc9a26af320d6f
treebb563d26de6b5826e95127657c1408e78935d123
parentb56e3d955ade558ed68b774fdb382310830ada26
parent4910fe6889174a432201958043e19e2222e46b69
Rollup merge of #91329 - Aaron1011:modulo-regions-test, r=jackh726

Fix incorrect usage of `EvaluatedToOk` when evaluating `TypeOutlives`

A global predicate is not guarnatenteed to outlive all regions.
If the predicate involves late-bound regions, then it may fail
to outlive other regions (e.g. `for<'b> &'b bool: 'static` does not
hold)

We now only produce `EvaluatedToOk` when a global predicate has no
late-bound regions - in that case, the ony region that can be present
in the type is 'static
compiler/rustc_trait_selection/src/traits/select/mod.rs