Perform obligation deduplication to avoid buggy ExistentialMismatch#73485
Perform obligation deduplication to avoid buggy ExistentialMismatch#73485bors merged 1 commit intorust-lang:masterfrom
ExistentialMismatch#73485Conversation
|
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
|
@bors try @rust-timer queue |
|
Awaiting bors try build completion |
|
⌛ Trying commit b7f2396 with merge c9f613bb7aaebcb256e34b959196f56f62ca74c8... |
| a_v.sort_by(|a, b| a.stable_cmp(tcx, b)); | ||
| a_v.dedup(); |
There was a problem hiding this comment.
Is it correct, that the first one is a sort_by, but the next one a plain dedup, instead of dedup_by?
There was a problem hiding this comment.
You're right, that is probably a potential bug. On the repro case that I posted it didn't cause problems, but I'll change it after the perf run has completed (don't want to break anything by force-pushing to this branch before then).
There was a problem hiding this comment.
I'm not sure if dedup will cause trouble in practice and don't know whether dedup_by_key might introduce a slight slowdown. Either way, this PR seems to solve bad rejection part of the ticket.
|
☀️ Try build successful - checks-azure |
|
Queued c9f613bb7aaebcb256e34b959196f56f62ca74c8 with parent e55d3f9, future comparison URL. |
|
Finished benchmarking try commit (c9f613bb7aaebcb256e34b959196f56f62ca74c8): comparison url. |
|
Adding |
|
@bors r+ As I said on Zulip, this doesn't seem like the "right fix" to me, but it is a fix, and I don't see it causing any fresh problems, and there's an imminent regression, so r+. |
|
📌 Commit b7f2396 has been approved by |
| if a.len() != b.len() { | ||
| let tcx = relation.tcx(); | ||
|
|
||
| // FIXME: this is wasteful, but want to do a perf run to see how slow it is. |
There was a problem hiding this comment.
I wonder if we should open up a FIXME issue for this..? To try and prevent the duplicates in the first place and figure out where they come from?
…arth Rollup of 12 pull requests Successful merges: - rust-lang#72771 (Warn if linking to a private item) - rust-lang#72937 (Fortanix SGX target libunwind build process changes) - rust-lang#73485 (Perform obligation deduplication to avoid buggy `ExistentialMismatch`) - rust-lang#73529 (Add liballoc impl SpecFromElem for i8) - rust-lang#73579 (add missing doc links) - rust-lang#73627 (Shortcuts for min/max on double-ended BTreeMap/BTreeSet iterators) - rust-lang#73691 (Bootstrap: detect Windows based on sys.platform) - rust-lang#73694 (Document the Self keyword) - rust-lang#73718 (Document the super keyword) - rust-lang#73728 (Document some invariants correctly/more) - rust-lang#73738 (Remove irrelevant comment) - rust-lang#73765 (Remove blank line) Failed merges: r? @ghost
|
discussed in T-compiler meeting. Approved for beta-backport. |
|
stable nom was also discussed. Stable backport approved. |
…ulacrum [beta] next Backports of: * rustdoc: Fix doc aliases with crate filtering rust-lang#73644 * rustdoc: Rename invalid_codeblock_attribute lint to be plural rust-lang#74131 * rustc_lexer: Simplify shebang parsing once more rust-lang#73596 * Perform obligation deduplication to avoid buggy `ExistentialMismatch` rust-lang#73485 * Reorder order in which MinGW libs are linked to fix recent breakage rust-lang#73184 * Change how compiler-builtins gets many CGUs rust-lang#73136 * Fix wasm32 being broken due to a NodeJS version bump rust-lang#73885
Address #59326.