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

EXPERIMENT: Recover on stmts/exprs at module level, suggesting to wrap in function #69445

Closed
wants to merge 2 commits into from

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Feb 24, 2020

Suppose we have the following file, let's call it foo.rs:

$ cat foo.rs

x.y(); //~ ERROR statements cannot reside in modules
let x = 0;
x;

In that case, we will attempt to parse these contiguous sequence of statements as-if they were part of a function body, recover, and suggest that the user move the statements into a function:

error: statements cannot reside in modules
  --> $DIR/recover-statements-not-main.rs:21:1
   |
LL | x.y();
   | ^^^^^^
LL | let x = 0;
LL | x;
   | ^^
   |
   = note: the program entry point starts in `fn main() { ... }`, defined in `main.rs`
   = note: for more on functions and how to structure your program, see https://doc.rust-lang.org/book/ch03-03-how-functions-work.html
help: consider moving the statements into a function
   |
LL | fn my_function() { x.y(); let x = 0; x; }
   |

When emitting the error, we also attempt lightweight return type inference based on the parsed list of statements. In particular, if we detect return we assume a default return type (fn foo() { ... }), if we find return $expr or a tail expression, we assume not-() and suggest -> _, if we find $expr? we suggest -> Result<_, _>. Finally, we also attempt to account for fn main as the function name by considering the inference result as well as the file name.

After parsing the sequence of statements, we will continue by parsing an item, and if that fails, we again attempt statement parsing as above, and so on, and so forth. That is, we interleave item parsing with statement-list-as-function-body parsing.

This PR implements the "super goal" in #69366 (comment).

r? @petrochenkov @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 24, 2020
= note: for more on functions and how to structure your program, see https://doc.rust-lang.org/book/ch03-03-how-functions-work.html
help: consider moving the statements into a function
|
LL | fn my_function() { x.y(); let x = 0; x; }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why this is saying my_function as opposed to main.

