Skip to content

Use already checked RHS ty for LHS deref suggestions - #103223

Merged
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:deref-sugg-slow
Oct 20, 2022
Merged

Use already checked RHS ty for LHS deref suggestions#103223
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:deref-sugg-slow

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

There's no reason to do the check_lhs_assignable and RHS check_expr_with_hint in that order, so invert them and use the typeck results to avoid exponential blowup on error.

Fixes#103219

@rustbotrustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 19, 2022
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @wesleywiser

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 19, 2022

@wesleywiserwesleywiser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment threadsrc/test/ui/typeck/slow-lhs-suggestion.rs
@compiler-errors

Copy link
Copy Markdown
ContributorAuthor

@bors r=wesleywiser rollup

@bors

bors commented Oct 19, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit d38dc68 has been approved by wesleywiser

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 19, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 19, 2022
…iaskrgr
Rollup of 7 pull requests
Successful merges:
- rust-lang#103211 (rustdoc: remove class name `location` from sidebar sibling nav)
- rust-lang#103223 (Use already checked RHS ty for LHS deref suggestions)
- rust-lang#103237 (Clean up codeblock-tooltip rustdoc-gui test)
- rust-lang#103239 (Allow #[unstable] impls for fn() with unstable abi.)
- rust-lang#103246 (Mark `rust-analyzer` as a host-only tool)
- rust-lang#103257 (rustdoc: move `setting-line` color CSS to settings.css)
- rust-lang#103258 (Make miri read_dir test a little more robust)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit e500dcb into rust-lang:masterOct 20, 2022
@rustbotrustbot added this to the 1.66.0 milestone Oct 20, 2022
@compiler-errors
compiler-errors deleted the deref-sugg-slow branch November 2, 2022 02:54
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…iaskrgr
Rollup of 7 pull requests
Successful merges:
- rust-lang#103211 (rustdoc: remove class name `location` from sidebar sibling nav)
- rust-lang#103223 (Use already checked RHS ty for LHS deref suggestions)
- rust-lang#103237 (Clean up codeblock-tooltip rustdoc-gui test)
- rust-lang#103239 (Allow #[unstable] impls for fn() with unstable abi.)
- rust-lang#103246 (Mark `rust-analyzer` as a host-only tool)
- rust-lang#103257 (rustdoc: move `setting-line` color CSS to settings.css)
- rust-lang#103258 (Make miri read_dir test a little more robust)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exponential compilation time on chained "invalid left-hand side of assignment"

5 participants

@compiler-errors@rust-highfive@bors@wesleywiser@rustbot