-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implied bounds compat mode does not deduce sufficient outlives bounds #137767
Comments
The reason this fails is because of this rust/compiler/rustc_trait_selection/src/traits/query/type_op/implied_outlives_bounds.rs Line 195 in f45d4ac
Combined w/ the fact that we use this function during borrowck for implied bounds means that we don't end up being able to assume that
(which wouldn't be WF if we didn't know that |
…hack-unless-bevy, r=lcnr Only use implied bounds hack if bevy, and use deeply normalize in implied bounds hack Consolidates the implied bounds computation mode into a single function, which deeply normalizes, and if it's in **compat** mode (for bevy), it extracts outlives bounds from the infcx. Previously, we were using the implied bounds compat mode in two cases: 1. During WF, if it detects `ParamSet` 2. EVERYWHERE ELSE (lol) -- e.g. borrowck, predicate entailment, etc. While I think this is fine, and the net effect was just that we emitted fewer diagnostics, it makes me uncomfortable that all crates were using the supposed "compat" code. Fixes rust-lang#137767
Rollup merge of rust-lang#137633 - compiler-errors:no-implied-bounds-hack-unless-bevy, r=lcnr Only use implied bounds hack if bevy, and use deeply normalize in implied bounds hack Consolidates the implied bounds computation mode into a single function, which deeply normalizes, and if it's in **compat** mode (for bevy), it extracts outlives bounds from the infcx. Previously, we were using the implied bounds compat mode in two cases: 1. During WF, if it detects `ParamSet` 2. EVERYWHERE ELSE (lol) -- e.g. borrowck, predicate entailment, etc. While I think this is fine, and the net effect was just that we emitted fewer diagnostics, it makes me uncomfortable that all crates were using the supposed "compat" code. Fixes rust-lang#137767
I tried this code:
I expected to see it work.
Instead, it did not.
Meta
1.85 + beta + nightly for Feb 27, 2025
The text was updated successfully, but these errors were encountered: