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

Use heuristics to recover parsing of missing `;` #65640

Merged
merged 3 commits into from Oct 29, 2019

Conversation

@estebank
Copy link
Contributor

estebank commented Oct 20, 2019

  • Detect , and : typos where ; was intended.
  • When the next token could have been the start of a new statement,
    detect a missing semicolon.

Fix #48160, fix #44767 (after adding note about statements).

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Oct 20, 2019

r? @petrochenkov

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

@estebank

This comment has been minimized.

Copy link
Contributor Author

estebank commented Oct 20, 2019

Still needs a bit of a clean up, but the idea is to detect some common typos that can occur during development and the lack of a semicolon, which is also quite common when writing code.

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Oct 20, 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-10-20T21:48:51.0307812Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-20T21:48:51.0484772Z ##[command]git config gc.auto 0
2019-10-20T21:48:51.0585132Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-20T21:48:51.0639443Z ##[command]git config --get-all http.proxy
2019-10-20T21:48:51.0791253Z ##[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/65640/merge:refs/remotes/pull/65640/merge
---
2019-10-20T21:55:32.2858595Z    Compiling serde_json v1.0.40
2019-10-20T21:55:34.0812840Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-10-20T21:55:45.9559988Z     Finished release [optimized] target(s) in 1m 33s
2019-10-20T21:55:45.9641303Z tidy check
2019-10-20T21:55:46.7989827Z tidy error: /checkout/src/libsyntax/parse/parser/diagnostics.rs:925: line longer than 100 chars
2019-10-20T21:55:48.2337312Z some tidy checks failed
2019-10-20T21:55:48.2342702Z Found 482 error codes
2019-10-20T21:55:48.2342815Z Found 0 error codes with no tests
2019-10-20T21:55:48.2342865Z Done!
2019-10-20T21:55:48.2342865Z Done!
2019-10-20T21:55:48.2349831Z 
2019-10-20T21:55:48.2349933Z 
2019-10-20T21:55:48.2350905Z 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-10-20T21:55:48.2361274Z 
2019-10-20T21:55:48.2361307Z 
2019-10-20T21:55:48.2361388Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-10-20T21:55:48.2361447Z Build completed unsuccessfully in 0:01:36
2019-10-20T21:55:48.2361447Z Build completed unsuccessfully in 0:01:36
2019-10-20T21:55:48.2402513Z == clock drift check ==
2019-10-20T21:55:48.2418923Z   local time: Sun Oct 20 21:55:48 UTC 2019
2019-10-20T21:55:48.4046359Z   network time: Sun, 20 Oct 2019 21:55:48 GMT
2019-10-20T21:55:48.4053868Z == end clock drift check ==
2019-10-20T21:55:49.7384120Z 
2019-10-20T21:55:49.7512639Z ##[error]Bash exited with code '1'.
2019-10-20T21:55:49.7566807Z ##[section]Starting: Checkout
2019-10-20T21:55:49.7569998Z ==============================================================================
2019-10-20T21:55:49.7570087Z Task         : Get sources
2019-10-20T21:55:49.7570136Z 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)

@Centril Centril self-assigned this Oct 20, 2019
src/libsyntax/parse/parser/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/parser/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/parser/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/token.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/parser/diagnostics.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/parser/item.rs Show resolved Hide resolved
@estebank estebank force-pushed the estebank:recover-missing-semi branch from 1b45a9b to dd05f9f Oct 22, 2019
@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Oct 22, 2019

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-10-22T18:35:35.6170328Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-22T18:35:35.6367524Z ##[command]git config gc.auto 0
2019-10-22T18:35:35.6442986Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-22T18:35:35.6502740Z ##[command]git config --get-all http.proxy
2019-10-22T18:35:35.6639500Z ##[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/65640/merge:refs/remotes/pull/65640/merge

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 changed the title [wip] Use heuristics to recover parsing of missing `;` Use heuristics to recover parsing of missing `;` Oct 22, 2019
@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Oct 22, 2019

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-10-22T18:58:31.2175573Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-22T18:58:31.2383798Z ##[command]git config gc.auto 0
2019-10-22T18:58:31.2467510Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-22T18:58:31.2525257Z ##[command]git config --get-all http.proxy
2019-10-22T18:58:31.2647637Z ##[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/65640/merge:refs/remotes/pull/65640/merge

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)

@RalfJung

This comment has been minimized.

Copy link
Member

RalfJung commented Oct 22, 2019

Could not resolve host: rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com

@bors retry

@petrochenkov petrochenkov removed their assignment Oct 22, 2019
@estebank estebank force-pushed the estebank:recover-missing-semi branch from 44947a8 to 7232f47 Oct 23, 2019
@estebank

