Skip to content

When encountering chained operators use heuristics to recover from bad turbofish - #64909

Merged
bors merged 8 commits into
rust-lang:masterfrom
estebank:turbofish-reloaded
Oct 6, 2019
Merged

When encountering chained operators use heuristics to recover from bad turbofish#64909
bors merged 8 commits into
rust-lang:masterfrom
estebank:turbofish-reloaded

Conversation

@estebank

Copy link
Copy Markdown
Contributor

No description provided.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @eddyb

(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 Sep 30, 2019
@rust-highfive

This comment has been minimized.

Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
@estebank

Copy link
Copy Markdown
ContributorAuthor

r? @Centril

Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
Comment threadsrc/test/ui/parser/require-parens-for-chained-comparison.rs Outdated
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
@Centril

Copy link
Copy Markdown
Contributor

Since @varkor has done some work in this area it would be good if they could take a look as well.

@CentrilCentril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 1, 2019
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
Comment on lines 33 to 41

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Possible heuristic: look-ahead to see if we have ; -- at that point we can be sure it should be turbofish.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This fails with let _: Box<('a) + Trait>;.

@CentrilCentrilOct 3, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But that's in a type context not expression context?
(Can always follow up...)

Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
@estebankestebank added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 2, 2019
Comment threadsrc/libsyntax/parse/diagnostics.rs Outdated
@Centril

Copy link
Copy Markdown
Contributor

r=me with reference to "turbofish" removed (per #64909 (comment)) and optionally #64909 (comment) and #64909 (comment) implemented.

@CentrilCentril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 3, 2019
Comment threadsrc/librustc_errors/diagnostic.rs Outdated
Comment threadsrc/librustc_errors/emitter.rs Outdated
@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors r=Centril

@bors

bors commented Oct 4, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 76456e7 has been approved by Centril

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 4, 2019
@bors

bors commented Oct 4, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 76456e7 with merge 9b1ac2dd83494262a26554e0bf08c9b6407d43b6...

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Oct 4, 2019
When encountering chained operators use heuristics to recover from bad turbofish
@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors retry yielding to rollup including this PR #65109

bors added a commit that referenced this pull request Oct 4, 2019
Rollup of 7 pull requests
Successful merges:
- #64909 (When encountering chained operators use heuristics to recover from bad turbofish)
- #65020 (Always mark rust and rust-call abi's as unwind)
- #65064 (permit asyncawait-ondeck to be added by anyone)
- #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR)
- #65100 (Replace GeneratorSubsts with SubstsRef)
- #65101 (Upgrade librustc_macros dependencies)
- #65105 (Split out some passes from librustc)
Failed merges:
r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Oct 4, 2019
When encountering chained operators use heuristics to recover from bad turbofish
@CentrilCentril mentioned this pull request Oct 4, 2019
bors added a commit that referenced this pull request Oct 5, 2019
Rollup of 8 pull requests
Successful merges:
- #64708 (Stabilize `Option::as_deref` and `Option::as_deref_mut`)
- #64909 (When encountering chained operators use heuristics to recover from bad turbofish)
- #65011 (Do not ICE when dereferencing non-Copy raw pointer)
- #65064 (permit asyncawait-ondeck to be added by anyone)
- #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR)
- #65100 (Replace GeneratorSubsts with SubstsRef)
- #65105 (Split out some passes from librustc)
- #65106 (Allow unused attributes to avoid incremental bug)
Failed merges:
r? @ghost
@bors

bors commented Oct 5, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 76456e7 with merge 58914e7...

bors added a commit that referenced this pull request Oct 5, 2019
When encountering chained operators use heuristics to recover from bad turbofish
@bors

bors commented Oct 5, 2019

Copy link
Copy Markdown
Collaborator

💥 Test timed out

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 5, 2019
@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors retry

@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 5, 2019
@tmandrytmandry added the A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) label Oct 6, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Oct 6, 2019
When encountering chained operators use heuristics to recover from bad turbofish
@tmandrytmandry mentioned this pull request Oct 6, 2019
bors added a commit that referenced this pull request Oct 6, 2019
Rollup of 18 pull requests
This contains changes from all the successful runs that bors marked as timed out, plus a revert of #63649 which appears to be the immediate cause of the timeouts.
Successful merges:
- #64708 (Stabilize `Option::as_deref` and `Option::as_deref_mut`)
- #64728 (Stabilize UdpSocket::peer_addr)
- #64765 (std: Reduce checks for `feature = "backtrace"`)
- #64909 (When encountering chained operators use heuristics to recover from bad turbofish)
- #65011 (Do not ICE when dereferencing non-Copy raw pointer)
- #65064 (permit asyncawait-ondeck to be added by anyone)
- #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR)
- #65100 (Replace GeneratorSubsts with SubstsRef)
- #65105 (Split out some passes from librustc)
- #65106 (Allow unused attributes to avoid incremental bug)
- #65113 (Fix lonely backtick)
- #65116 (Remove unneeded visit_statement definition)
- #65118 (Update the documented default of -Z mutable-noalias)
- #65123 (Account for macro invocation in `let mut $pat` diagnostic.)
- #65124 (Replace some instances of `as *[const | mut] _` with `.cast()`)
- #65126 (Fix typo on `now()` comments)
- #65130 (lint: extern non-exhaustive types are improper)
- #65151 (Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend")
Failed merges:
r? @ghost
@bors
bors merged commit 76456e7 into rust-lang:masterOct 6, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-spuriousArea: Spurious failures in builds (spuriously == for no apparent reason)S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@estebank@rust-highfive@Centril@bors@Mark-Simulacrum@eddyb@tmandry