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

lint to favor ..= over ... range patterns; migrate to ..= throughout codebase #51149

Merged
merged 3 commits into from
Jun 27, 2018

Conversation

zackmdavis
Copy link
Member

We probably need an RFC to actually deprecate the ... syntax, but here's a candidate implementation for the lint considered in #51043. (My local build is super flaky, but hopefully I got all of the test revisions.)

@rust-highfive
Copy link
Collaborator

r? @pnkfelix

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 29, 2018
@zackmdavis
Copy link
Member Author

r? @nikomatsakis

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:27:45]    Compiling proc_macro v0.0.0 (file:///checkout/src/libproc_macro)
[00:27:57]    Compiling syntax_ext v0.0.0 (file:///checkout/src/libsyntax_ext)
[00:33:07]    Compiling rustc_typeck v0.0.0 (file:///checkout/src/librustc_typeck)
[00:33:07]    Compiling rustc_mir v0.0.0 (file:///checkout/src/librustc_mir)
[00:33:09] error: `...` range patterns are deprecated
[00:33:09]    --> librustc_mir/hair/pattern/check_match.rs:467:18
[00:33:09]     |
[00:33:09] 467 |                 2...LIMIT => {
[00:33:09]     |                  ^^^ help: use `..=` for an inclusive range
[00:33:09]     |
[00:33:09]     = note: `-D inclusive-range-pattern-syntax` implied by `-D warnings`
[00:33:09]     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[00:33:09] 
[00:33:25] error: aborting due to previous error
[00:33:25] 
[00:33:25] error: Could not compile `rustc_mir`.
[00:33:25] error: Could not compile `rustc_mir`.
[00:33:25] 
[00:33:25] Caused by:
[00:33:25]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc_mir librustc_mir/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C metadata=8b64d19076a61749 -C extra-filename=-8b64d19076a61749 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern graphviz=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-f21bfea456e2feba.so --extern rustc_apfloat=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_apfloat-b0021385c43a16dd.rlib --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-3762ade15a64029b.so --extern arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libarena-58601def030aa1ca.so --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-e7bbb7d6e0541d97.so --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-9dea40d5c994cba1.so --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-70b92be3dfddcce2.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-2d5dc4c4f204cfc5.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-2d5dc4c4f204cfc5.rlib --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-6bb876a3fc9c03dd.so --extern log_settings=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/liblog_settings-a74e6a1a0a4b163f.rlib --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-575f47f158b62d9a.rlib --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-faa7967fee325699.rlib --extern rustc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc-f5ce6dd7626a50ea.so --extern byteorder=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbyteorder-270afc7a968c2570.rlib --extern polonius_engine=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libpolonius_engine-19b2a6eb2f045d57.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-ea1f3bc77d3b46e4/out/.libs -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-53de06a86865b430/out` (exit code: 101)
Tue, 29 May 2018 06:32:17 GMT
travis_time:end:0e5c2de0:start=1527575537915252787,finish=1527575537974335007,duration=59082220

The command "date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)



declare_lint! {
pub INCLUSIVE_RANGE_PATTERN_SYNTAX,
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's try to follow the conventions again.

The basic rule is: the lint name should make sense when read as "allow lint-name" or "allow lint-name items".

"Deny inclusive range pattern syntax". Hmmm.

Copy link
Member Author

Choose a reason for hiding this comment

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

the conventions

We should link this in both a code comment and the guide.

"Deny inclusive range pattern syntax".

The problem is that ... doesn't look like it should be a valid identifier, but "dot-dot-dot" is hideous. old_inclusive_range_patterns (counterargument: we don't say "old" anywhere else)? ellipsis_range_patterns (counterargument: the .. exclusive range syntax is ellipsis-like less one dot, which might be confusing)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps deprecated_inclusive_range_patterns? I think it's ok to call it deprecated. If we want to be more specific, than ellipsis_inclusive_range_patterns?

I don't think many people will write the name of this lint manually anyway; they will probably get it as part of the rust_2018_idioms group.

@nikomatsakis
Copy link
Contributor

@zackmdavis did you do the migration via rustfix?

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

This code looks good to me, but left a few nits.

Also, we should add to the rust_2018_idioms group:

https://github.com/zackmdavis/rust/blob/1ecf4e4b89372b64d44b30e89fed9cf2e4af9a37/src/librustc_lint/lib.rs#L185-L189

@@ -289,6 +290,11 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
reference: "issue #50589 <https://github.com/rust-lang/rust/issues/50589>",
edition: None,
},
FutureIncompatibleInfo {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this needs to be a future incompatible thing. I mean we have no plan to remove ... patterns as of yet, even if we got noisier about deprecating them. I'd rather we not make people think we are changing the language more than we are =)

@nikomatsakis nikomatsakis 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 May 31, 2018
@zackmdavis zackmdavis force-pushed the ․․․_to_․․= branch from 1ecf4e4 to 21be599 Compare June 3, 2018 06:44
@kennytm kennytm 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 Jun 3, 2018
@rust-highfive

This comment has been minimized.

@zackmdavis zackmdavis force-pushed the ․․․_to_․․= branch from 21be599 to 43fd6cd Compare June 3, 2018 16:49
@rust-highfive

This comment has been minimized.

@zackmdavis zackmdavis force-pushed the ․․․_to_․․= branch from 43fd6cd to 8e465d3 Compare June 3, 2018 19:48
@zackmdavis
Copy link
Member Author

@nikomatsakis (Travis is green now.)

did you do the migration via rustfix?

No (not obvious how to use with x.py, ran into some other problem I can't remember when running against an individual crate); the instances of ... manually changed here were found via a mixture of grep and reported test failures.

we should add to the rust_2018_idioms group [...] I don't think this needs to be a future incompatible thing

I thought it was odd to lint against some syntax without intending to remove it at some point, and to count it as a "Rust 2018" idiom if it's not related to any edition-2018-specific behavior. But I suppose I can see the case for wanting people to rustfix this at the same time they're doing their 2018 edition migration. The current revision of this PR uses the lint name ellipsis-inclusive-range-patterns and includes it in the 2018-idioms group.

@nikomatsakis
Copy link
Contributor

I thought it was odd to lint against some syntax without intending to remove it at some point

I see your point, but I don't think that's necessarily odd. We deprecate methods, after all, but we never intend to remove those. In any case, there has been no firm decision to remove it, so it feels premature to me to tell people it's being removed.

In any case, the rule is that lints only go in the migration category if the changes are necessary to adopt Rust 2018. The idioms category corresponds to changes that are recommended but not strictly necessary.


declare_lint! {
pub ELLIPSIS_INCLUSIVE_RANGE_PATTERNS,
Warn,
Copy link
Contributor

Choose a reason for hiding this comment

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

cc @rust-lang/lang — do we want to warn by default when people use ... notation (instead of the new and "shiny" ..= notation)? Or should we tie warnings to the Edition.

Copy link
Member

Choose a reason for hiding this comment

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

It seems like the reasons to not use ..= are similar to the reasons to not use the edition, so an edition-tied warning (of some sort) seems reasonable.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess there is a question of what our policy is about warning by default in the new edition. I think my preference would be:

  1. This is an "Rust 2018 idiom" lint.
  2. When you go to edition = 2018, all Rust 2018 Idiom lints are warn by default.
  3. Perhaps in the next edition, they will become hard errors, who knows.

Copy link
Member

Choose a reason for hiding this comment

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

That sounds great, Niko.

span, "use `..=` for an inclusive range", "..=".to_owned(),
// FIXME: outstanding problem with precedence in ref patterns:
// https://github.com/rust-lang/rust/issues/51043#issuecomment-392252285
Applicability::MaybeIncorrect
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the MaybeIncorrect setting probably prevents rustfix from acting (cc @killercup, confirm?) — but otherwise it'd be nice to have some automated tests that use the suggestion (e.g., using the new // rustfix mode).

Copy link
Member

Choose a reason for hiding this comment

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

Yes -- MaybeIncorrect will prevent rustfix from applying this. It will not, however, prevent the rustfix compile tests as they currently exist from applying it! (Mostly because I haven't updated the test suite to also include a // run-rustfix --yolo mode.) So you can actually test edge cases if you want to. (Otherwise don't put them in the same file I guess.)

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, then @zackmdavis would you be up to add a // run-rustfix test for this? It's pretty straightforward: make a UI test and add that comment, and we will run rustfix and create a foo.fixed file. You can even use ./x.py test --bless to create the reference file automatically.

Copy link
Member Author

Choose a reason for hiding this comment

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

Monday

@bors
Copy link
Contributor

bors commented Jun 9, 2018

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

@zackmdavis
Copy link
Member Author

zackmdavis commented Jun 11, 2018

Unfortunately, a distressing personal matter has come up for me, and I don't think I'll have nearly as much rustc-dev time this week as I had anticipated. (I have not forgotten about #51321, #51104, or #51098, either.) I hope that the delay will not adversely affect my reputation as a contributor in good standing.

You would think that rebasing this branch and adding a run-rustfix test would be a very simple task that would not require very much focused attention, but after rebasing, I'm seeing a lot of seemingly-unrelated UI test failures that I don't immediately know how to make sense of and can't bring myself to investigate further while I am distracted by my distressing personal matter. Thank you for your patience.

@pietroalbini pietroalbini 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 Jun 18, 2018
@zackmdavis zackmdavis force-pushed the ․․․_to_․․= branch from 8e465d3 to 986a804 Compare June 19, 2018 22:17
@kennytm kennytm removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 21, 2018
@zackmdavis
Copy link
Member Author

@nikomatsakis Sorry, I had forgotten the context of what this still needed. Latest push adds run-rustfix for the inclusive-range-pattern-syntax test, and changes the lint to allow-by-default to match the other idioms-2018 lints.

@pietroalbini
Copy link
Member

Ping from triage @nikomatsakis! This PR needs your review.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 25, 2018

📌 Commit c8a7dcc1942790532169c54f34f49ff784c27cc9 has been approved by nikomatsakis

@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 Jun 25, 2018
@bors
Copy link
Contributor

bors commented Jun 26, 2018

⌛ Testing commit c8a7dcc1942790532169c54f34f49ff784c27cc9 with merge 3aeb307c74757847a83ceece5ed489a61610993b...

@bors
Copy link
Contributor

bors commented Jun 26, 2018

💔 Test failed - status-travis

@rust-highfive
Copy link
Collaborator

The job armhf-gnu 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:05:10] [RUSTC-TIMING] rustc_errors test:false 7.398
[00:05:11] error[E0422]: cannot find struct, variant or union type `Spanned` in this scope
[00:05:11]     --> libsyntax/feature_gate.rs:1752:34
[00:05:11]      |
[00:05:11] 1752 |             PatKind::Range(_, _, Spanned { node: RangeEnd::Excluded, .. }) => {
[00:05:11]      |                                  ^^^^^^^ not found in this scope
[00:05:11] help: possible candidate is found in another module, you can import it into scope
[00:05:11] 25   | use codemap::Spanned;
[00:05:11]      |
[00:05:11] 
[00:05:18] error: aborting due to previous error
[00:05:18] error: aborting due to previous error
[00:05:18] 
[00:05:18] For more information about this error, try `rustc --explain E0422`.
[00:05:18] [RUSTC-TIMING] syntax test:false 7.105
[00:05:18] error: Could not compile `syntax`.
[00:05:18] 
[00:05:18] Caused by:
[00:05:18]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name syntax libsyntax/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=6a2f0731783c2bd3 -C extra-filename=-6a2f0731783c2bd3 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-c9d6678b1c0f0b46.so --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-99b4534960f92449.rlib --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-58741ed9de9aae4f.so --extern scoped_tls=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libscoped_tls-b76c070114255d98.rlib --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-5073f1296cd24b67.rlib --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-5d0a8a65bb9fe29f.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-5d0a8a65bb9fe29f.rlib --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-a7df2fc298b4fb06.so --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-670f6bac60d99b34.so` (exit code: 101)
[00:05:18] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:05:18] expected success, got: exit code: 101
[00:05:18] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:05:18] travis_fold:end:stage0-rustc

[00:05:18] travis_time:end:stage0-rustc:start=1529996637458400446,finish=1529996705494065377,duration=68035664931

---
travis_time:end:12ba072c:start=1529996706032475977,finish=1529996706039227095,duration=6751118
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0c53d6df
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1d11f50c
$ 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)

@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 Jun 26, 2018
@rust-highfive
Copy link
Collaborator

The job armhf-gnu 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:05:10] [RUSTC-TIMING] rustc_errors test:false 7.398
[00:05:11] error[E0422]: cannot find struct, variant or union type `Spanned` in this scope
[00:05:11]     --> libsyntax/feature_gate.rs:1752:34
[00:05:11]      |
[00:05:11] 1752 |             PatKind::Range(_, _, Spanned { node: RangeEnd::Excluded, .. }) => {
[00:05:11] help: possible candidate is found in another module, you can import it into scope
[00:05:11]      |
[00:05:11] 25   | use codemap::Spanned;
[00:05:11]      |
---
[00:05:18] [RUSTC-TIMING] syntax test:false 7.105
[00:05:18] error: Could not compile `syntax`.
[00:05:18] 
[00:05:18] Caused by:
[00:05:18]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name syntax libsyntax/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=6a2f0731783c2bd3 -C extra-filename=-6a2f0731783c2bd3 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-c9d6678b1c0f0b46.so --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-99b4534960f92449.rlib --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-58741ed9de9aae4f.so --extern scoped_tls=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libscoped_tls-b76c070114255d98.rlib --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-5073f1296cd24b67.rlib --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-5d0a8a65bb9fe29f.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-5d0a8a65bb9fe29f.rlib --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-a7df2fc298b4fb06.so --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-670f6bac60d99b34.so` (exit code: 101)
[00:05:18] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:05:18] expected success, got: exit code: 101
[00:05:18] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:05:18] travis_fold:end:stage0-rustc

[00:05:18] travis_time:end:stage0-rustc:start=1529996637458400446,finish=1529996705494065377,duration=68035664931

---
travis_time:end:12ba072c:start=1529996706032475977,finish=1529996706039227095,duration=6751118
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0c53d6df
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1d11f50c
$ 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)

These were stabilized in March 2018's rust-lang#47813, and are the Preferred Way
to Do It going forward (q.v. rust-lang#51043).
Our implementation ends up changing the `PatKind::Range` variant in the
AST to take a `Spanned<RangeEnd>` instead of just a `RangeEnd`, because
the alternative would be to try to infer the span of the range operator
from the spans of the start and end subexpressions, which is both
hideous and nontrivial to get right (whereas getting the change to the
AST right was a simple game of type tennis).

This is concerning rust-lang#51043.
@zackmdavis zackmdavis force-pushed the ․․․_to_․․= branch from c8a7dcc to 64365e4 Compare June 26, 2018 14:55
@zackmdavis
Copy link
Member Author

CI failure was due to implicit conflict where a use codemap::Spanned that we needed was removed in 18ff7d0 (which landed three days ago). Rebased and added back use.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 26, 2018

📌 Commit 64365e4 has been approved by nikomatsakis

@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 Jun 26, 2018
@bors
Copy link
Contributor

bors commented Jun 26, 2018

⌛ Testing commit 64365e4 with merge 0cf0691...

bors added a commit that referenced this pull request Jun 26, 2018
lint to favor `..=` over `...` range patterns; migrate to `..=` throughout codebase

We probably need an RFC to actually deprecate the `...` syntax, but here's a candidate implementation for the lint considered in #51043. (My local build is super flaky, but hopefully I got all of the test revisions.)
@bors
Copy link
Contributor

bors commented Jun 27, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 0cf0691 to master...

@bors bors merged commit 64365e4 into rust-lang:master Jun 27, 2018
@zackmdavis zackmdavis deleted the ․․․_to_․․= branch June 27, 2018 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants