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

syntax: Keep token span as a part of `Token` #61541

Merged
merged 14 commits into from Jun 7, 2019

Conversation

Projects
None yet
6 participants
@petrochenkov
Copy link
Contributor

commented Jun 5, 2019

In the world with proc macros and edition hygiene Token without a span is not self-contained.
In practice this means that tokens and spans are always stored and passed somewhere along with each other.
This PR combines them into a single struct by doing the next renaming/replacement:

  • Token -> TokenKind
  • TokenAndSpan -> Token
  • (Token, Span) -> Token

Some later commits (fb6e2fe and 1cdee86) remove duplicate spans in token::Ident and token::Lifetime.
Those spans were supposed to be identical to token spans, but could easily go out of sync, as was noticed in #60965 (comment).
The (Token, Span) -> Token change is a soft pre-requisite for this de-duplication since it allows to avoid some larger churn (passing spans to most of functions classifying identifiers).

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Jun 5, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (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.
travis_time:end:13be2aa4:start=1559735068870919594,finish=1559735069933984804,duration=1063065210
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
travis_time:start:test_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:06:11] 
[01:06:11] running 144 tests
[01:06:14] i..iii.....iii..iiii.....i......................i..i.................i.....i..........ii.i..i..i.ii. 100/144
[01:06:16] test result: ok. 114 passed; 0 failed; 30 ignored; 0 measured; 0 filtered out
[01:06:16] 
[01:06:16]  finished in 4.695
[01:06:16] travis_fold:end:test_codegen
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:06:18] 
[01:06:18] running 9 tests
[01:06:18] iiiiiiiii
[01:06:18] 
[01:06:18]  finished in 0.154
[01:06:18] travis_fold:end:test_assembly

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:06:34] 
[01:06:34] running 122 tests
[01:06:59] .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
[01:07:04] .i.i......iii.i.....ii
[01:07:04] 
[01:07:04]  finished in 30.327
[01:07:04] travis_fold:end:test_debuginfo

---
travis_time:start:test_run-pass-fulldeps
Check compiletest suite=run-pass-fulldeps mode=run-pass (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:07:12] 
[01:07:12] running 48 tests
[01:08:40] ..........................................F....test [run-pass] run-pass-fulldeps/myriad-closures.rs has been running for over 60 seconds
[01:10:54] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:10:54] .
[01:10:54] failures:
[01:10:54] 
[01:10:54] 
[01:10:54] ---- [run-pass] run-pass-fulldeps/roman-numerals-macro.rs stdout ----
[01:10:54] 
[01:10:54] error: auxiliary build of "/checkout/src/test/run-pass-fulldeps/auxiliary/roman-numerals.rs" failed to compile: 
[01:10:54] status: exit code: 1
[01:10:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass-fulldeps/auxiliary/roman-numerals.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/run-pass-fulldeps/roman-numerals-macro/auxiliary" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type" "dylib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass-fulldeps/roman-numerals-macro/auxiliary"
[01:10:54] ------------------------------------------
[01:10:54] 
[01:10:54] ------------------------------------------
[01:10:54] stderr:
[01:10:54] stderr:
[01:10:54] ------------------------------------------
[01:10:54] warning: trait objects without an explicit `dyn` are deprecated
[01:10:54]   --> /checkout/src/test/run-pass-fulldeps/auxiliary/roman-numerals.rs:25:16
[01:10:54]    |
[01:10:54] LL |         -> Box<MacResult + 'static> {
[01:10:54]    |                ^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn MacResult + 'static`
[01:10:54]    = note: #[warn(bare_trait_objects)] on by default
[01:10:54] 
[01:10:54] error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
[01:10:54]   --> /checkout/src/test/run-pass-fulldeps/auxiliary/roman-numerals.rs:41:9
[01:10:54]   --> /checkout/src/test/run-pass-fulldeps/auxiliary/roman-numerals.rs:41:9
[01:10:54]    |
[01:10:54] LL |         TokenTree::Token(_, token::Ident(s, _)) => s.to_string(),
[01:10:54] 
[01:10:54] error: aborting due to previous error
[01:10:54] 
[01:10:54] For more information about this error, try `rustc --explain E0023`.
---
[01:10:54] test result: FAILED. 47 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:10:54] 
[01:10:54] 
[01:10:54] 
[01:10:54] 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/run-pass-fulldeps" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass-fulldeps" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-pass" "--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"
[01:10:54] 
[01:10:54] 
[01:10:54] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:10:54] Build completed unsuccessfully in 1:05:55
---
31116 ./obj/build/xtravis_time:end:04b703a0:start=1559739337247133428,finish=1559739337302282559,duration=55149131
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:09ec83e3
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:1d2af1c6
$ dmesg | grep -i kill

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)

