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

Rollup of 16 pull requests #73939

Closed
wants to merge 47 commits into from

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

calebzulawski and others added 30 commits June 13, 2020 01:18
This commit applies the existing 'extra angle bracket recovery' logic
when parsing fields in struct definitions. This allows us to continue
parsing the struct's fields, avoiding spurious 'missing field' errors in
code that tries to use the struct.
Use back-ticks instead of quotation marks in docs for the block comment
variant of TokenKind.
Also adds back-ticks when referring to the contents of this collection.
Emscripten's SDK recently bumped the version of NodeJS they shipped, but
our Dockerfile for the wasm32 builder hardcoded the version number. This
will cause consistent CI failures once the currently cached image is
rebuilt (either due to a change or due to the cache expiring).

This commit fixes the problem by finding the latest version of NodeJS in
the Emscripten SDK and symlinking it to a "latest" directory, which is
then added to the PATH.
When a `macro_rules!` macro expands to another `macro_rules!` macro, we
may see `None`-delimited groups in odd places when another crate
deserializes the 'inner' macro. This commit 'unwraps' an outer
`None`-delimited group to avoid breaking existing code.

See rust-lang#73569 (comment)
for more details.

The proper fix is to handle `None`-delimited groups systematically
throughout the parser, but that will require significant work. In the
meantime, this hack lets us fix important hygiene bugs in macros
ast_pretty: Pass some token streams and trees by reference

Salvaged from an intermediate version of rust-lang#73345.
…-morse

Some refactoring around intrinsic type checking

So... This PR went a bit overboard. I wanted to make the `rustc_peek` intrinsic safe (cc @ecstatic-morse ), and remembered a long-standing itch of mine. So I made that huge `&str` match for the intrinsic name a match on `Symbol`s (so basically `u32`s). This is unlikely to have a positive perf effect, even if it likely has better codegen (intrinsics are used rarely, mostly once in their wrapper), so it's mostly a consistency thing since other places actually match on the symbol name of the intrinsics.
…nishearth

Split and expand nonstandard-style lints unicode unit test.

RFC 2457 requested that the `nonstandard_style` series of linted be adjusted to cover the non_ascii_identifier case. However when i read the code of those implementations, it seems they're already supporting non_ascii_identifiers. But the exact rules is a little different than what's proposed in RFC 2457.

So I splitted and expanded the existing test case to try to exercise every branch in the code. I think it'll also be easier to examine the cases in these unit tests to see whether it's ok to just leave them as is, or some adjustments are needed.

r? @Manishearth
…Simulacrum

Remove defunct `-Z print-region-graph`
…r=jonas-schievink

Fix markdown rendering in librustc_lexer docs

Use back-ticks instead of quotation marks in docs for the block comment variant of TokenKind.

## [Before](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/enum.TokenKind.html#variant.BlockComment) and after

<img width="1103" alt="Screen Shot 2020-06-28 at 1 22 30 PM" src="https://user-images.githubusercontent.com/19642016/85957562-446a8380-b943-11ea-913a-442cf7744083.png">

<img width="1015" alt="Screen Shot 2020-06-28 at 1 28 29 PM" src="https://user-images.githubusercontent.com/19642016/85957566-4af8fb00-b943-11ea-8fef-a09c1d586772.png">

## Question

For visual consistency, should we use back-ticks throughout the docs for these enum variants?
…jonas-schievink

Add newline to rustc MultiSpan docs

Also adds back-ticks when referring to the contents of this collection.
Fix wasm32 being broken due to a NodeJS version bump

Emscripten's SDK [recently bumped the version of NodeJS they shipped](emscripten-core/emsdk#529), but our Dockerfile for the wasm32 builder hardcoded the version number. This will cause consistent CI failures once the currently cached image is rebuilt (either due to a change or due to the cache expiring).

This PR fixes the problem by finding the latest version of NodeJS in the Emscripten SDK and symlinking it to a "latest" directory, which is then added to the `PATH`.
remove duplicate test for rust-lang#61935

Apparently I somehow messed up the issue number in rust-lang#67890
which caused us to add this test twice, both as https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/issues/issue-61935.rs and https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/lazy-normalization/issue-71922.rs

rust-lang#61935 is the actually fixed issue while rust-lang#71922 is still not working, as it depends on lazy norm of repeat expressions
@Manishearth
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jul 1, 2020

📌 Commit 555397d has been approved by Manishearth

@rustbot rustbot added the rollup A PR which is a rollup label Jul 1, 2020
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 1, 2020
@bors
Copy link
Contributor

bors commented Jul 1, 2020

⌛ Testing commit 555397d with merge 2ee1c89e993374ac5767e21a09d326b8c1b0ab69...

@bors
Copy link
Contributor

bors commented Jul 1, 2020

💔 Test failed - checks-actions

@bors bors 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 Jul 1, 2020
@Manishearth
Copy link
Member Author

@bors retry

docker fail

@bors bors 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 Jul 1, 2020
@bors
Copy link
Contributor

bors commented Jul 1, 2020

⌛ Testing commit 555397d with merge c984747f27119ac805858c802a9e1e4117cf348c...

@bors
Copy link
Contributor

bors commented Jul 1, 2020

💔 Test failed - checks-actions

@bors bors 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 Jul 1, 2020
@Manishearth
Copy link
Member Author

