Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 11 pull requests #57747

Merged
merged 27 commits into from Jan 19, 2019

Conversation

Projects
None yet
@Centril
Copy link
Contributor

Centril commented Jan 18, 2019

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

daxpedda and others added some commits Dec 26, 2018

Fix unused_assignments false positive
Make `continue` jump to the loop condition's `LiveNode` instead of one
of the loop body.
Cleanup
`for` loops are no longer closures.
AB1908
Use `Lit` rather than `P<Lit>` in `hir::ExprKind`.
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 #55777).
Remove `hir::Label`.
It's identical to `ast::Label`.
AB1908
AB1908
AB1908
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.
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
Add a regression test for mutating a non-mut #[thread_local]

This should close #54901 since the regression has since been fixed.
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
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: #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.
Rollup merge of #57212 - phansch:improve_rustc_book_contributing, r=s…
…teveklabnik

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.
Rollup merge of #57302 - sinkuu:unused_assignments_fp, r=estebank
Fix unused_assignments false positive

Fixes #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
Rollup merge of #57350 - folex:master, r=estebank
Better error note on unimplemented Index trait for string

fixes #56740

I've tried to compile suggestion from comments in the issue #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 :)
Rollup merge of #57635 - euclio:path-separators, r=michaelwoerister
use structured macro and path resolve suggestions
Rollup merge of #57650 - AB1908:master, r=petrochenkov
librustc_metadata: Pass a default value when unwrapping a span

Fixes #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 #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?
Rollup merge of #57658 - nnethercote:rm-hir-P-Lit, r=michaelwoerister
Two HIR tweaks

Two HIR tweaks that make things slightly simpler and faster.
Rollup merge of #57720 - dlrobertson:fix_57521, r=estebank
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: #57521
Rollup merge of #57725 - estebank:parens, r=michaelwoerister
Use structured suggestion to surround struct literal with parenthesis
@Centril

This comment has been minimized.

Copy link
Contributor Author

Centril commented Jan 18, 2019

@bors r+ p=11

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 18, 2019

📌 Commit 2a830e4 has been approved by Centril

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 18, 2019

⌛️ Testing commit 2a830e4 with merge f001287...

bors added a commit that referenced this pull request Jan 18, 2019

Auto merge of #57747 - Centril:rollup, r=Centril
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
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 19, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Centril
Pushing f001287 to master...

@bors bors merged commit 2a830e4 into rust-lang:master Jan 19, 2019

1 check passed

homu Test successful
Details
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 19, 2019

📣 Toolstate changed by #57747!

Tested on commit f001287.
Direct link to PR: #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).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jan 19, 2019

📣 Toolstate changed by rust-lang/rust#57747!
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).

@Centril Centril deleted the Centril:rollup branch Jan 19, 2019

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 19, 2019

submodules: update clippy from 1b89724b to e648adf0
Changes:
````
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 19, 2019

Auto merge of #57756 - matthiaskrgr:clippy_submodule_upd, r=oli-obk
submodules: update clippy from 1b89724b to e648adf0

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

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 21, 2019

submodules: update clippy from 1b89724b to 1838bfe5
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

Auto merge of #57756 - matthiaskrgr:clippy_submodule_upd, r=oli-obk
submodules: update clippy from 1b89724b to e648adf0

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

submodules: update clippy from 1b89724b to 1838bfe5
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
````
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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.