Conversation
This comment has been minimized.
This comment has been minimized.
76a4b28 to
2d3f828
Compare
2d3f828 to
3b2bbcd
Compare
|
Yay, thanks so much. This looks good to me at first glance, but will have to review in a couple days, sorry for the delay. |
There was a problem hiding this comment.
Looking into this more, the categories were kind of strange with the nested bodies in promoteds right now: the results are now more consistent with the non-promoted cases. I agree we shouldn't change them back and if any confusion arises, it will be more due to the existing inconsistencies of a return category turning into a boring category just because it's from a promoted, than the opposite.
r=me with typo fixed.
(As for a test for the locations change, I should mention that I tested this manually, and that we also have a couple of UI tests that exercise this value, when using polonius. Enabling them with -Zpolonius=next will be the non-regression test cases, and I'll do that myself in another PR.)
As far as I can tell, it does. |
Co-authored-by: Rémy Rakic <remy.rakic+github@gmail.com>
jup, i've also tested this @bors r=lqd |
fix 2 borrowck issues fixes rust-lang#146467 cc `@amandasystems` our understanding here is as follows: region constraints from computing implied bounds gets `ConstraintCategory::Internal`. If there's a higher-ranked subtyping errors while computing implied bounds we then ended up with only `ConstraintCategory::Internal` and `ConstraintCategory::OutlivesUnnameablePlaceholder(_)` constraints. The path was something like - `'placeholderU2: 'placeholderU1` (`Internal`) - `'placeholderU1: 'static` (`OutlivesUnnameablePlaceholder('placeholderU2)`) It's generally somewhat subtle here as ideally relating placeholders doesn't introduce `'static` constraints. Relating the placeholders themselves will always error regardless, cc rust-lang#142623. --- separately fixes rust-lang#145925 (comment) by updating the location for deferred closure requirements inside of promoteds. I am not updating their category as doing so is 1) effort and 2) imo actually undesirable 🤔 see the comments in `TypeChecker::check_promoted` cc `@lqd` r? lqd
Rollup of 9 pull requests Successful merges: - #146711 (fix 2 borrowck issues) - #146735 (unstably constify float mul_add methods) - #146857 (revert change removing `has_infer` check. Commit conservatively patch…) - #146897 (fix ICE in rustdoc::invalid_html_tags) - #146915 (Make missed precondition-free float intrinsics safe) - #146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones) - #146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions) - #146964 (library: std: sys: pal: uefi: Add some comments) - #146969 (const-eval: better wording for errors involving maybe-null pointers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #146711 (fix 2 borrowck issues) - #146857 (revert change removing `has_infer` check. Commit conservatively patch…) - #146897 (fix ICE in rustdoc::invalid_html_tags) - #146915 (Make missed precondition-free float intrinsics safe) - #146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones) - #146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions) - #146964 (library: std: sys: pal: uefi: Add some comments) - #146969 (const-eval: better wording for errors involving maybe-null pointers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146711 - lcnr:fix-placeholder-ice, r=lqd fix 2 borrowck issues fixes #146467 cc ``@amandasystems`` our understanding here is as follows: region constraints from computing implied bounds gets `ConstraintCategory::Internal`. If there's a higher-ranked subtyping errors while computing implied bounds we then ended up with only `ConstraintCategory::Internal` and `ConstraintCategory::OutlivesUnnameablePlaceholder(_)` constraints. The path was something like - `'placeholderU2: 'placeholderU1` (`Internal`) - `'placeholderU1: 'static` (`OutlivesUnnameablePlaceholder('placeholderU2)`) It's generally somewhat subtle here as ideally relating placeholders doesn't introduce `'static` constraints. Relating the placeholders themselves will always error regardless, cc #142623. --- separately fixes #145925 (comment) by updating the location for deferred closure requirements inside of promoteds. I am not updating their category as doing so is 1) effort and 2) imo actually undesirable 🤔 see the comments in `TypeChecker::check_promoted` cc ``@lqd`` r? lqd
Rollup of 8 pull requests Successful merges: - rust-lang/rust#146711 (fix 2 borrowck issues) - rust-lang/rust#146857 (revert change removing `has_infer` check. Commit conservatively patch…) - rust-lang/rust#146897 (fix ICE in rustdoc::invalid_html_tags) - rust-lang/rust#146915 (Make missed precondition-free float intrinsics safe) - rust-lang/rust#146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones) - rust-lang/rust#146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions) - rust-lang/rust#146964 (library: std: sys: pal: uefi: Add some comments) - rust-lang/rust#146969 (const-eval: better wording for errors involving maybe-null pointers) r? `@ghost` `@rustbot` modify labels: rollup
fixes #146467 cc @amandasystems
our understanding here is as follows: region constraints from computing implied bounds gets
ConstraintCategory::Internal. If there's a higher-ranked subtyping errors while computing implied bounds we then ended up with onlyConstraintCategory::InternalandConstraintCategory::OutlivesUnnameablePlaceholder(_)constraints.The path was something like
'placeholderU2: 'placeholderU1(Internal)'placeholderU1: 'static(OutlivesUnnameablePlaceholder('placeholderU2))It's generally somewhat subtle here as ideally relating placeholders doesn't introduce
'staticconstraints. Relating the placeholders themselves will always error regardless, cc #142623.separately fixes #145925 (comment) by updating the location for deferred closure requirements inside of promoteds. I am not updating their category as doing so is 1) effort and 2) imo actually undesirable 🤔 see the comments in
TypeChecker::check_promotedcc @lqdr? lqd