2020-07-01T21:00:40.5186999Z 
2020-07-01T21:00:40.5188488Z error: tests/compile-fail/intrinsics/exact_div3.rs:4: unexpected error: '4:14: 4:50: Undefined Behavior: exact_div: -19_i8 cannot be divided by 2_i8 without remainder'
2020-07-01T21:00:40.5188643Z 
2020-07-01T21:00:40.5189120Z error: tests/compile-fail/intrinsics/exact_div3.rs:4: expected error not found: -19i8 cannot be divided by 2i8 without remainder
2020-07-01T21:00:40.5189241Z 
2020-07-01T21:00:40.5189397Z error: 1 unexpected errors found, 1 expected errors not found
2020-07-01T21:00:40.5189551Z status: exit code: 1
2020-07-01T21:00:40.5236387Z thread '[compile-fail] compile-fail/intrinsics/exact_div3.rs' panicked at 'explicit panic', /cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.5.0/src/runtest.rs:1091:13
2020-07-01T21:00:40.5237301Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/miri" "tests/compile-fail/intrinsics/exact_div3.rs" "-L" "/tmp/compiletestA5dhBv" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/tmp/compiletestA5dhBv/intrinsics/exact_div3.stage-id" "-A" "unused" "--edition" "2018" "-Astable-features" "--sysroot" "/home/user/.cache/miri/HOST" "-L" "/tmp/compiletestA5dhBv/intrinsics/exact_div3.stage-id.aux"
2020-07-01T21:00:40.5237565Z unexpected errors (from JSON output): [
2020-07-01T21:00:40.5237714Z     Error {
2020-07-01T21:00:40.5237849Z         line_num: 4,
2020-07-01T21:00:40.5237987Z         kind: Some(
2020-07-01T21:00:40.5238117Z             Error,
2020-07-01T21:00:40.5238245Z         ),
2020-07-01T21:00:40.5238656Z         msg: "4:14: 4:50: Undefined Behavior: exact_div: -19_i8 cannot be divided by 2_i8 without remainder",
2020-07-01T21:00:40.5238841Z     },
2020-07-01T21:00:40.5238965Z ]
2020-07-01T21:00:40.5397157Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-07-01T21:00:40.5397719Z 
2020-07-01T21:00:40.5397863Z not found errors (from test file): [
2020-07-01T21:00:40.5398002Z     Error {
2020-07-01T21:00:40.5398133Z         line_num: 4,
2020-07-01T21:00:40.5398266Z         kind: Some(
2020-07-01T21:00:40.5476635Z thread '[compile-fail] compile-fail/intrinsics/exact_div2.rs' panicked at 'explicit panic', /cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.5.0/src/runtest.rs:1091:13
2020-07-01T21:00:40.5640575Z             Error,
2020-07-01T21:00:40.5641183Z         ),
2020-07-01T21:00:40.5642120Z         msg: "-19i8 cannot be divided by 2i8 without remainder",
2020-07-01T21:00:40.5642303Z     },
2020-07-01T21:00:40.5642431Z ]
2020-07-01T21:00:40.5642494Z 
2020-07-01T21:00:40.5642832Z test [compile-fail] compile-fail/intrinsics/exact_div3.rs ... FAILED
2020-07-01T21:00:40.5643173Z test [compile-fail] compile-fail/intrinsics/exact_div4.rs ... ok
2020-07-01T21:00:40.5643275Z 
2020-07-01T21:00:40.5643726Z error: tests/compile-fail/intrinsics/exact_div2.rs:4: unexpected error: '4:14: 4:49: Undefined Behavior: exact_div: 2_u16 cannot be divided by 3_u16 without remainder'
2020-07-01T21:00:40.5643874Z 
2020-07-01T21:00:40.5644274Z error: tests/compile-fail/intrinsics/exact_div2.rs:4: expected error not found: 2u16 cannot be divided by 3u16 without remainder
2020-07-01T21:00:40.5644375Z 
2020-07-01T21:00:40.5644534Z error: 1 unexpected errors found, 1 expected errors not found
2020-07-01T21:00:40.5644682Z status: exit code: 1
2020-07-01T21:00:40.5645490Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/miri" "tests/compile-fail/intrinsics/exact_div2.rs" "-L" "/tmp/compiletestA5dhBv" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/tmp/compiletestA5dhBv/intrinsics/exact_div2.stage-id" "-A" "unused" "--edition" "2018" "-Astable-features" "--sysroot" "/home/user/.cache/miri/HOST" "-L" "/tmp/compiletestA5dhBv/intrinsics/exact_div2.stage-id.aux"
2020-07-01T21:00:40.5645729Z unexpected errors (from JSON output): [
2020-07-01T21:00:40.5645874Z     Error {
2020-07-01T21:00:40.5646007Z         line_num: 4,
2020-07-01T21:00:40.5646142Z         kind: Some(
2020-07-01T21:00:40.5646269Z             Error,
2020-07-01T21:00:40.5646398Z         ),
2020-07-01T21:00:40.5646577Z         msg: "4:14: 4:49: Undefined Behavior: exact_div: 2_u16 cannot be divided by 3_u16 without remainder",
2020-07-01T21:00:40.5646737Z     },
2020-07-01T21:00:40.5646862Z ]
2020-07-01T21:00:40.5646922Z 
2020-07-01T21:00:40.5647056Z not found errors (from test file): [
2020-07-01T21:00:40.5647193Z     Error {
2020-07-01T21:00:40.5647323Z         line_num: 4,
2020-07-01T21:00:40.5647471Z         kind: Some(
2020-07-01T21:00:40.5647599Z             Error,
2020-07-01T21:00:40.5647726Z         ),
2020-07-01T21:00:40.5647871Z         msg: "2u16 cannot be divided by 3u16 without remainder",
2020-07-01T21:00:40.5648015Z     },
2020-07-01T21:00:40.5648139Z ]
2020-07-01T21:00:40.5648200Z 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.