Skip to content

Rollup of 8 pull requests - #80939

Merged
bors merged 22 commits into
rust-lang:masterfrom
JohnTitor:rollup-pymns4q
Jan 12, 2021
Merged

Rollup of 8 pull requests#80939
bors merged 22 commits into
rust-lang:masterfrom
JohnTitor:rollup-pymns4q

Conversation

@JohnTitor

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jryansand others added 22 commits December 6, 2020 02:32
This replaces tabs earlier in the diagnostics emitting process, which allows
various margin calculations to ignore the existence of tabs. It does add a
string copy for the source lines that are emitted.
Rationale:
- `atty` is widely used in the Rust ecosystem
- We already use it (in `rustc_errors` and other places)
- We shouldn't be rolling our own TTY detector when there's a
widely-used, well-tested package that we can use
…-expand, r=estebank
Replace tabs earlier in diagnostics
This replaces tabs earlier in the diagnostics emitting process, which allows various margin calculations to ignore the existence of tabs. It does add a string copy for the source lines that are emitted.
Fixesrust-lang#78438
r? `@estebank`
…me_init, r=dtolnay
Add `MaybeUninit` method `array_assume_init`
When initialising an array element-by-element, the conversion to the initialised array is done through `mem::transmute`, which is both ugly and does not work with const generics (see rust-lang#61956). This PR proposes the associated method `array_assume_init`, matching the style of `slice_assume_init_*`:
```rust
unsafe fn array_assume_init<T, const N: usize>(array: [MaybeUninit<T>; N]) -> [T; N];
```
Example:
```rust
let mut array: [MaybeUninit<i32>; 3] = MaybeUninit::uninit_array();
array[0].write(0);
array[1].write(1);
array[2].write(2);
// SAFETY: Now safe as we initialised all elements
let array: [i32; 3] = unsafe {
MaybeUninit::array_assume_init(array)
};
```
Things I'm unsure about:
* Should this be a method of array instead?
* Should the function be const?
…chenkov
Move some tests to more reasonable directories
The idea is to move `issues`/`ui` tests in small batches
r? `@petrochenkov`
driver: Use `atty` instead of rolling our own
Fixesrust-lang#80888.
Rationale:
- `atty` is widely used in the Rust ecosystem
- We already use it (in `rustc_errors` and other places)
- We shouldn't be rolling our own TTY detector when there's a
widely-used, well-tested package that we can use
Replace a simple `if let` with the `matches` macro
`@rustbot` modify labels +C-cleanup +T-compiler
…, r=estebank
fix typo in trait method mutability mismatch help
@rustbotrustbot added the rollup A PR which is a rollup label Jan 12, 2021
@JohnTitor

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=8

@bors

bors commented Jan 12, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 139daf5 has been approved by JohnTitor

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 12, 2021
@bors

bors commented Jan 12, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 139daf5 with merge b6b4616...

@bors

bors commented Jan 12, 2021

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing b6b4616 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jan 12, 2021
@bors
bors merged commit b6b4616 into rust-lang:masterJan 12, 2021
@rustbotrustbot added this to the 1.51.0 milestone Jan 12, 2021
@JohnTitor
JohnTitor deleted the rollup-pymns4q branch January 12, 2021 11:27
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.

10 participants

@JohnTitor@bors@rustbot@jryans@joboet@epilys@c410-f3r@euclio@LingMan@camelid