Skip to content

Rollup of 10 pull requests - #75388

Merged
bors merged 23 commits into
rust-lang:masterfrom
JohnTitor:rollup-9tgkxnl
Aug 11, 2020
Merged

Rollup of 10 pull requests#75388
bors merged 23 commits into
rust-lang:masterfrom
JohnTitor:rollup-9tgkxnl

Conversation

@JohnTitor

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

Philippe Nadonand others added 23 commits August 8, 2020 07:53
Renamed remaining references to "undef" to "uninit" when referring to Miri.
Impacted directories are:
- src/librustc_codegen_llvm/consts.rs
- src/librustc_middle/mir/interpret/
- src/librustc_middle/ty/print/pretty.rs
- src/librustc_mir/
- src/tools/clippy/clippy_lints/src/consts.rs
Upon building Miri based on the new changes it was verified that no changes needed to be made with the Miri project.
Related issue rust-lang#71193
The old implementation only looks at numbers at the end, but not in
other places in a name: "u8" and "u16" got sorted properly, but "u8_bla"
and "u16_bla" did not.
When we have a tuple struct used with struct we don't want to suggest using
the (valid) struct syntax with numeric field names. Instead we want to
suggest the expected syntax.
Given
```rust
fn main() {
match MyOption::MySome(42) {
MyOption::MySome { x: 42 } => (),
_ => (),
}
}
```
We now emit E0769 "tuple variant `MyOption::MySome` written as struct variant"
instead of E0026 "variant `MyOption::MySome` does not have a field named `x`".
Remove unnecessary `unwrap`.
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
Co-authored-by: Lonami <totufals@hotmail.com>
Even though the description is clear but the solution may not be as straightforward.
Adding a suggested fix.
This commit constrains the support added for handling unevaluated consts
in polymorphization (introduced in rust-lang#75260) by:
- Skipping associated constants as this causes cycle errors.
- Skipping promoted constants when they contain `Self` as this ensures
`T` is used in constants of the form `<Self as Foo<T>>`.
Signed-off-by: David Wood <david@davidtw.co>
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Miri: Renamed "undef" to "uninit"
Renamed remaining references to "undef" to "uninit" when referring to Miri.
Impacted directories are:
- `src/librustc_codegen_llvm/consts.rs`
- `src/librustc_middle/mir/interpret/`
- `src/librustc_middle/ty/print/pretty.rs`
- `src/librustc_mir/`
- `src/tools/clippy/clippy_lints/src/consts.rs`
Upon building Miri based on the new changes it was verified that no changes needed to be made with the Miri project.
Related issue rust-lang#71193
…xes, r=lcnr
polymorphize: constrain unevaluated const handling
This PR constrains the support added for handling unevaluated consts in polymorphization (introduced in rust-lang#75260) by:
- Skipping associated constants as this causes cycle errors.
- Skipping promoted constants when they contain `Self` as this ensures `T` is used in constants of the form `<Self as Foo<T>>`.
Due to an oversight on my part, when landing rust-lang#75260 and rust-lang#75255, some tests started failing when polymorphization was enabled that I didn't notice until after landing - this PR fixes the regressions from rust-lang#75260.
r? @lcnr
…k, r=oli-obk
move stack size check to const_eval machine
This is consistent with how we enforce the step limit. In particular, we do not want this limit checked for Miri-the-tool.
…t-sort, r=GuillaumeGomez
Rustdoc: Fix natural ordering to look at all numbers.
The old implementation only looks at numbers at the end, but not in other places in a name: `u8` and `u16` got sorted properly, but `u8_bla` and `u16_bla` did not.
![image](https://user-images.githubusercontent.com/783247/89740226-28e8b180-da87-11ea-885d-77a7c8a6ba00.png)
…, r=oli-obk
Tweak conditions for E0026 and E0769
When we have a tuple struct used with struct we don't want to suggest using the (valid) struct syntax with numeric field names. Instead we want to suggest the expected syntax.
Given
```rust
fn main() {
match MyOption::MySome(42) {
MyOption::MySome { x: 42 } => (),
_ => (),
}
}
```
We now emit E0769 "tuple variant `MyOption::MySome` written as struct variant" instead of E0026 "variant `MyOption::MySome` does not have a field named `x`".
Tiny cleanup, remove unnecessary `unwrap`
Remove unnecessary `unwrap`.
unused_delims: trim expr
improves rustfix output.
Add sample fix for E0749
Even though the description is clear but the solution may not be as straightforward.
Adding a suggested fix from documentation side.
r? @GuillaumeGomez
However, this suggestion should be shown in rustc itself for easy fix, the documentation should also reflect on the changes in rustc. Currently,
```
error[E0749]: negative impls cannot have any items
--> test.rs:6:5
|
6 | type Foo = i32; // error!
| ^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0749`.
```
rustc should tell the user to remove it.
@JohnTitor

Copy link
Copy Markdown
MemberAuthor

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@bors

bors commented Aug 11, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 5320028 has been approved by JohnTitor

@rustbotrustbot added the rollup A PR which is a rollup label Aug 11, 2020
@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 11, 2020
@bors

bors commented Aug 11, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5320028 with merge 6ccb1f6a720e2f9371869c96890f7f6f22476d82...

@bors

bors commented Aug 11, 2020

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-azure

@borsbors 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 Aug 11, 2020
@JohnTitor

Copy link
Copy Markdown
MemberAuthor
curl: (56) SSLRead() return error -9806
clang+llvm-9.0.0-x86_64-darwin-apple/lib/libclang.dylib: Lzma library error: No progress is possible
tar: Error exit delayed from previous errors.

@bors retry

@borsbors 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 Aug 11, 2020
@bors

bors commented Aug 11, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5320028 with merge 4b9ac51...

@bors

bors commented Aug 11, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions, checks-azure
Approved by: JohnTitor
Pushing 4b9ac51 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Aug 11, 2020
@bors
bors merged commit 4b9ac51 into rust-lang:masterAug 11, 2020
@JohnTitor
JohnTitor deleted the rollup-9tgkxnl branch August 11, 2020 14:51
@cuvipercuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: 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.

12 participants

@JohnTitor@bors@cuviper@rustbot@RalfJung@m-ou-se@estebank@tesuji@XAMPPRocky@lcnr@pickfire@davidtwco