-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 11 pull requests #57747
Rollup of 11 pull requests #57747
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
@bors r+ p=11 |
📌 Commit 2a830e4 has been approved by |
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
☀️ Test successful - checks-travis, status-appveyor |
📣 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). |
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).
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 ````
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
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 ````
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 ````
Successful merges:
-C opt-level=0
implies-C debug-assertions
. #57132 (Document that-C opt-level=0
implies-C debug-assertions
.)Failed merges:
r? @ghost