Merged
Conversation
Make `continue` jump to the loop condition's `LiveNode` instead of one of the loop body.
…ented Index trait
It's simpler and makes some benchmark run up to 1% faster. It also makes `hir::ExprKind` more like `ast::ExprKind` (which underwent the equivalent change in rust-lang#55777).
It's identical to `ast::Label`.
When given multiple lifetimes prior to type parameters in generic parameters, do not ICE and print the correct suggestion.
…tsakis Add a regression test for mutating a non-mut #[thread_local] This should close rust-lang#54901 since the regression has since been fixed.
Document that `-C opt-level=0` implies `-C debug-assertions`. I couldn't find it stated anywhere else (https://doc.rust-lang.org/nightly/rustc/codegen-options/index.html#opt-level). It was a problem before here: rust-lang#39449, it got lost in the migration to the new documentation I assume. On a sidenote: I think that `-C opt-level=0` having a sideeffect on another flag should be changed. Having compiler flags affecting others doesn't make much sense to me, they are used to fine tune anyway. In any case, this plays no role in this PR.
…ting, r=steveklabnik docs(rustc): Link to the book's source in rustc This makes the source of [the rustc book](https://doc.rust-lang.org/rustc/what-is-rustc.html) book a bit more discoverable.
…ebank Fix unused_assignments false positive Fixes rust-lang#22630. In liveness analysis, make `continue` jump to the loop condition's `LiveNode` (`cond` as in comment) instead of the loop's one (`expr`). https://github.com/rust-lang/rust/blob/069b0c410808c1d1d33b495e048b1186e9f8d57f/src/librustc/middle/liveness.rs#L1358-L1370
Better error note on unimplemented Index trait for string fixes rust-lang#56740 I've tried to compile suggestion from comments in the issue rust-lang#56740, but unsure of it. So I'm open to advice :) Current output will be like this: ```rust error[E0277]: the type `str` cannot be indexed by `{integer}` --> $DIR/str-idx.rs:3:17 | LL | let c: u8 = s[4]; //~ ERROR the type `str` cannot be indexed by `{integer}` | ^^^^ `str` cannot be indexed by `{integer}` | = help: the trait `std::ops::Index<{integer}>` is not implemented for `str` = note: you can use `.chars().nth()` or `.bytes().nth()` see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings> error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. ``` `x.py test src/test/ui` succeeded and I've also tested output manually by compiling the following code: ```rust fn _f() { let s = std::string::String::from("hello"); let _c = s[0]; let s = std::string::String::from("hello"); let mut _c = s[0]; let s = "hello"; let _c = s[0]; let s = "hello"; let mut _c = &s[0]; } ``` Not sure if some docs should be changed too. I will also fix error message in the [Book :: Indexing into Strings](https://github.com/rust-lang/book/blob/db53e2e3cdf77beac853df6f29db4b3b86ea598c/src/ch08-02-strings.md#indexing-into-strings) if that PR will get approved :)
…erister use structured macro and path resolve suggestions
librustc_metadata: Pass a default value when unwrapping a span Fixes rust-lang#57323. When compiling with `static-nobundle` a-la `rustc -l static-nobundle=nonexistent main.rs` we now get a neat output in the form of: ``` error[E0658]: kind="static-nobundle" is feature gated (see issue rust-lang#37403) | = help: add #![feature(static_nobundle)] to the crate attributes to enable error: aborting due to previous error For more information about this error, try `rustc --explain E0658`. ``` The build and tests completed successfully on my machine. Should I be adding a new test?
…matsakis Add regression test to close rust-lang#53787 Fixes rust-lang#53787
…woerister Two HIR tweaks Two HIR tweaks that make things slightly simpler and faster.
Fix suggestions given mulitple bad lifetimes When given multiple lifetimes prior to type parameters in generic parameters, do not ICE and print the correct suggestion. r? @estebank CC @pnkfelix Fixes: rust-lang#57521
Use structured suggestion to surround struct literal with parenthesis
Contributor
Author
|
@bors r+ p=11 |
Collaborator
|
📌 Commit 2a830e4 has been approved by |
Collaborator
bors
added a commit
that referenced
this pull request
Jan 18, 2019
Rollup of 11 pull requests Successful merges: - #57107 (Add a regression test for mutating a non-mut #[thread_local]) - #57132 (Document that `-C opt-level=0` implies `-C debug-assertions`.) - #57212 (docs(rustc): Link to the book's source in rustc) - #57302 (Fix unused_assignments false positive) - #57350 (Better error note on unimplemented Index trait for string) - #57635 (use structured macro and path resolve suggestions) - #57650 (librustc_metadata: Pass a default value when unwrapping a span) - #57657 (Add regression test to close #53787) - #57658 (Two HIR tweaks) - #57720 (Fix suggestions given mulitple bad lifetimes) - #57725 (Use structured suggestion to surround struct literal with parenthesis) Failed merges: r? @ghost
Collaborator
|
☀️ Test successful - checks-travis, status-appveyor |
Contributor
|
📣 Toolstate changed by #57747! Tested on commit f001287. 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra). |
rust-highfive
added a commit
to rust-lang-nursery/rust-toolstate
that referenced
this pull request
Jan 19, 2019
Tested on commit rust-lang/rust@f001287. Direct link to PR: <rust-lang/rust#57747> 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra). 💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra). 💔 rls on windows: test-pass → build-fail (cc @nrc @Xanewok, @rust-lang/infra). 💔 rls on linux: test-pass → build-fail (cc @nrc @Xanewok, @rust-lang/infra).
This was referenced Jan 19, 2019
Closed
matthiaskrgr
added a commit
to matthiaskrgr/rust-clippy
that referenced
this pull request
Jan 19, 2019
bors
added a commit
to rust-lang/rust-clippy
that referenced
this pull request
Jan 19, 2019
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 21, 2019
Changes: ```` Fixing typo in CONTRIBUTING.md Fix breakage due to rust-lang#57651 Run rustfmt Fixed breakage due to rust-lang#57489 Fix breakage due to rust-lang#57755 Catch up with `format_args` change Fix bad `while_let_on_iterator` suggestion. rustup rust-lang#57747 Fixing issues pointed out by dogfood tests. Update to collect all the files then throw the error. Adding a test for checking if test files are missing. Remove bors.toml add applicability to lint name suggestion ````
bors
added a commit
that referenced
this pull request
Jan 21, 2019
submodules: update clippy from 1b89724 to e648adf Fixes clippy toolstate Changes: ```` Catch up with `format_args` change Fix bad `while_let_on_iterator` suggestion. rustup #57747 Fixing issues pointed out by dogfood tests. Update to collect all the files then throw the error. Adding a test for checking if test files are missing. Remove bors.toml add applicability to lint name suggestion ```` r? @oli-obk
VardhanThigle
pushed a commit
to jethrogb/rust
that referenced
this pull request
Jan 31, 2019
Changes: ```` Fixing typo in CONTRIBUTING.md Fix breakage due to rust-lang#57651 Run rustfmt Fixed breakage due to rust-lang#57489 Fix breakage due to rust-lang#57755 Catch up with `format_args` change Fix bad `while_let_on_iterator` suggestion. rustup rust-lang#57747 Fixing issues pointed out by dogfood tests. Update to collect all the files then throw the error. Adding a test for checking if test files are missing. Remove bors.toml add applicability to lint name suggestion ````
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this pull request
May 5, 2020
Changes: ```` Fixing typo in CONTRIBUTING.md Fix breakage due to rust-lang/rust#57651 Run rustfmt Fixed breakage due to rust-lang/rust#57489 Fix breakage due to rust-lang/rust#57755 Catch up with `format_args` change Fix bad `while_let_on_iterator` suggestion. rustup rust-lang/rust#57747 Fixing issues pointed out by dogfood tests. Update to collect all the files then throw the error. Adding a test for checking if test files are missing. Remove bors.toml add applicability to lint name suggestion ````
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
-C opt-level=0implies-C debug-assertions. #57132 (Document that-C opt-level=0implies-C debug-assertions.)Failed merges:
r? @ghost