Comment on lines +351 to +364
// We're in statement-as-module-item recovery mode.
// To avoid "stealing" syntax from e.g. `x.f()` as a module-level statement,
// we backtrack if we failed to parse `$path!`; after we have, we commit firmly.
// This is only done when `mod_stmt` holds to avoid backtracking inside functions.
let snapshot = self.clone();
match parse_prefix(self) {
Ok(path) => path,
Err(mut err) => {
// Assert that this is only for diagnostics!
// This is a safeguard against breaking LL(k) accidentally in the spec,
// assuming no one has gated the syntax with something like `#[cfg(FALSE)]`.
err.delay_as_bug();
*self = snapshot;
return Ok(None);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This use of backtracking bears some discussion. It only happens outside of function bodies to avoid regressing perf or accepting more syntax. In the case of module level, if we hit EOF we will not even attempt parsing an item so it shouldn't have a perf implication that way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

An alternative to this might be bounded look-ahead for some fixed k, but that is ostensibly less good for diagnostics and trickier to encode correctly. Path parsing is also rarely long and $path! is a fairly unique sequence of tokens.

Copy link
Contributor

@estebank estebank Feb 25, 2020

Choose a reason for hiding this comment

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

I would add another closure or fn can_begin_macro that checks one token for is_ident and two tokens for either :: or !, and only clone if neither are true. That would keep the cost of cloning down for the happy path at the cost of marginally worse diagnostics.

@Centril
Copy link
Contributor Author

Centril commented Feb 24, 2020

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Feb 24, 2020

⌛ Trying commit 0748f60 with merge 3d8877b...

bors added a commit that referenced this pull request Feb 24, 2020
EXPERIMENT: Recover on stmts/exprs at module level, suggesting to wrap in function

TODO: write description

r? @petrochenkov @estebank
Comment on lines +1 to +12
error: statements cannot reside in modules
--> $DIR/issue-49040.rs:1:28
|
LL | #![allow(unused_variables)];
| ^ help: remove this semicolon
| ^
|
= note: the program entry point starts in `fn main() { ... }`, defined in `main.rs`
= note: for more on functions and how to structure your program, see https://doc.rust-lang.org/book/ch03-03-how-functions-work.html
help: consider moving the statements into a function
|
LL | #![allow(unused_variables)]fn my_function() { }
| ^^^^^^^^^^^^^^^^^^^^
Copy link
Contributor

Choose a reason for hiding this comment

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

This is enough of a regression that it should be accounted for, IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would suggest #69445 (comment) to fix it.

--> $DIR/pub-restricted-error-fn.rs:1:12
|
LL | pub(crate) () fn foo() {}
| ^ expected item
| ^^
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems less than ideal. I think when we're midway some item head, we should not emit the suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But is this a common case? And if it is, does the first error not suggest what the problem is and how to fix it? And is it not better to recover than to fatally error? Otherwise we could have some flag when calling parse_item_common_ which signifies that we've parsed at least the visibility / defaultness, if you would prefer the error as-is, though that is adding code complexity, so consider whether this is common enough to be worth it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I read your comment again; it makes more sense now since you're talking only about the suggestion -- I think we could use the same flag and pass it in to avoid everything except for the primary message, and instead do "remove the statements".

Comment on lines +221 to 226
} else {
None
} {
// MACRO INVOCATION ITEM
(Ident::invalid(), ItemKind::Mac(self.parse_item_macro(vis)?))
(Ident::invalid(), ItemKind::Mac(kind))
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem right (} else { None } { (...) } else {)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would have preferred to write this with let-chains but they ain't implemented yet sadly.

// MACRO INVOCATION ITEM
(Ident::invalid(), ItemKind::Mac(self.parse_item_macro(vis)?))
(Ident::invalid(), ItemKind::Mac(kind))
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@estebank we could do something like:

Suggested change
} else {
} else if self.maybe_consume_incorrect_semicolon(&[]) {
let lo = self.token.span;
self.parse_item_kind(attrs, macros_allowed, lo, vis, def, req_name, mod_stmt)?
} else {

let span = lo.to(self.prev_span);
let spans: MultiSpan = match &*stmts {
[] | [_] => span.into(),
[x, .., y] => vec![x.span, y.span].into(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing that you didn't like the multiline span output for these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you mean; in the first arm the span spans as long as [first.span] would and in the case of [] it's unreachable (but I didn't unreachable!() because it's more code).

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean that the alternative was a single x.span.until(y.span).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do we want .until(...) though? That would leave out e.g. the end of the last statement? I would expect x.to(y) as the alternative, but that's equivalent to span.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switching to just span in all cases then. :)

visitor.visit_stmt(stmt);
}
if let StmtKind::Expr(_) = &stmts.last().unwrap().kind {
visitor.1 = true; // The tail expression.
Copy link
Contributor

Choose a reason for hiding this comment

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

The tail expression will be somewhat arbitrary in real code. Don't know if this part is worth it or it will be noisier than we'd wish.

Copy link
Contributor

Choose a reason for hiding this comment

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

Up to a point, after we've shown the user how to write a function, if they forget to add a return type we'll guide them in the right direction in subsequent errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thinking is that worst case you get -> _ and you write that, and the compiler tells you to write -> () cause it's inferring the return type.

Comment on lines 680 to 682
fn parse_assoc_item(&mut self, req_name: ReqName) -> PResult<'a, Option<Option<P<AssocItem>>>> {
Ok(self.parse_item_(req_name)?.map(|Item { attrs, id, span, vis, ident, kind, tokens }| {
let item = self.parse_item_(req_name)?;
Ok(item.map(|Item { attrs, id, span, vis, ident, kind, tokens }| {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should handle the missing closing brace case somehow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't that handled in parse_item_list? Not sure what the relation to this PR is though.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 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.
2020-02-24T23:11:35.3311918Z ========================== Starting Command Output ===========================
2020-02-24T23:11:35.3316873Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/4d46edc7-f56c-42a0-87a9-b8b4757924c7.sh
2020-02-24T23:11:35.3317483Z 
2020-02-24T23:11:35.3321439Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-24T23:11:35.3336570Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69445/merge to s
2020-02-24T23:11:35.3339335Z Task         : Get sources
2020-02-24T23:11:35.3339548Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-24T23:11:35.3339826Z Version      : 1.0.0
2020-02-24T23:11:35.3339971Z Author       : Microsoft
---
2020-02-24T23:11:36.6767091Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-24T23:11:36.6772948Z ##[command]git config gc.auto 0
2020-02-24T23:11:36.6776370Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-24T23:11:36.6779625Z ##[command]git config --get-all http.proxy
2020-02-24T23:11:36.6785653Z ##[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/69445/merge:refs/remotes/pull/69445/merge
---
2020-02-25T00:08:51.6031615Z .................................................................................................... 1700/9706
2020-02-25T00:08:55.5691928Z .................................................................................................... 1800/9706
2020-02-25T00:09:05.7986861Z ...........................................i........................................................ 1900/9706
2020-02-25T00:09:13.5188230Z .................................................................................................... 2000/9706
2020-02-25T00:09:25.8354769Z .................................iiiii.............................................................. 2100/9706
2020-02-25T00:09:34.4637288Z .................................................................................................... 2300/9706
2020-02-25T00:09:36.5068320Z .................................................................................................... 2400/9706
2020-02-25T00:09:40.2663572Z .................................................................................................... 2500/9706
2020-02-25T00:09:58.3838005Z .................................................................................................... 2600/9706
---
2020-02-25T00:12:19.0278922Z .........i.......................................................................................... 5000/9706
2020-02-25T00:12:26.9280831Z .................................................................................................... 5100/9706
2020-02-25T00:12:30.9811414Z ....................................i............................................................... 5200/9706
2020-02-25T00:12:39.6470534Z .................................................................................................... 5300/9706
2020-02-25T00:12:44.8513731Z ............ii.ii........i...i...................................................................... 5400/9706
2020-02-25T00:12:52.2175155Z .................................................................................................... 5600/9706
2020-02-25T00:13:01.6475865Z .................................................................................................... 5700/9706
2020-02-25T00:13:07.8623405Z ...i................................................................................................ 5800/9706
2020-02-25T00:13:12.7791678Z .................................................................................................... 5900/9706
2020-02-25T00:13:12.7791678Z .................................................................................................... 5900/9706
2020-02-25T00:13:21.5542119Z ..............................................................................................ii...i 6000/9706
2020-02-25T00:13:32.1861563Z ..ii...........i.................................................................................... 6100/9706
2020-02-25T00:13:46.7463686Z .................................................................................................... 6300/9706
2020-02-25T00:13:52.3034617Z .................................................................................................... 6400/9706
2020-02-25T00:13:52.3034617Z .................................................................................................... 6400/9706
2020-02-25T00:14:12.7682778Z .........................i..ii...................................................................... 6500/9706
2020-02-25T00:14:30.0683158Z .................................................................................................... 6700/9706
2020-02-25T00:14:32.0080828Z .................i.................................................................................. 6800/9706
2020-02-25T00:14:33.8835321Z .................................................................................................... 6900/9706
2020-02-25T00:14:35.8103449Z ...............................................i.................................................... 7000/9706
---
2020-02-25T00:16:04.1253613Z .................................................................................................... 7700/9706
2020-02-25T00:16:08.4505026Z .................................................................................................... 7800/9706
2020-02-25T00:16:14.4510716Z .............................................................................................i...... 7900/9706
2020-02-25T00:16:21.8833566Z .................................................................................................... 8000/9706
2020-02-25T00:16:28.3814920Z ..........................................iiiiiii.i................................................. 8100/9706
2020-02-25T00:16:41.0393461Z .................................................................................................... 8300/9706
2020-02-25T00:16:46.0817411Z .................................................................................................... 8400/9706
2020-02-25T00:16:59.6267898Z .................................................................................................... 8500/9706
2020-02-25T00:17:06.1621378Z .................................................................................................... 8600/9706
---
2020-02-25T00:19:11.0623621Z  finished in 6.342
2020-02-25T00:19:11.0798205Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-25T00:19:11.2594427Z 
2020-02-25T00:19:11.2595861Z running 178 tests
2020-02-25T00:19:13.7586969Z iiii......i...........ii..iiii...i....i...........i............i..i..................i....i......... 100/178
2020-02-25T00:19:15.7546491Z ...i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-02-25T00:19:15.7548504Z 
2020-02-25T00:19:15.7609559Z  finished in 4.675
2020-02-25T00:19:15.7723174Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-25T00:19:15.9230623Z 
---
2020-02-25T00:19:17.5839334Z  finished in 1.811
2020-02-25T00:19:17.6012599Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-25T00:19:17.7284990Z 
2020-02-25T00:19:17.7285196Z running 9 tests
2020-02-25T00:19:17.7286166Z iiiiiiiii
2020-02-25T00:19:17.7287045Z 
2020-02-25T00:19:17.7290626Z  finished in 0.127
2020-02-25T00:19:17.7430653Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-25T00:19:17.9104409Z 
---
2020-02-25T00:19:34.9298112Z  finished in 17.186
2020-02-25T00:19:34.9474386Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-25T00:19:35.1116907Z 
2020-02-25T00:19:35.1117331Z running 116 tests
2020-02-25T00:19:46.9908654Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-02-25T00:19:48.6577568Z ....iiii.....ii.
2020-02-25T00:19:48.6585245Z 
2020-02-25T00:19:48.6589229Z  finished in 13.711
2020-02-25T00:19:48.6596401Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-25T00:19:48.6597056Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-02-25T00:26:09.9461639Z ---- [rustdoc] rustdoc/playground-arg.rs stdout ----
2020-02-25T00:26:09.9461809Z 
2020-02-25T00:26:09.9461944Z error: rustdoc failed!
2020-02-25T00:26:09.9462108Z status: exit code: 1
2020-02-25T00:26:09.9463526Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/playground-arg/auxiliary" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/playground-arg" "/checkout/src/test/rustdoc/playground-arg.rs" "--playground-url=https://example.com/" "-Z" "unstable-options"
2020-02-25T00:26:09.9464733Z ------------------------------------------
2020-02-25T00:26:09.9464881Z 
2020-02-25T00:26:09.9465192Z ------------------------------------------
2020-02-25T00:26:09.9465364Z stderr:
2020-02-25T00:26:09.9465364Z stderr:
2020-02-25T00:26:09.9465640Z ------------------------------------------
2020-02-25T00:26:09.9466333Z thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:355:17
2020-02-25T00:26:09.9467110Z 
2020-02-25T00:26:09.9467404Z ------------------------------------------
2020-02-25T00:26:09.9467546Z 
2020-02-25T00:26:09.9467644Z 
2020-02-25T00:26:09.9467644Z 
2020-02-25T00:26:09.9467968Z ---- [rustdoc] rustdoc/process-termination.rs stdout ----
2020-02-25T00:26:09.9468133Z 
2020-02-25T00:26:09.9468262Z error: rustdoc failed!
2020-02-25T00:26:09.9468448Z status: exit code: 101
2020-02-25T00:26:09.9469748Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/process-termination/auxiliary" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/process-termination" "/checkout/src/test/rustdoc/process-termination.rs" "--test"
2020-02-25T00:26:09.9471059Z ------------------------------------------
2020-02-25T00:26:09.9471192Z 
2020-02-25T00:26:09.9471317Z running 3 tests
2020-02-25T00:26:09.9471735Z test /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14) ... FAILED
2020-02-25T00:26:09.9471735Z test /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14) ... FAILED
2020-02-25T00:26:09.9472309Z test /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20) ... FAILED
2020-02-25T00:26:09.9472859Z test /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 7) ... ok
2020-02-25T00:26:09.9473070Z 
2020-02-25T00:26:09.9473169Z failures:
2020-02-25T00:26:09.9473254Z 
2020-02-25T00:26:09.9473670Z ---- /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14) stdout ----
2020-02-25T00:26:09.9474413Z thread '/checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14)' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:355:17
2020-02-25T00:26:09.9475077Z 
2020-02-25T00:26:09.9475473Z ---- /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20) stdout ----
2020-02-25T00:26:09.9475473Z ---- /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20) stdout ----
2020-02-25T00:26:09.9476221Z thread '/checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20)' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:355:17
2020-02-25T00:26:09.9476645Z 
2020-02-25T00:26:09.9476922Z failures:
2020-02-25T00:26:09.9477346Z     /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14)
2020-02-25T00:26:09.9477865Z     /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20)
---
2020-02-25T00:26:09.9482631Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-02-25T00:26:09.9482948Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-02-25T00:26:09.9483125Z 
2020-02-25T00:26:09.9483216Z 
2020-02-25T00:26:09.9488720Z 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" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/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" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-02-25T00:26:09.9491382Z 
2020-02-25T00:26:09.9491462Z 
2020-02-25T00:26:09.9491651Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-02-25T00:26:09.9491942Z Build completed unsuccessfully in 1:07:19
2020-02-25T00:26:09.9491942Z Build completed unsuccessfully in 1:07:19
2020-02-25T00:26:09.9522683Z == clock drift check ==
2020-02-25T00:26:09.9538849Z   local time: Tue Feb 25 00:26:09 UTC 2020
2020-02-25T00:26:10.2433978Z   network time: Tue, 25 Feb 2020 00:26:10 GMT
2020-02-25T00:26:10.2434867Z == end clock drift check ==
2020-02-25T00:26:11.6555318Z 
2020-02-25T00:26:11.6621704Z ##[error]Bash exited with code '1'.
2020-02-25T00:26:11.6632476Z ##[section]Finishing: Run build
2020-02-25T00:26:11.6673694Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69445/merge to s
2020-02-25T00:26:11.6677762Z Task         : Get sources
2020-02-25T00:26:11.6678023Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-25T00:26:11.6678263Z Version      : 1.0.0
2020-02-25T00:26:11.6678445Z Author       : Microsoft
2020-02-25T00:26:11.6678445Z Author       : Microsoft
2020-02-25T00:26:11.6678725Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-25T00:26:11.6679034Z ==============================================================================
2020-02-25T00:26:11.9686881Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-25T00:26:11.9732197Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69445/merge to s
2020-02-25T00:26:11.9808543Z Cleaning up task key
2020-02-25T00:26:11.9809835Z Start cleaning up orphan processes.
2020-02-25T00:26:12.0014993Z Terminate orphan process: pid (4297) (python)
2020-02-25T00:26:12.0214961Z ##[section]Finishing: Finalize Job

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)

