-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
do not attempt to prove unknowable goals #129896
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me. r=me if you'd like, with or without my one comment
// We also look for unknowable candidates. In case a goal is unknowable, there's | ||
// always exactly 1 candidate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be good to add an assert below for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are two possible asserts, both feel quite meh, so I didn't add any:
- if we found a coherence unknowable candidate, assert that there are no other candidates
- if we didn't find one, there is no coherence unknowable candidate in the remaining
candidates
☔ The latest upstream changes (presumably #129915) made this pull request unmergeable. Please resolve the merge conflicts. |
be3821c
to
6188aae
Compare
do not attempt to prove unknowable goals In case a goal is unknowable, we previously still checked all other possible ways to prove this goal, even though its final result is already guaranteed to be ambiguous. By ignoring all other candidates in that case we can avoid a lot of unnecessary work, fixing the performance regression in typenum found in rust-lang#121848. This is already the behavior in the old solver. This could in theory cause future-compatability issues as considering fewer goals unknowable may end up causing performance regressions/hangs. I am quite confident that this will not be an issue. r? `@compiler-errors`
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#127692 (Suggest `impl Trait` for References to Bare Trait in Function Header) - rust-lang#128701 (Don't Suggest Labeling `const` and `unsafe` Blocks ) - rust-lang#128934 (Non-exhaustive structs may be empty) - rust-lang#129630 (Document the broken C ABI of `wasm32-unknown-unknown`) - rust-lang#129706 (Rename dump of coroutine by-move-body to be more consistent, fix ICE in dump_mir) - rust-lang#129896 (do not attempt to prove unknowable goals) - rust-lang#129926 (Move `SanityCheck` and `MirPass`) - rust-lang#129928 (rustc_driver_impl: remove some old dead logic) - rust-lang#129930 (include 1.80.1 release notes on master) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#127692 (Suggest `impl Trait` for References to Bare Trait in Function Header) - rust-lang#128701 (Don't Suggest Labeling `const` and `unsafe` Blocks ) - rust-lang#128934 (Non-exhaustive structs may be empty) - rust-lang#129630 (Document the broken C ABI of `wasm32-unknown-unknown`) - rust-lang#129863 (update comment regarding TargetOptions.features) - rust-lang#129896 (do not attempt to prove unknowable goals) - rust-lang#129926 (Move `SanityCheck` and `MirPass`) - rust-lang#129928 (rustc_driver_impl: remove some old dead logic) - rust-lang#129930 (include 1.80.1 release notes on master) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#127692 (Suggest `impl Trait` for References to Bare Trait in Function Header) - rust-lang#128701 (Don't Suggest Labeling `const` and `unsafe` Blocks ) - rust-lang#128934 (Non-exhaustive structs may be empty) - rust-lang#129630 (Document the broken C ABI of `wasm32-unknown-unknown`) - rust-lang#129863 (update comment regarding TargetOptions.features) - rust-lang#129896 (do not attempt to prove unknowable goals) - rust-lang#129926 (Move `SanityCheck` and `MirPass`) - rust-lang#129928 (rustc_driver_impl: remove some old dead logic) - rust-lang#129930 (include 1.80.1 release notes on master) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#127692 (Suggest `impl Trait` for References to Bare Trait in Function Header) - rust-lang#128701 (Don't Suggest Labeling `const` and `unsafe` Blocks ) - rust-lang#128934 (Non-exhaustive structs may be empty) - rust-lang#129630 (Document the broken C ABI of `wasm32-unknown-unknown`) - rust-lang#129863 (update comment regarding TargetOptions.features) - rust-lang#129896 (do not attempt to prove unknowable goals) - rust-lang#129926 (Move `SanityCheck` and `MirPass`) - rust-lang#129928 (rustc_driver_impl: remove some old dead logic) - rust-lang#129930 (include 1.80.1 release notes on master) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#127692 (Suggest `impl Trait` for References to Bare Trait in Function Header) - rust-lang#128701 (Don't Suggest Labeling `const` and `unsafe` Blocks ) - rust-lang#128934 (Non-exhaustive structs may be empty) - rust-lang#129630 (Document the broken C ABI of `wasm32-unknown-unknown`) - rust-lang#129863 (update comment regarding TargetOptions.features) - rust-lang#129896 (do not attempt to prove unknowable goals) - rust-lang#129926 (Move `SanityCheck` and `MirPass`) - rust-lang#129928 (rustc_driver_impl: remove some old dead logic) - rust-lang#129930 (include 1.80.1 release notes on master) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#127692 (Suggest `impl Trait` for References to Bare Trait in Function Header) - rust-lang#128701 (Don't Suggest Labeling `const` and `unsafe` Blocks ) - rust-lang#128934 (Non-exhaustive structs may be empty) - rust-lang#129630 (Document the broken C ABI of `wasm32-unknown-unknown`) - rust-lang#129863 (update comment regarding TargetOptions.features) - rust-lang#129896 (do not attempt to prove unknowable goals) - rust-lang#129926 (Move `SanityCheck` and `MirPass`) - rust-lang#129928 (rustc_driver_impl: remove some old dead logic) - rust-lang#129930 (include 1.80.1 release notes on master) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#127692 (Suggest `impl Trait` for References to Bare Trait in Function Header) - rust-lang#128701 (Don't Suggest Labeling `const` and `unsafe` Blocks ) - rust-lang#128934 (Non-exhaustive structs may be empty) - rust-lang#129630 (Document the broken C ABI of `wasm32-unknown-unknown`) - rust-lang#129863 (update comment regarding TargetOptions.features) - rust-lang#129896 (do not attempt to prove unknowable goals) - rust-lang#129926 (Move `SanityCheck` and `MirPass`) - rust-lang#129928 (rustc_driver_impl: remove some old dead logic) - rust-lang#129930 (include 1.80.1 release notes on master) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#127692 (Suggest `impl Trait` for References to Bare Trait in Function Header) - rust-lang#128701 (Don't Suggest Labeling `const` and `unsafe` Blocks ) - rust-lang#128934 (Non-exhaustive structs may be empty) - rust-lang#129630 (Document the broken C ABI of `wasm32-unknown-unknown`) - rust-lang#129863 (update comment regarding TargetOptions.features) - rust-lang#129896 (do not attempt to prove unknowable goals) - rust-lang#129926 (Move `SanityCheck` and `MirPass`) - rust-lang#129928 (rustc_driver_impl: remove some old dead logic) - rust-lang#129930 (include 1.80.1 release notes on master) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#129896 - lcnr:bail-on-unknowable, r=jackh726 do not attempt to prove unknowable goals In case a goal is unknowable, we previously still checked all other possible ways to prove this goal, even though its final result is already guaranteed to be ambiguous. By ignoring all other candidates in that case we can avoid a lot of unnecessary work, fixing the performance regression in typenum found in rust-lang#121848. This is already the behavior in the old solver. This could in theory cause future-compatability issues as considering fewer goals unknowable may end up causing performance regressions/hangs. I am quite confident that this will not be an issue. r? ``@compiler-errors``
In case a goal is unknowable, we previously still checked all other possible ways to prove this goal, even though its final result is already guaranteed to be ambiguous. By ignoring all other candidates in that case we can avoid a lot of unnecessary work, fixing the performance regression in typenum found in #121848.
This is already the behavior in the old solver. This could in theory cause future-compatability issues as considering fewer goals unknowable may end up causing performance regressions/hangs. I am quite confident that this will not be an issue.
r? @compiler-errors