Skip to content
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

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

Merged
merged 8 commits into from Oct 6, 2019

Conversation

@estebank
Copy link
Contributor

commented Sep 30, 2019

No description provided.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Sep 30, 2019

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Sep 30, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-09-30T02:09:04.8375129Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-30T02:09:05.6211944Z ##[command]git config gc.auto 0
2019-09-30T02:09:05.6220739Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-30T02:09:05.6223777Z ##[command]git config --get-all http.proxy
2019-09-30T02:09:05.6227311Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/64909/merge:refs/remotes/pull/64909/merge
---
2019-09-30T02:16:21.0444056Z    Compiling serde_json v1.0.40
2019-09-30T02:16:22.8490762Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-09-30T02:16:33.9162864Z     Finished release [optimized] target(s) in 1m 29s
2019-09-30T02:16:33.9259241Z tidy check
2019-09-30T02:16:34.7831531Z tidy error: /checkout/src/libsyntax/parse/diagnostics.rs:551: line longer than 100 chars
2019-09-30T02:16:35.9042289Z some tidy checks failed
2019-09-30T02:16:35.9042435Z 
2019-09-30T02:16:35.9042435Z 
2019-09-30T02:16:35.9043486Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-09-30T02:16:35.9043632Z 
2019-09-30T02:16:35.9043662Z 
2019-09-30T02:16:35.9052289Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-09-30T02:16:35.9052662Z Build completed unsuccessfully in 0:01:32
2019-09-30T02:16:35.9052662Z Build completed unsuccessfully in 0:01:32
2019-09-30T02:16:35.9104076Z == clock drift check ==
2019-09-30T02:16:35.9119839Z   local time: Mon Sep 30 02:16:35 UTC 2019
2019-09-30T02:16:36.0742960Z   network time: Mon, 30 Sep 2019 02:16:36 GMT
2019-09-30T02:16:36.0744443Z == end clock drift check ==
2019-09-30T02:16:37.4749474Z ##[error]Bash exited with code '1'.
2019-09-30T02:16:37.4807258Z ##[section]Starting: Checkout
2019-09-30T02:16:37.4809842Z ==============================================================================
2019-09-30T02:16:37.4809902Z Task         : Get sources
2019-09-30T02:16:37.4810003Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@estebank estebank force-pushed the estebank:turbofish-reloaded branch from ee2838b to 8cd314b Sep 30, 2019
@estebank

This comment has been minimized.

Copy link
Contributor Author

commented Sep 30, 2019

@rust-highfive rust-highfive assigned Centril and unassigned eddyb Sep 30, 2019
@estebank estebank force-pushed the estebank:turbofish-reloaded branch from 12ef2af to b9f8c53 Sep 30, 2019
src/libsyntax/parse/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/diagnostics.rs Show resolved Hide resolved
@Centril

This comment has been minimized.

Copy link
Member

commented Oct 1, 2019

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

error: chained comparison operators require parentheses
--> $DIR/require-parens-for-chained-comparison.rs:22:21
|
LL | let _ = identity<u8>;
| ^^^^
|
= help: use the "turbofish" `::<...>` instead of `<...>` to specify type arguments
= help: or use `(...)` if you meant to specify fn arguments

Comment for lines 33  – 41

This comment has been minimized.

Copy link
@Centril

Centril Oct 1, 2019

Member

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

This comment has been minimized.

Copy link
@estebank

estebank Oct 3, 2019

Author Contributor

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

This comment has been minimized.

Copy link
@Centril

Centril Oct 3, 2019

Member

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

@Centril

This comment has been minimized.

Copy link
Member

commented Oct 3, 2019

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

src/librustc_errors/emitter.rs Outdated Show resolved Hide resolved
@estebank

This comment has been minimized.

Copy link
Contributor Author

commented Oct 4, 2019

@bors r=Centril

@bors

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2019

📌 Commit 76456e7 has been approved by Centril

@bors

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2019

⌛️ Testing commit 76456e7 with merge 9b1ac2d...

bors added a commit that referenced this pull request Oct 4, 2019
When encountering chained operators use heuristics to recover from bad turbofish
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

This comment has been minimized.

Copy link
Member

commented Oct 4, 2019

@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
@Centril Centril referenced 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 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

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2019

⌛️ 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

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2019

💥 Test timed out

@estebank

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2019

@bors retry

@tmandry tmandry added the A-spurious 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
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:master Oct 6, 2019
4 of 5 checks passed
4 of 5 checks passed
homu Test timed out
Details
pr Build #20191004.8 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.