@rust-highfive
Copy link
Collaborator

The job dist-x86_64-linux-alt 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.
2020-02-25T01:00:40.1203538Z     Checking core v0.0.0 (/checkout/src/libcore)
2020-02-25T01:00:47.9204519Z    Compiling compiler_builtins v0.1.25
2020-02-25T01:00:54.6509984Z     Checking rustc-std-workspace-core v1.99.0 (/checkout/src/tools/rustc-std-workspace-core)
2020-02-25T01:00:57.0421962Z  Documenting alloc v0.0.0 (/checkout/src/liballoc)
2020-02-25T01:00:59.1671528Z thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:355:17
2020-02-25T01:00:59.2500206Z error: Could not document `alloc`.
2020-02-25T01:00:59.2500490Z 
2020-02-25T01:00:59.2500639Z Caused by:
2020-02-25T01:00:59.2500639Z Caused by:
2020-02-25T01:00:59.2503157Z   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2018 --crate-type lib --crate-name alloc src/liballoc/lib.rs --target x86_64-unknown-linux-gnu -o /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/doc --cfg 'feature="compiler-builtins-c"' --error-format=json --json=diagnostic-rendered-ansi --markdown-css rust.css --markdown-no-toc --generate-redirect-pages --resource-suffix 1.43.0 --index-page /checkout/src/doc/index.md -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-36783e0ef99b38ac.rmeta --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libcore-af6810a058aa653a.rmeta` (exit code: 1)
2020-02-25T01:00:59.2533732Z 
2020-02-25T01:00:59.2533732Z 
2020-02-25T01:00:59.2536091Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustdoc" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace profiler compiler-builtins-c" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "-Z" "unstable-options" "-p" "alloc" "--" "--markdown-css" "rust.css" "--markdown-no-toc" "--generate-redirect-pages" "--resource-suffix" "1.43.0" "--index-page" "/checkout/src/doc/index.md"
2020-02-25T01:00:59.2537395Z 
2020-02-25T01:00:59.2537492Z 
2020-02-25T01:00:59.2546928Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --host x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu
2020-02-25T01:00:59.2547389Z Build completed unsuccessfully in 1:35:01
2020-02-25T01:00:59.2547389Z Build completed unsuccessfully in 1:35:01
2020-02-25T01:00:59.2602707Z == clock drift check ==
2020-02-25T01:00:59.2625026Z   local time: Tue Feb 25 01:00:59 UTC 2020
2020-02-25T01:00:59.7736971Z   network time: Tue, 25 Feb 2020 01:00:59 GMT
2020-02-25T01:00:59.7739835Z == end clock drift check ==
2020-02-25T01:01:01.0444599Z 
2020-02-25T01:01:01.0518785Z ##[error]Bash exited with code '1'.
2020-02-25T01:01:01.0604593Z ##[section]Starting: Checkout rust-lang/rust@try to s
2020-02-25T01:01:01.0609430Z ==============================================================================
2020-02-25T01:01:01.0609790Z Task         : Get sources
2020-02-25T01:01:01.0610350Z 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
Copy link
Contributor

bors commented Feb 25, 2020

💔 Test failed - checks-azure

@bors bors 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 Feb 25, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 25, 2020
…bank

Minor refactoring of statement parsing

Extracted out of rust-lang#69445.

r? @estebank
@petrochenkov petrochenkov 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 Feb 25, 2020
@bors

This comment has been minimized.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 26, 2020
…bank

Minor refactoring of statement parsing

Extracted out of rust-lang#69445.

r? @estebank
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 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.
2020-02-26T22:39:14.5638230Z ========================== Starting Command Output ===========================
2020-02-26T22:39:14.5640491Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/ff717144-c36b-4936-8e8c-75741e30e3d1.sh
2020-02-26T22:39:14.5640684Z 
2020-02-26T22:39:14.5643242Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-26T22:39:14.5668469Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69445/merge to s
2020-02-26T22:39:14.5674039Z Task         : Get sources
2020-02-26T22:39:14.5675552Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-26T22:39:14.5675907Z Version      : 1.0.0
2020-02-26T22:39:14.5676102Z Author       : Microsoft
---
2020-02-26T22:39:15.5606238Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-26T22:39:15.5617293Z ##[command]git config gc.auto 0
2020-02-26T22:39:15.5784615Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-26T22:39:15.5787477Z ##[command]git config --get-all http.proxy
2020-02-26T22:39:15.5792792Z ##[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/69445/merge:refs/remotes/pull/69445/merge
---
2020-02-26T23:35:52.5879320Z .................................................................................................... 1700/9735
2020-02-26T23:35:56.4812292Z .................................................................................................... 1800/9735
2020-02-26T23:36:06.5736846Z ....................................................................i............................... 1900/9735
2020-02-26T23:36:12.6565322Z .................................................................................................... 2000/9735
2020-02-26T23:36:25.8368766Z ..........................................................iiii.i.................................... 2100/9735
2020-02-26T23:36:34.9191952Z .................................................................................................... 2300/9735
2020-02-26T23:36:36.8564594Z .................................................................................................... 2400/9735
2020-02-26T23:36:39.5175007Z .................................................................................................... 2500/9735
2020-02-26T23:36:58.2101728Z .................................................................................................... 2600/9735
---
2020-02-26T23:39:15.5446834Z ..................i...............i................................................................. 5000/9735
2020-02-26T23:39:23.9585076Z .................................................................................................... 5100/9735
2020-02-26T23:39:29.0252839Z .............................................................i...................................... 5200/9735
2020-02-26T23:39:35.0649901Z .................................................................................................... 5300/9735
2020-02-26T23:39:42.9213134Z ......................................ii.ii........i...i............................................ 5400/9735
2020-02-26T23:39:51.4685869Z .................................................................................................... 5600/9735
2020-02-26T23:39:59.6866181Z .................................................................................................... 5700/9735
2020-02-26T23:40:05.7645013Z .............................i...................................................................... 5800/9735
2020-02-26T23:40:10.9599705Z .................................................................................................... 5900/9735
2020-02-26T23:40:10.9599705Z .................................................................................................... 5900/9735
2020-02-26T23:40:21.2096353Z .................................................................................................... 6000/9735
2020-02-26T23:40:29.9327912Z ....................ii...i..ii...........i.......................................................... 6100/9735
2020-02-26T23:40:45.2125798Z .................................................................................................... 6300/9735
2020-02-26T23:40:51.3622703Z .................................................................................................... 6400/9735
2020-02-26T23:40:51.3622703Z .................................................................................................... 6400/9735
2020-02-26T23:41:04.0918672Z ...................................................i..ii............................................ 6500/9735
2020-02-26T23:41:26.0317663Z .................................................................................................... 6700/9735
2020-02-26T23:41:28.0786241Z ...........................................i........................................................ 6800/9735
2020-02-26T23:41:29.9400013Z .................................................................................................... 6900/9735
2020-02-26T23:41:31.9375026Z .........................................................................i.......................... 7000/9735
---
2020-02-26T23:43:00.1411871Z .................................................................................................... 7700/9735
2020-02-26T23:43:04.5050609Z .................................................................................................... 7800/9735
2020-02-26T23:43:09.5178252Z .................................................................................................... 7900/9735
2020-02-26T23:43:16.8394020Z ....................i............................................................................... 8000/9735
2020-02-26T23:43:24.5848524Z .....................................................................iiiiiii.i...................... 8100/9735
2020-02-26T23:43:38.0167064Z ..........i......i.................................................................................. 8300/9735
2020-02-26T23:43:42.5775504Z .................................................................................................... 8400/9735
2020-02-26T23:43:53.8225708Z .................................................................................................... 8500/9735
2020-02-26T23:44:01.8641460Z .................................................................................................... 8600/9735
---
2020-02-26T23:46:04.8898686Z  finished in 6.280
2020-02-26T23:46:04.9049415Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-26T23:46:05.0759711Z 
2020-02-26T23:46:05.0760053Z running 178 tests
2020-02-26T23:46:07.4630186Z iiii......i...........ii..iiii...i....i...........i............i..i..................i....i......... 100/178
2020-02-26T23:46:09.4961575Z ...i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-02-26T23:46:09.4963582Z 
2020-02-26T23:46:09.4967759Z  finished in 4.592
2020-02-26T23:46:09.5116929Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-26T23:46:09.6536922Z 
---
2020-02-26T23:46:11.3218998Z  finished in 1.810
2020-02-26T23:46:11.3391795Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-26T23:46:11.4689313Z 
2020-02-26T23:46:11.4690085Z running 9 tests
2020-02-26T23:46:11.4691933Z iiiiiiiii
2020-02-26T23:46:11.4694113Z 
2020-02-26T23:46:11.4695458Z  finished in 0.130
2020-02-26T23:46:11.4880817Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-26T23:46:11.6941174Z 
---
2020-02-26T23:46:28.4032407Z  finished in 16.915
2020-02-26T23:46:28.4200290Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-26T23:46:28.5842080Z 
2020-02-26T23:46:28.5842376Z running 116 tests
2020-02-26T23:46:39.9297423Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-02-26T23:46:41.4883387Z ....iiii.....ii.
2020-02-26T23:46:41.4886985Z 
2020-02-26T23:46:41.4887362Z  finished in 13.068
2020-02-26T23:46:41.4889850Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-26T23:46:41.4890496Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-02-26T23:53:04.6519494Z ---- [rustdoc] rustdoc/playground-arg.rs stdout ----
2020-02-26T23:53:04.6519649Z 
2020-02-26T23:53:04.6519792Z error: rustdoc failed!
2020-02-26T23:53:04.6519946Z status: exit code: 1
2020-02-26T23:53:04.6521145Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/playground-arg/auxiliary" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/playground-arg" "/checkout/src/test/rustdoc/playground-arg.rs" "--playground-url=https://example.com/" "-Z" "unstable-options"
2020-02-26T23:53:04.6522181Z ------------------------------------------
2020-02-26T23:53:04.6522315Z 
2020-02-26T23:53:04.6522611Z ------------------------------------------
2020-02-26T23:53:04.6522766Z stderr:
2020-02-26T23:53:04.6522766Z stderr:
2020-02-26T23:53:04.6523042Z ------------------------------------------
2020-02-26T23:53:04.6523798Z thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:355:17
2020-02-26T23:53:04.6524545Z 
2020-02-26T23:53:04.6524889Z ------------------------------------------
2020-02-26T23:53:04.6525020Z 
2020-02-26T23:53:04.6525573Z 
2020-02-26T23:53:04.6525573Z 
2020-02-26T23:53:04.6529849Z ---- [rustdoc] rustdoc/process-termination.rs stdout ----
2020-02-26T23:53:04.6530060Z 
2020-02-26T23:53:04.6530191Z error: rustdoc failed!
2020-02-26T23:53:04.6530362Z status: exit code: 101
2020-02-26T23:53:04.6532031Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/process-termination/auxiliary" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/process-termination" "/checkout/src/test/rustdoc/process-termination.rs" "--test"
2020-02-26T23:53:04.6533170Z ------------------------------------------
2020-02-26T23:53:04.6533326Z 
2020-02-26T23:53:04.6533436Z running 3 tests
2020-02-26T23:53:04.6533864Z test /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14) ... FAILED
2020-02-26T23:53:04.6533864Z test /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14) ... FAILED
2020-02-26T23:53:04.6534549Z test /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20) ... FAILED
2020-02-26T23:53:04.6535135Z test /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 7) ... ok
2020-02-26T23:53:04.6535349Z 
2020-02-26T23:53:04.6535467Z failures:
2020-02-26T23:53:04.6535552Z 
2020-02-26T23:53:04.6535957Z ---- /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14) stdout ----
2020-02-26T23:53:04.6536718Z thread '/checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14)' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:355:17
2020-02-26T23:53:04.6537561Z 
2020-02-26T23:53:04.6538742Z ---- /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20) stdout ----
2020-02-26T23:53:04.6538742Z ---- /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20) stdout ----
2020-02-26T23:53:04.6539781Z thread '/checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20)' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:355:17
2020-02-26T23:53:04.6540480Z 
2020-02-26T23:53:04.6540635Z failures:
2020-02-26T23:53:04.6541198Z     /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 14)
2020-02-26T23:53:04.6542369Z     /checkout/src/test/rustdoc/process-termination.rs - check_process_termination (line 20)
---
2020-02-26T23:53:04.6546772Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-02-26T23:53:04.6547101Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-02-26T23:53:04.6547313Z 
2020-02-26T23:53:04.6547386Z 
2020-02-26T23:53:04.6550408Z 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" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/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" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-02-26T23:53:04.6552643Z 
2020-02-26T23:53:04.6552717Z 
2020-02-26T23:53:04.6564946Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-02-26T23:53:04.6565222Z Build completed unsuccessfully in 1:07:47
2020-02-26T23:53:04.6565222Z Build completed unsuccessfully in 1:07:47
2020-02-26T23:53:04.6595600Z == clock drift check ==
2020-02-26T23:53:04.6613144Z   local time: Wed Feb 26 23:53:04 UTC 2020
2020-02-26T23:53:05.2119883Z   network time: Wed, 26 Feb 2020 23:53:05 GMT
2020-02-26T23:53:05.2121634Z == end clock drift check ==
2020-02-26T23:53:06.5917241Z 
2020-02-26T23:53:06.5982222Z ##[error]Bash exited with code '1'.
2020-02-26T23:53:06.5996052Z ##[section]Finishing: Run build
2020-02-26T23:53:06.6039091Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69445/merge to s
2020-02-26T23:53:06.6043649Z Task         : Get sources
2020-02-26T23:53:06.6044336Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-26T23:53:06.6044764Z Version      : 1.0.0
2020-02-26T23:53:06.6044956Z Author       : Microsoft
2020-02-26T23:53:06.6044956Z Author       : Microsoft
2020-02-26T23:53:06.6045265Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-26T23:53:06.6045600Z ==============================================================================
2020-02-26T23:53:06.9185821Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-26T23:53:06.9226103Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69445/merge to s
2020-02-26T23:53:06.9301473Z Cleaning up task key
2020-02-26T23:53:06.9302453Z Start cleaning up orphan processes.
2020-02-26T23:53:06.9592385Z Terminate orphan process: pid (4437) (python)
2020-02-26T23:53:06.9651200Z ##[section]Finishing: Finalize Job

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
Copy link
Contributor

bors commented Feb 28, 2020

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

@petrochenkov
Copy link
Contributor

I expected parsing the contents of a module/trait/impl/extern-block as a list of statements, then filtering-repackaging it into free/associated/foreign items, not trying to do recovery as a statement for something that can't be parsed as an item (which would of course require backtracking).

My goal here is unifying parsing first of all, then thinking about diagnostics, so my suggested staging here would be

  • Unify parsing, report a minimal "statements cannot reside here" error for every non-item statement.
  • Beautify diagnostics, suggest packaging non-item statements into functions, whatever, I'm not too interested in reviewing this.

@petrochenkov petrochenkov 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 Feb 29, 2020
@petrochenkov
Copy link
Contributor

[triage] This PR's status wasn't updated in two weeks or more, if it isn't updated in two more weeks the PR will be closed due to inactivity.

@Dylan-DPC-zz Dylan-DPC-zz added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants