Skip to content

Rollup of 6 pull requests - #70441

Merged
bors merged 15 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rollup-qv7h2ph
Mar 27, 2020
Merged

Rollup of 6 pull requests#70441
bors merged 15 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rollup-qv7h2ph

Conversation

@Dylan-DPC-zz

Copy link
Copy Markdown

Successful merges:

Failed merges:

r? @ghost

nnethercoteand others added 15 commits March 25, 2020 14:09
It's unused by any existing targets, and soon we'll be embedding full
bitcode by default anyway.
Currently, there are three fields in `ModuleConfig` that dictate
how object files are emitted: `emit_obj`, `obj_is_bitcode`, and
`embed_bitcode`.
Some of the combinations of these fields are nonsensical, in particular
having both `obj_is_bitcode` and `embed_bitcode` true at the same time.
Also, currently:
- we needlessly emit and then delete a bytecode file if `obj_is_bitcode`
is true but `emit_obj` is false;
- we needlessly embed bitcode in the LLVM module if `embed_bitcode` is
true and `emit_obj` is false.
This commit combines the three fields into one, with a new type
`EmitObj` (and the auxiliary `BitcodeSection`) which can encode five
different possibilities.
In the old code, `set_flags` would set `obj_is_bitcode` and
`embed_bitcode` on all three of the configs (`modules`, `allocator`,
`metadata`) if the relevant other conditions were met, even if no object
code needed to be emitted for one or more of them. Whereas
`start_async_codegen` would set `emit_obj`, but only for those configs
that need it.
In the new code, `start_async_codegen` does all the work of setting
`emit_obj`, and it only does that for the configs that need it.
`set_flags` no longer sets anything related to object file emission.
It makes things a little clearer.
- Added is_under_guard parameter to _match::is_useful and
only add to the matrix if false
- Added comments explaining behavior
…ndling, r=alexcrichton
Refactor object file handling
Some preliminary clean-ups that grease the path to rust-lang#66961.
r? @alexcrichton
add 'fn write_u16s' to Memory
Added new function `Memory::write_u16s`. Needed in `MIRI` for implementing helper function to write wide_str to memory (for Windows).
…arning, r=Centril,Nadrieril,varkor
Fix incorrect pattern warning "unreachable pattern"
Fixesrust-lang#70372
Added `is_under_guard` parameter to `_match::is_useful` and only add it to the matrix if `false`
Tested with:
```rust
#![feature(or_patterns)]
fn main() {
match (3,42) {
(a,_) | (_,a) if a > 10 => {println!("{}", a)}
_ => ()
}
match Some((3,42)) {
Some((a, _)) | Some((_, a)) if a > 10 => {println!("{}", a)}
_ => ()
}
match Some((3,42)) {
Some((a, _) | (_, a)) if a > 10 => {println!("{}", a)}
_ => ()
}
}
```
`error_bad_item_kind`: add help text
For example, this adds:
```
= help: consider moving the `use` import out to a nearby module scope
```
r? @petrochenkov@estebankFixesrust-lang#37205.
@Dylan-DPC-zz

Copy link
Copy Markdown
Author

@bors r+ rollup=never p=6

@bors

bors commented Mar 26, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 195147c has been approved by Dylan-DPC

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 26, 2020
@Dylan-DPC-zz

Copy link
Copy Markdown
Author

@bors r+ rollup=never p=6

@bors

bors commented Mar 26, 2020

Copy link
Copy Markdown
Collaborator

💡 This pull request was already approved, no need to approve it again.

@bors

bors commented Mar 26, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 195147c has been approved by Dylan-DPC

@bors

bors commented Mar 26, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 195147c with merge 62c6006...

@bors

bors commented Mar 27, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: Dylan-DPC
Pushing 62c6006 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Mar 27, 2020
@bors
bors merged commit 62c6006 into rust-lang:masterMar 27, 2020
@Dylan-DPC-zz
Dylan-DPC-zz deleted the rollup-qv7h2ph branch March 27, 2020 00:05
@borsbors mentioned this pull request Mar 27, 2020
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.S-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.

9 participants

@Dylan-DPC-zz@bors@nnethercote@Centril@GuillaumeGomez@JOE1994@AminArria@RalfJung@Dylan-DPC