Show resolved Hide resolved src/librustdoc/html/highlight.rs
Show resolved Hide resolved src/libsyntax/parse/lexer/mod.rs Outdated
Show resolved Hide resolved src/libsyntax/ext/tt/macro_rules.rs Outdated
Show resolved Hide resolved src/libsyntax/parse/literal.rs Outdated
Show resolved Hide resolved src/libsyntax/parse/parser.rs Outdated
Show resolved Hide resolved src/libsyntax/parse/parser.rs Outdated
Show resolved Hide resolved src/libsyntax/parse/token.rs Outdated
Show resolved Hide resolved src/libsyntax/mut_visit.rs

@petrochenkov petrochenkov force-pushed the petrochenkov:tsp branch 2 times, most recently from c380fa5 to e79d91a Jun 5, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Jun 5, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (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.
travis_time:end:00195538:start=1559763313378914626,finish=1559763316026408448,duration=2647493822
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:58:32] .................................................................................................... 3000/5626
[00:58:36] .................................................................................................... 3100/5626
[00:58:39] .................................................................................................... 3200/5626
[00:58:44] .................................................................................................... 3300/5626
[00:58:47] ..................F........................i.........................................F.............. 3400/5626
[00:58:55] .................ii...i..ii......................................................................... 3600/5626
[00:58:59] .................................................................................................... 3700/5626
[00:59:02] .................................................................................................... 3800/5626
[00:59:06] ..........................ii........................................................................ 3900/5626
---
[01:00:20] 
[01:00:20] ---- [ui] ui/macros/assert-trailing-junk.rs stdout ----
[01:00:20] diff of stderr:
[01:00:20] 
[01:00:20] 10 LL |     assert!(true some extra junk);
[01:00:20] 11    |                  ^^^^ expected one of `,`, `.`, `?`, or an operator here
[01:00:20] 12 
[01:00:20] - error: no rules expected the token `blah`
[01:00:20] -   --> $DIR/assert-trailing-junk.rs:12:30
[01:00:20] + error: no rules expected the token `"whatever"`
[01:00:20] 15    |
[01:00:20] 15    |
[01:00:20] 16 LL |     assert!(true, "whatever" blah);
[01:00:20] -    |                             -^^^^ no rules expected this token in macro call
[01:00:20] -    |                             help: missing comma here
[01:00:20] +    |                   ^^^^^^^^^^- help: missing comma here
[01:00:20] +    |                   |
[01:00:20] +    |                   no rules expected this token in macro call
[01:00:20] +    |                   no rules expected this token in macro call
[01:00:20] 20 
[01:00:20] 21 warning: unexpected string literal
[01:00:20] 22   --> $DIR/assert-trailing-junk.rs:15:18
[01:00:20] 
[01:00:20] 28    |
[01:00:20] 29    = note: this is going to be an error in the future
[01:00:20] 30 
[01:00:20] - error: no rules expected the token `blah`
[01:00:20] -   --> $DIR/assert-trailing-junk.rs:15:29
[01:00:20] + error: no rules expected the token `"whatever"`
[01:00:20] 33    |
[01:00:20] 33    |
[01:00:20] 34 LL |     assert!(true "whatever" blah);
[01:00:20] -    |                            -^^^^ no rules expected this token in macro call
[01:00:20] -    |                            help: missing comma here
[01:00:20] +    |                  ^^^^^^^^^^- help: missing comma here
[01:00:20] +    |                  |
[01:00:20] +    |                  no rules expected this token in macro call
[01:00:20] +    |                  no rules expected this token in macro call
[01:00:20] 38 
[01:00:20] 39 warning: macro requires an expression as an argument
[01:00:20] 40   --> $DIR/assert-trailing-junk.rs:19:5
[01:00:20] 
[01:00:20] 
[01:00:20] The actual stderr differed from the expected stderr.
[01:00:20] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/assert-trailing-junk/assert-trailing-junk.stderr
[01:00:20] To update references, rerun the tests and pass the `--bless` flag
[01:00:20] To only update this specific test, also pass `--test-args macros/assert-trailing-junk.rs`
[01:00:20] error: 1 errors occurred comparing output.
[01:00:20] status: exit code: 1
[01:00:20] status: exit code: 1
[01:00:20] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/macros/assert-trailing-junk.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/macros/assert-trailing-junk" "-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/macros/assert-trailing-junk/auxiliary" "-A" "unused"
[01:00:20] ------------------------------------------
[01:00:20] 
[01:00:20] ------------------------------------------
[01:00:20] stderr:
[01:00:20] stderr:
[01:00:20] ------------------------------------------
[01:00:20] error: expected one of `,`, `.`, `?`, or an operator, found `some`
[01:00:20]    |
[01:00:20]    |
[01:00:20] LL |     assert!(true some extra junk, "whatever");
[01:00:20]    |                  ^^^^ expected one of `,`, `.`, `?`, or an operator here
[01:00:20] 
[01:00:20] error: expected one of `,`, `.`, `?`, or an operator, found `some`
[01:00:20]    |
[01:00:20]    |
[01:00:20] LL |     assert!(true some extra junk);
[01:00:20]    |                  ^^^^ expected one of `,`, `.`, `?`, or an operator here
[01:00:20] 
[01:00:20] error: no rules expected the token `"whatever"`
[01:00:20]    |
[01:00:20]    |
[01:00:20] LL |     assert!(true, "whatever" blah);
[01:00:20]    |                   ^^^^^^^^^^- help: missing comma here
[01:00:20]    |                   no rules expected this token in macro call
[01:00:20] 
[01:00:20] warning: unexpected string literal
[01:00:20]   --> /checkout/src/test/ui/macros/assert-trailing-junk.rs:15:18
[01:00:20]   --> /checkout/src/test/ui/macros/assert-trailing-junk.rs:15:18
[01:00:20]    |
[01:00:20] LL |     assert!(true "whatever" blah);
[01:00:20]    |                 -^^^^^^^^^^
[01:00:20]    |                 help: try adding a comma
[01:00:20]    |
[01:00:20]    = note: this is going to be an error in the future
[01:00:20] 
[01:00:20] 
[01:00:20] error: no rules expected the token `"whatever"`
[01:00:20]    |
[01:00:20]    |
[01:00:20] LL |     assert!(true "whatever" blah);
[01:00:20]    |                  ^^^^^^^^^^- help: missing comma here
[01:00:20]    |                  no rules expected this token in macro call
[01:00:20] 
[01:00:20] warning: macro requires an expression as an argument
[01:00:20]   --> /checkout/src/test/ui/macros/assert-trailing-junk.rs:19:5
---
[01:00:20] 
[01:00:20] warning: unexpected string literal
[01:00:20]   --> /checkout/src/test/ui/macros/assert-trailing-junk.rs:22:27
[01:00:20]    |
[01:00:20] LL |     assert!(false || true "error message");
[01:00:20]    |                          -^^^^^^^^^^^^^^^
[01:00:20]    |                          help: try adding a comma
[01:00:20]    |
[01:00:20]    = note: this is going to be an error in the future
[01:00:20] 
---
[01:00:20] 16    |           help: missing comma here
[01:00:20] 17 
[01:00:20] - error: no rules expected the token `e`
[01:00:20] -   --> $DIR/missing-comma.rs:23:21
[01:00:20] + error: no rules expected the token `,`
[01:00:20] 20    |
[01:00:20] 20    |
[01:00:20] 21 LL | macro_rules! foo {
[01:00:20] 22    | ---------------- when calling this macro
[01:00:20] 23 ...
[01:00:20] 23 ...
[01:00:20] 24 LL |     foo!(a, b, c, d e);
[01:00:20] -    |                    -^ no rules expected this token in macro call
[01:00:20] -    |                    help: missing comma here
[01:00:20] +    |           ^        - help: missing comma here
[01:00:20] +    |           |
[01:00:20] +    |           no rules expected this token in macro call
[01:00:20] +    |           no rules expected this token in macro call
[01:00:20] 28 
[01:00:20] - error: no rules expected the token `d`
[01:00:20] -   --> $DIR/missing-comma.rs:25:18
[01:00:20] + error: no rules expected the token `,`
[01:00:20] 31    |
[01:00:20] 31    |
[01:00:20] 32 LL | macro_rules! foo {
[01:00:20] 33    | ---------------- when calling this macro
[01:00:20] 34 ...
[01:00:20] 34 ...
[01:00:20] 35 LL |     foo!(a, b, c d, e);
[01:00:20] -    |                 -^ no rules expected this token in macro call
[01:00:20] -    |                 help: missing comma here
[01:00:20] +    |           ^     - help: missing comma here
[01:00:20] +    |           |
[01:00:20] +    |           no rules expected this token in macro call
[01:00:20] +    |           no rules expected this token in macro call
[01:00:20] 39 
[01:00:20] - error: no rules expected the token `d`
[01:00:20] -   --> $DIR/missing-comma.rs:27:18
[01:00:20] + error: no rules expected the token `,`
[01:00:20] 42    |
[01:00:20] 42    |
[01:00:20] 43 LL | macro_rules! foo {
[01:00:20] 44    | ---------------- when calling this macro
[01:00:20] 45 ...
[01:00:20] 45 ...
[01:00:20] 46 LL |     foo!(a, b, c d e);
[01:00:20] -    |                  ^ no rules expected this token in macro call
[01:00:20] +    |           ^ no rules expected this token in macro call
[01:00:20] 49 error: unexpected end of macro invocation
[01:00:20] 50   --> $DIR/missing-comma.rs:29:23
[01:00:20] 
[01:00:20] 
[01:00:20] 
[01:00:20] The actual stderr differed from the expected stderr.
[01:00:20] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/missing-comma/missing-comma.stderr
[01:00:20] To update references, rerun the tests and pass the `--bless` flag
[01:00:20] To only update this specific test, also pass `--test-args macros/missing-comma.rs`
[01:00:20] error: 1 errors occurred comparing output.
[01:00:20] status: exit code: 1
[01:00:20] status: exit code: 1
[01:00:20] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/macros/missing-comma.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/macros/missing-comma" "-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/macros/missing-comma/auxiliary" "-A" "unused"
[01:00:20] ------------------------------------------
[01:00:20] 
[01:00:20] ------------------------------------------
[01:00:20] stderr:
---
[01:00:20] 
[01:00:20] error: no rules expected the token `b`
[01:00:20]   --> /checkout/src/test/ui/macros/missing-comma.rs:21:12
[01:00:20]    |
[01:00:20] LL | macro_rules! foo {
[01:00:20]    | ---------------- when calling this macro
[01:00:20] ...
[01:00:20] LL |     foo!(a b);
[01:00:20]    |           -^ no rules expected this token in macro call
[01:00:20]    |           help: missing comma here
[01:00:20] 
[01:00:20] error: no rules expected the token `,`
[01:00:20]   --> /checkout/src/test/ui/macros/missing-comma.rs:23:11
[01:00:20]   --> /checkout/src/test/ui/macros/missing-comma.rs:23:11
[01:00:20]    |
[01:00:20] LL | macro_rules! foo {
[01:00:20]    | ---------------- when calling this macro
[01:00:20] ...
[01:00:20] LL |     foo!(a, b, c, d e);
[01:00:20]    |           ^        - help: missing comma here
[01:00:20]    |           no rules expected this token in macro call
[01:00:20] 
[01:00:20] error: no rules expected the token `,`
[01:00:20]   --> /checkout/src/test/ui/macros/missing-comma.rs:25:11
[01:00:20]   --> /checkout/src/test/ui/macros/missing-comma.rs:25:11
[01:00:20]    |
[01:00:20] LL | macro_rules! foo {
[01:00:20]    | ---------------- when calling this macro
[01:00:20] ...
[01:00:20] LL |     foo!(a, b, c d, e);
[01:00:20]    |           ^     - help: missing comma here
[01:00:20]    |           no rules expected this token in macro call
[01:00:20] 
[01:00:20] error: no rules expected the token `,`
[01:00:20]   --> /checkout/src/test/ui/macros/missing-comma.rs:27:11
[01:00:20]   --> /checkout/src/test/ui/macros/missing-comma.rs:27:11
[01:00:20]    |
[01:00:20] LL | macro_rules! foo {
[01:00:20]    | ---------------- when calling this macro
[01:00:20] ...
[01:00:20] LL |     foo!(a, b, c d e);
[01:00:20]    |           ^ no rules expected this token in macro call
[01:00:20] error: unexpected end of macro invocation
[01:00:20]   --> /checkout/src/test/ui/macros/missing-comma.rs:29:23
[01:00:20]    |
[01:00:20]    |
[01:00:20] LL | macro_rules! bar {
[01:00:20]    | ---------------- when calling this macro
[01:00:20] ...
[01:00:20] LL |     bar!(Level::Error, );
[01:00:20]    |                       ^ missing tokens in macro arguments
[01:00:20] error: no rules expected the token `,`
[01:00:20]   --> /checkout/src/test/ui/macros/missing-comma.rs:32:38
[01:00:20]    |
[01:00:20]    |
[01:00:20] LL | macro_rules! check {
[01:00:20]    | ------------------ when calling this macro
[01:00:20] ...
[01:00:20] LL |     check!(<str as Debug>::fmt, "fmt",);
[01:00:20]    |                                      ^ no rules expected this token in macro call
[01:00:20] error: aborting due to 7 previous errors
[01:00:20] 
[01:00:20] 
[01:00:20] ------------------------------------------
---
[01:00:20] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:521:22
[01:00:20] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:00:20] 
[01:00:20] 
[01:00:20] 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"
[01:00:20] 
[01:00:20] 
[01:00:20] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:00:20] Build completed unsuccessfully in 0:55:30
---
travis_time:end:1b3e5464:start=1559766947710963652,finish=1559766947718939024,duration=7975372
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1076d9b0
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:02702004
$ dmesg | grep -i kill

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)

@petrochenkov petrochenkov force-pushed the petrochenkov:tsp branch from e79d91a to 8baf60b Jun 5, 2019

@oli-obk

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

r=me with visit_ident fixed and a comment on prev_span

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

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

@petrochenkov petrochenkov force-pushed the petrochenkov:tsp branch from 8baf60b to 3a31f06 Jun 6, 2019

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

⌛️ Testing commit 3a31f06 with merge 03d5df4...

bors added a commit that referenced this pull request Jun 6, 2019

Auto merge of #61541 - petrochenkov:tsp, r=oli-obk
syntax: Keep token span as a part of `Token`

In the world with proc macros and edition hygiene `Token` without a span is not self-contained.
In practice this means that tokens and spans are always stored and passed somewhere along with each other.
This PR combines them into a single struct by doing the next renaming/replacement:

- `Token` -> `TokenKind`
- `TokenAndSpan` -> `Token`
- `(Token, Span)` -> `Token`

Some later commits (fb6e2fe and 1cdee86) remove duplicate spans in `token::Ident` and `token::Lifetime`.
Those spans were supposed to be identical to token spans, but could easily go out of sync, as was noticed in #60965 (comment).
The `(Token, Span)` -> `Token` change is a soft pre-requisite for this de-duplication since it allows to avoid some larger churn (passing spans to most of functions classifying identifiers).
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

💔 Test failed - checks-travis

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 6, 2019

The job x86_64-gnu-distcheck of your PR failed on Travis (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.
[00:03:47]    Compiling bstr v0.1.4
[00:03:48]    Compiling quote v0.6.12
[00:03:49]    Compiling clap v2.33.0
[00:03:49]    Compiling tar v0.4.26
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/std.rs:55:6
[00:03:50]    |
[00:03:50] 55 | impl SeedableRng for StdRng {
[00:03:50]    |      ^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_isaac::IsaacRng: rand_core::SeedableRng` is not satisfied
[00:03:50]    |
[00:03:50]    |
[00:03:50] 50 | impl SeedableRng for IsaacRng {
[00:03:50]    |      ^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_isaac::IsaacRng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_isaac::Isaac64Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]    |
[00:03:50]    |
[00:03:50] 96 | impl SeedableRng for Isaac64Rng {
[00:03:50]    |      ^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_isaac::Isaac64Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 198 | impl SeedableRng for Hc128Rng {
[00:03:50]     |      ^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_xorshift::XorShiftRng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 239 | impl SeedableRng for XorShiftRng {
[00:03:50]     |      ^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_xorshift::XorShiftRng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 279 | impl SeedableRng for StdRng {
[00:03:50]     |      ^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::block::BlockRngCore` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:73:5
[00:03:50]    |
[00:03:50] 73 |     rng: *mut ReseedingRng<Hc128Core, EntropyRng>,
[00:03:50]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::block::BlockRngCore` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::SeedableRng` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:73:5
[00:03:50]    |
[00:03:50] 73 |     rng: *mut ReseedingRng<Hc128Core, EntropyRng>,
[00:03:50]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::block::BlockRngCore` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:76:1
[00:03:50] 76 | / thread_local!(
[00:03:50] 76 | / thread_local!(
[00:03:50] 77 | |     static THREAD_RNG_KEY: UnsafeCell<ReseedingRng<Hc128Core, EntropyRng>> = {
[00:03:50] 78 | |         let mut entropy_source = EntropyRng::new();
[00:03:50] 79 | |         let r = Hc128Core::from_rng(&mut entropy_source).unwrap_or_else(|err|
[00:03:50] 85 | |     }
[00:03:50] 86 | | );
[00:03:50] 86 | | );
[00:03:50]    | |__^ the trait `rand_core::block::BlockRngCore` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50]    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::SeedableRng` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:76:1
[00:03:50] 76 | / thread_local!(
[00:03:50] 76 | / thread_local!(
[00:03:50] 77 | |     static THREAD_RNG_KEY: UnsafeCell<ReseedingRng<Hc128Core, EntropyRng>> = {
[00:03:50] 78 | |         let mut entropy_source = EntropyRng::new();
[00:03:50] 79 | |         let r = Hc128Core::from_rng(&mut entropy_source).unwrap_or_else(|err|
[00:03:50] 85 | |     }
[00:03:50] 86 | | );
[00:03:50] 86 | | );
[00:03:50]    | |__^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50]    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::block::BlockRngCore` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:76:1
[00:03:50] 76 | / thread_local!(
[00:03:50] 76 | / thread_local!(
[00:03:50] 77 | |     static THREAD_RNG_KEY: UnsafeCell<ReseedingRng<Hc128Core, EntropyRng>> = {
[00:03:50] 78 | |         let mut entropy_source = EntropyRng::new();
[00:03:50] 79 | |         let r = Hc128Core::from_rng(&mut entropy_source).unwrap_or_else(|err|
[00:03:50] 85 | |     }
[00:03:50] 86 | | );
[00:03:50] 86 | | );
[00:03:50]    | |__^ the trait `rand_core::block::BlockRngCore` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50]    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::SeedableRng` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:76:1
[00:03:50] 76 | / thread_local!(
[00:03:50] 76 | / thread_local!(
[00:03:50] 77 | |     static THREAD_RNG_KEY: UnsafeCell<ReseedingRng<Hc128Core, EntropyRng>> = {
[00:03:50] 78 | |         let mut entropy_source = EntropyRng::new();
[00:03:50] 79 | |         let r = Hc128Core::from_rng(&mut entropy_source).unwrap_or_else(|err|
[00:03:50] 85 | |     }
[00:03:50] 86 | | );
[00:03:50] 86 | | );
[00:03:50]    | |__^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50]    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::block::BlockRngCore` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:76:1
[00:03:50] 76 | / thread_local!(
[00:03:50] 76 | / thread_local!(
[00:03:50] 77 | |     static THREAD_RNG_KEY: UnsafeCell<ReseedingRng<Hc128Core, EntropyRng>> = {
[00:03:50] 78 | |         let mut entropy_source = EntropyRng::new();
[00:03:50] 79 | |         let r = Hc128Core::from_rng(&mut entropy_source).unwrap_or_else(|err|
[00:03:50] 85 | |     }
[00:03:50] 86 | | );
[00:03:50] 86 | | );
[00:03:50]    | |__^ the trait `rand_core::block::BlockRngCore` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50]    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::SeedableRng` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:76:1
[00:03:50] 76 | / thread_local!(
[00:03:50] 76 | / thread_local!(
[00:03:50] 77 | |     static THREAD_RNG_KEY: UnsafeCell<ReseedingRng<Hc128Core, EntropyRng>> = {
[00:03:50] 78 | |         let mut entropy_source = EntropyRng::new();
[00:03:50] 79 | |         let r = Hc128Core::from_rng(&mut entropy_source).unwrap_or_else(|err|
[00:03:50] 85 | |     }
[00:03:50] 86 | | );
[00:03:50] 86 | | );
[00:03:50]    | |__^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50]    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::block::BlockRngCore` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:76:1
[00:03:50] 76 | / thread_local!(
[00:03:50] 76 | / thread_local!(
[00:03:50] 77 | |     static THREAD_RNG_KEY: UnsafeCell<ReseedingRng<Hc128Core, EntropyRng>> = {
[00:03:50] 78 | |         let mut entropy_source = EntropyRng::new();
[00:03:50] 79 | |         let r = Hc128Core::from_rng(&mut entropy_source).unwrap_or_else(|err|
[00:03:50] 85 | |     }
[00:03:50] 86 | | );
[00:03:50] 86 | | );
[00:03:50]    | |__^ the trait `rand_core::block::BlockRngCore` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50]    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Core: rand_core::SeedableRng` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/thread.rs:76:1
[00:03:50] 76 | / thread_local!(
[00:03:50] 76 | / thread_local!(
[00:03:50] 77 | |     static THREAD_RNG_KEY: UnsafeCell<ReseedingRng<Hc128Core, EntropyRng>> = {
[00:03:50] 78 | |         let mut entropy_source = EntropyRng::new();
[00:03:50] 79 | |         let r = Hc128Core::from_rng(&mut entropy_source).unwrap_or_else(|err|
[00:03:50] 85 | |     }
[00:03:50] 86 | | );
[00:03:50] 86 | | );
[00:03:50]    | |__^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Core`
[00:03:50]    |
[00:03:50] note: required by `rngs::adapter::reseeding::ReseedingRng`
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/adapter/reseeding.rs:88:1
[00:03:50]    |
[00:03:50] 88 | / pub struct ReseedingRng<R, Rsdr>(BlockRng<ReseedingCore<R, Rsdr>>)
[00:03:50] 89 | | where R: BlockRngCore + SeedableRng,
[00:03:50] 90 | |       Rsdr: RngCore;
[00:03:50]    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:03:50] 
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/std.rs:56:5
[00:03:50]    |
[00:03:50] 56 |     type Seed = <Hc128Rng as SeedableRng>::Seed;
[00:03:50]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/rngs/std.rs:58:5
[00:03:50]    |
[00:03:50] 58 | /     fn from_seed(seed: Self::Seed) -> Self {
[00:03:50] 59 | |         StdRng(Hc128Rng::from_seed(seed))
[00:03:50] 60 | |     }
[00:03:50]    | |_____^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_isaac::IsaacRng: rand_core::SeedableRng` is not satisfied
[00:03:50]    |
[00:03:50]    |
[00:03:50] 51 |     type Seed = <rand_isaac::IsaacRng as SeedableRng>::Seed;
[00:03:50]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_isaac::IsaacRng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_isaac::IsaacRng: rand_core::SeedableRng` is not satisfied
[00:03:50]    |
[00:03:50]    |
[00:03:50] 53 | /     fn from_seed(seed: Self::Seed) -> Self {
[00:03:50] 54 | |         IsaacRng(rand_isaac::IsaacRng::from_seed(seed))
[00:03:50] 55 | |     }
[00:03:50]    | |_____^ the trait `rand_core::SeedableRng` is not implemented for `rand_isaac::IsaacRng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_isaac::Isaac64Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]    |
[00:03:50]    |
[00:03:50] 97 |     type Seed = <rand_isaac::Isaac64Rng as SeedableRng>::Seed;
[00:03:50]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_isaac::Isaac64Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_isaac::Isaac64Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 99  | /     fn from_seed(seed: Self::Seed) -> Self {
[00:03:50] 100 | |         Isaac64Rng(rand_isaac::Isaac64Rng::from_seed(seed))
[00:03:50] 101 | |     }
[00:03:50]     | |_____^ the trait `rand_core::SeedableRng` is not implemented for `rand_isaac::Isaac64Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 199 |     type Seed = <rand_hc::Hc128Rng as SeedableRng>::Seed;
[00:03:50]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 201 | /     fn from_seed(seed: Self::Seed) -> Self {
[00:03:50] 202 | |         Hc128Rng(rand_hc::Hc128Rng::from_seed(seed))
[00:03:50] 203 | |     }
[00:03:50]     | |_____^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_xorshift::XorShiftRng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 240 |     type Seed = <::rand_xorshift::XorShiftRng as SeedableRng>::Seed;
[00:03:50]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_xorshift::XorShiftRng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_xorshift::XorShiftRng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 242 | /     fn from_seed(seed: Self::Seed) -> Self {
[00:03:50] 243 | |         XorShiftRng(::rand_xorshift::XorShiftRng::from_seed(seed))
[00:03:50] 244 | |     }
[00:03:50]     | |_____^ the trait `rand_core::SeedableRng` is not implemented for `rand_xorshift::XorShiftRng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 280 |     type Seed = <rngs::StdRng as SeedableRng>::Seed;
[00:03:50]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Rng`
[00:03:50] 
[00:03:50] error[E0277]: the trait bound `rand_hc::Hc128Rng: rand_core::SeedableRng` is not satisfied
[00:03:50]     |
[00:03:50]     |
[00:03:50] 282 | /     fn from_seed(seed: Self::Seed) -> Self {
[00:03:50] 283 | |         StdRng(rngs::StdRng::from_seed(seed))
[00:03:50] 284 | |     }
[00:03:50]     | |_____^ the trait `rand_core::SeedableRng` is not implemented for `rand_hc::Hc128Rng`
[00:03:50] error: aborting due to 28 previous errors
[00:03:50] 
[00:03:50] For more information about this error, try `rustc --explain E0277`.
[00:03:50] error: Could not compile `rand`.
[00:03:50] error: Could not compile `rand`.
[00:03:50] warning: build failed, waiting for other jobs to finish...
[00:03:57] error: failed to compile `cargo-vendor v0.1.22`, intermediate artifacts can be found at `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools`
[00:03:57] Caused by:
[00:03:57]   build failed
[00:03:57] 
[00:03:57] 
[00:03:57] 
[00:03:57] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "install" "-j" "4" "--locked" "--color" "always" "--force" "--debug" "--vers" "0.1.22" "cargo-vendor"
[00:03:57] 
[00:03:57] 
[00:03:57] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test distcheck
[00:03:57] Build completed unsuccessfully in 0:00:44
---
travis_time:end:17d3e890:start=1559838006442776570,finish=1559838006448734402,duration=5957832
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1ece8eb4
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:02aff458
travis_time:start:02aff458
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0b477f4c
$ dmesg | grep -i kill

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)

@pietroalbini

This comment has been minimized.

Copy link
Member

commented Jun 6, 2019

The rand crate broke.
@bors retry

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

⌛️ Testing commit 3a31f06 with merge ca1bcfd...

bors added a commit that referenced this pull request Jun 7, 2019

Auto merge of #61541 - petrochenkov:tsp, r=oli-obk
syntax: Keep token span as a part of `Token`

In the world with proc macros and edition hygiene `Token` without a span is not self-contained.
In practice this means that tokens and spans are always stored and passed somewhere along with each other.
This PR combines them into a single struct by doing the next renaming/replacement:

- `Token` -> `TokenKind`
- `TokenAndSpan` -> `Token`
- `(Token, Span)` -> `Token`

Some later commits (fb6e2fe and 1cdee86) remove duplicate spans in `token::Ident` and `token::Lifetime`.
Those spans were supposed to be identical to token spans, but could easily go out of sync, as was noticed in #60965 (comment).
The `(Token, Span)` -> `Token` change is a soft pre-requisite for this de-duplication since it allows to avoid some larger churn (passing spans to most of functions classifying identifiers).
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: oli-obk
Pushing ca1bcfd to master...

@bors bors added the merged-by-bors label Jun 7, 2019

@bors bors merged commit 3a31f06 into rust-lang:master Jun 7, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
homu Test successful
Details

Centril added a commit to Centril/rust that referenced this pull request Jun 7, 2019

Rollup merge of rust-lang#61616 - petrochenkov:parsderef, r=oli-obk
parser: Remove `Deref` impl from `Parser`

Follow up to rust-lang#61541

You have to write `self.token.span` instead of `self.span` in the parser now, which is not nice, but not too bad either, I guess.
Not sure.
Probably still better than people using both and being confused about the definition point of `span`.

r? @oli-obk @estebank

Centril added a commit to Centril/rust that referenced this pull request Jun 7, 2019

Rollup merge of rust-lang#61616 - petrochenkov:parsderef, r=oli-obk
parser: Remove `Deref` impl from `Parser`

Follow up to rust-lang#61541

You have to write `self.token.span` instead of `self.span` in the parser now, which is not nice, but not too bad either, I guess.
Not sure.
Probably still better than people using both and being confused about the definition point of `span`.

r? @oli-obk @estebank

Centril added a commit to Centril/rust that referenced this pull request Jun 7, 2019

Rollup merge of rust-lang#61616 - petrochenkov:parsderef, r=oli-obk
parser: Remove `Deref` impl from `Parser`

Follow up to rust-lang#61541

You have to write `self.token.span` instead of `self.span` in the parser now, which is not nice, but not too bad either, I guess.
Not sure.
Probably still better than people using both and being confused about the definition point of `span`.

r? @oli-obk @estebank

bors added a commit that referenced this pull request Jun 8, 2019

Auto merge of #61616 - petrochenkov:parsderef, r=oli-obk
parser: Remove `Deref` impl from `Parser`

Follow up to #61541

You have to write `self.token.span` instead of `self.span` in the parser now, which is not nice, but not too bad either, I guess.
Not sure.
Probably still better than people using both and being confused about the definition point of `span`.

r? @oli-obk @estebank

Centril added a commit to Centril/rust that referenced this pull request Jun 8, 2019

Rollup merge of rust-lang#61616 - petrochenkov:parsderef, r=oli-obk
parser: Remove `Deref` impl from `Parser`

Follow up to rust-lang#61541

You have to write `self.token.span` instead of `self.span` in the parser now, which is not nice, but not too bad either, I guess.
Not sure.
Probably still better than people using both and being confused about the definition point of `span`.

r? @oli-obk @estebank

@petrochenkov petrochenkov deleted the petrochenkov:tsp branch Jun 8, 2019

Centril added a commit to Centril/rust that referenced this pull request Jun 8, 2019

Rollup merge of rust-lang#61669 - petrochenkov:tokderef2, r=oli-obk
 syntax: Remove `Deref` impl from `Token`

Follow up to rust-lang#61541

r? @oli-obk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.