This comment has been minimized.

Copy link
Contributor Author

estebank commented Oct 24, 2019

src/libsyntax/parse/parser/diagnostics.rs Outdated Show resolved Hide resolved
// When the spans are in the same line, it means that the only content
// between them is whitespace, point only at the found token.
err.span_label(sp, label_exp);
if !sm.is_multiline(prev_sp.until(sp)) {

This comment has been minimized.

Copy link
@Centril

Centril Oct 24, 2019

Member

The logic here seems very similar to the case in my comment above -- a refactoring opportunity?

src/libsyntax/parse/parser/diagnostics.rs Outdated Show resolved Hide resolved
@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Oct 24, 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-10-24T22:58:38.8514240Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-24T22:58:39.6581827Z ##[command]git config gc.auto 0
2019-10-24T22:58:39.6584983Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-24T22:58:39.6587156Z ##[command]git config --get-all http.proxy
2019-10-24T22:58:39.6591266Z ##[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/65640/merge:refs/remotes/pull/65640/merge
---
2019-10-24T23:08:29.3684102Z    Compiling rustc_macros v0.1.0 (/checkout/src/librustc_macros)
2019-10-24T23:08:38.5815275Z    Compiling syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
2019-10-24T23:08:40.1039758Z    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
2019-10-24T23:08:59.2144102Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2019-10-24T23:09:01.3294236Z error: expected `{`, found `=>`
2019-10-24T23:09:01.3302287Z     |
2019-10-24T23:09:01.3302287Z     |
2019-10-24T23:09:01.3303148Z 330 |         if self.prev_span == syntax_pos::DUMMY_SP => {
2019-10-24T23:09:01.3303957Z     |         --                                        ^^ expected `{`
2019-10-24T23:09:01.3305028Z     |         this `if` statement has a condition, but no block
2019-10-24T23:09:01.3305297Z 
2019-10-24T23:09:07.7064250Z error: aborting due to previous error
2019-10-24T23:09:07.7069522Z 
---
2019-10-24T23:09:11.4356399Z   local time: Thu Oct 24 23:09:11 UTC 2019
2019-10-24T23:09:11.5863308Z   network time: Thu, 24 Oct 2019 23:09:11 GMT
2019-10-24T23:09:11.5864839Z == end clock drift check ==
2019-10-24T23:09:12.6453898Z 
2019-10-24T23:09:12.6573142Z ##[error]Bash exited with code '1'.
2019-10-24T23:09:12.6625688Z ##[section]Starting: Checkout
2019-10-24T23:09:12.6627837Z ==============================================================================
2019-10-24T23:09:12.6627913Z Task         : Get sources
2019-10-24T23:09:12.6627961Z 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:recover-missing-semi branch from de4d5fb to 01741d2 Oct 25, 2019
@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Oct 25, 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-10-25T00:57:42.1391084Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-25T00:57:42.1611151Z ##[command]git config gc.auto 0
2019-10-25T00:57:42.1694961Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-25T00:57:42.1769362Z ##[command]git config --get-all http.proxy
2019-10-25T00:57:42.1932507Z ##[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/65640/merge:refs/remotes/pull/65640/merge
---
2019-10-25T02:02:41.0486538Z .................................................................................................... 1600/9241
2019-10-25T02:02:46.7332239Z .................................................................................................... 1700/9241
2019-10-25T02:02:59.6868818Z .....................................................i...............i.............................. 1800/9241
2019-10-25T02:03:08.4182911Z .................................................................................................... 1900/9241
2019-10-25T02:03:22.9370799Z ...........................................iiiii.................................................... 2000/9241
2019-10-25T02:03:33.9088515Z .................................................................................................... 2200/9241
2019-10-25T02:03:36.9274611Z .................................................................................................... 2300/9241
2019-10-25T02:03:40.8722215Z .................................................................................................... 2400/9241
2019-10-25T02:04:04.6816400Z .................................................................................................... 2500/9241
---
2019-10-25T02:07:02.8782677Z ...............................................i...............i.................................... 4800/9241
2019-10-25T02:07:12.1448295Z .................................................................................................... 4900/9241
2019-10-25T02:07:21.1192654Z .................................................................................................... 5000/9241
2019-10-25T02:07:28.0213331Z .................................................................................................... 5100/9241
2019-10-25T02:07:38.2813044Z ...............................................ii.ii................................................ 5200/9241
2019-10-25T02:07:48.6057500Z .................................................................................................... 5400/9241
2019-10-25T02:07:58.6643174Z .................................................................................................... 5500/9241
2019-10-25T02:08:06.1614793Z ..............i..................................................................................... 5600/9241
2019-10-25T02:08:12.0507342Z .................................................................................................... 5700/9241
2019-10-25T02:08:12.0507342Z .................................................................................................... 5700/9241
2019-10-25T02:08:24.7044940Z .................................................................................................... 5800/9241
2019-10-25T02:08:37.2882110Z ...........ii...i..ii...........i................................................................... 5900/9241
2019-10-25T02:08:59.2825387Z .................................................................................................... 6100/9241
2019-10-25T02:09:08.2698315Z .................................................................................................... 6200/9241
2019-10-25T02:09:08.2698315Z .................................................................................................... 6200/9241
2019-10-25T02:09:23.7633357Z .................................i..ii.............................................................. 6300/9241
2019-10-25T02:09:45.9684327Z ...................................................................................................i 6500/9241
2019-10-25T02:09:48.2938897Z .................................................................................................... 6600/9241
2019-10-25T02:09:50.6663353Z ..........................................................................i......................... 6700/9241
2019-10-25T02:09:53.5706817Z .................................................................................................... 6800/9241
---
2019-10-25T02:14:07.6504458Z diff of stderr:
2019-10-25T02:14:07.6504748Z 
2019-10-25T02:14:07.6505086Z 8   --> $DIR/issue-39616.rs:1:16
2019-10-25T02:14:07.6505143Z 9    |
2019-10-25T02:14:07.6505213Z 10 LL | fn foo(a: [0; 1]) {}
2019-10-25T02:14:07.6505886Z -    |                ^ expected one of `)`, `,`, `->`, `where`, or `{` here
2019-10-25T02:14:07.6506052Z 12 
2019-10-25T02:14:07.6506103Z 13 error: aborting due to 2 previous errors
2019-10-25T02:14:07.6506151Z 14 
2019-10-25T02:14:07.6506183Z 
2019-10-25T02:14:07.6506183Z 
2019-10-25T02:14:07.6506228Z 
2019-10-25T02:14:07.6506280Z The actual stderr differed from the expected stderr.
2019-10-25T02:14:07.6506670Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-39616/issue-39616.stderr
2019-10-25T02:14:07.6506978Z To update references, rerun the tests and pass the `--bless` flag
2019-10-25T02:14:07.6507322Z To only update this specific test, also pass `--test-args issues/issue-39616.rs`
2019-10-25T02:14:07.6507432Z error: 1 errors occurred comparing output.
2019-10-25T02:14:07.6507504Z status: exit code: 1
2019-10-25T02:14:07.6507504Z status: exit code: 1
2019-10-25T02:14:07.6508342Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-39616.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-39616" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-39616/auxiliary" "-A" "unused"
2019-10-25T02:14:07.6508741Z ------------------------------------------
2019-10-25T02:14:07.6508783Z 
2019-10-25T02:14:07.6509356Z ------------------------------------------
2019-10-25T02:14:07.6509432Z stderr:
2019-10-25T02:14:07.6509432Z stderr:
2019-10-25T02:14:07.6509762Z ------------------------------------------
2019-10-25T02:14:07.6509857Z error: expected type, found `0`
2019-10-25T02:14:07.6510137Z   --> /checkout/src/test/ui/issues/issue-39616.rs:1:12
2019-10-25T02:14:07.6510196Z    |
2019-10-25T02:14:07.6510267Z LL | fn foo(a: [0; 1]) {} //~ ERROR expected type, found `0`
2019-10-25T02:14:07.6510582Z 
2019-10-25T02:14:07.6510582Z 
2019-10-25T02:14:07.6510925Z error: expected one of `)`, `,`, `->`, `where`, or `{`, found `]`
2019-10-25T02:14:07.6511247Z   --> /checkout/src/test/ui/issues/issue-39616.rs:1:16
2019-10-25T02:14:07.6511305Z    |
2019-10-25T02:14:07.6511359Z LL | fn foo(a: [0; 1]) {} //~ ERROR expected type, found `0`
2019-10-25T02:14:07.6511467Z 
2019-10-25T02:14:07.6511518Z error: aborting due to 2 previous errors
2019-10-25T02:14:07.6511552Z 
2019-10-25T02:14:07.6511583Z 
---
2019-10-25T02:14:07.6548109Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-10-25T02:14:07.6548210Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-10-25T02:14:07.6565252Z 
2019-10-25T02:14:07.6565500Z 
2019-10-25T02:14:07.6567788Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-10-25T02:14:07.6568357Z 
2019-10-25T02:14:07.6568394Z 
2019-10-25T02:14:07.6581669Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-10-25T02:14:07.6581794Z Build completed unsuccessfully in 1:09:36
2019-10-25T02:14:07.6581794Z Build completed unsuccessfully in 1:09:36
2019-10-25T02:14:07.6641744Z == clock drift check ==
2019-10-25T02:14:07.6658739Z   local time: Fri Oct 25 02:14:07 UTC 2019
2019-10-25T02:14:07.9470790Z   network time: Fri, 25 Oct 2019 02:14:07 GMT
2019-10-25T02:14:07.9476413Z == end clock drift check ==
2019-10-25T02:14:09.1039260Z 
2019-10-25T02:14:09.1150995Z ##[error]Bash exited with code '1'.
2019-10-25T02:14:09.1216325Z ##[section]Starting: Checkout
2019-10-25T02:14:09.1218466Z ==============================================================================
2019-10-25T02:14:09.1218530Z Task         : Get sources
2019-10-25T02:14:09.1218602Z 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)

@bors

This comment was marked as resolved.

Copy link
Contributor

bors commented Oct 25, 2019

☔️ The latest upstream changes (presumably #65793) made this pull request unmergeable. Please resolve the merge conflicts.

@estebank estebank force-pushed the estebank:recover-missing-semi branch from 01741d2 to 1c1778b Oct 25, 2019
LL | let _ = 3;
| ^^^
| --- unexpected token

This comment has been minimized.

Copy link
@estebank

estebank Oct 25, 2019

Author Contributor

I like the look of this error, but it is slightly misleading because it could have been any of the other expected tokens, but given it was followed by a "token capable of starting statement", I feel comfortable to ignore the other possibilities. What do you think?

This comment has been minimized.

Copy link
@Centril

Centril Oct 26, 2019

Member

Seems reasonable as a heuristic. You could optionally add a note below for the additional expected tokens. I'll leave that up to you.

--> $DIR/issue-54441.rs:3:9
|
LL | let
| ^^^ unexpected token
| ^^^ expected one of `crate`, `fn`, `pub`, `static`, or `type` here

This comment has been minimized.

Copy link
@JeanMertz

JeanMertz Oct 26, 2019

In the change above this one the word here is removed in this PR (“ ^^ expected fn here”), while it is still present in this change.

Is that as intended?

This comment has been minimized.

Copy link
@estebank

estebank Oct 28, 2019

Author Contributor

Updated these as well, but they affect a huge amount of tests, I'll leave it as a separate PR.

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Oct 26, 2019

r=me with or without the additional note and "here".

estebank added 3 commits Oct 20, 2019
- Detect `,` and `:` typos where `;` was intended.
- When the next token could have been the start of a new statement,
  detect a missing semicolon.
@estebank estebank force-pushed the estebank:recover-missing-semi branch 2 times, most recently from 3a7e597 to e8016c2 Oct 28, 2019
@estebank

This comment has been minimized.

Copy link
Contributor Author

estebank commented Oct 28, 2019

@bors r=Centril

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 28, 2019

📌 Commit e8016c2 has been approved by Centril

Centril added a commit to Centril/rust that referenced this pull request Oct 28, 2019
…ntril

Use heuristics to recover parsing of missing `;`

- Detect `,` and `:` typos where `;` was intended.
- When the next token could have been the start of a new statement,
  detect a missing semicolon.

Fix rust-lang#48160, fix rust-lang#44767 (after adding note about statements).
bors added a commit that referenced this pull request Oct 28, 2019
Rollup of 9 pull requests

Successful merges:

 - #65563 (Add long error explanation for E0587)
 - #65640 (Use heuristics to recover parsing of missing `;`)
 - #65643 (Correct handling of type flags with `ConstValue::Placeholder`)
 - #65825 (rustc: use IndexVec<DefIndex, T> instead of Vec<T>.)
 - #65858 (suggest `const_in_array_repeat_expression` flag)
 - #65877 (doc: introduce `once` in `iter::chain` document)
 - #65887 (doc: mention `get(_mut)` in Vec)
 - #65891 (self-profiling: Record something more useful for crate metadata generation event.)
 - #65893 (Output previous stable  error messaging when using stable build.)

Failed merges:

r? @ghost
@bors bors merged commit e8016c2 into rust-lang:master Oct 29, 2019
4 checks passed
4 checks passed
pr Build #20191028.55 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
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 29, 2019

☔️ The latest upstream changes (presumably #65907) made this pull request unmergeable. Please resolve the merge conflicts.

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.