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 8 pull requests #90984

Merged
merged 22 commits into from
Nov 17, 2021
Merged

Rollup of 8 pull requests #90984

merged 22 commits into from
Nov 17, 2021

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jhpratt and others added 22 commits November 8, 2021 17:06
The spans for "trait bound not satisfied" errors in trivial trait bounds referenced the entire item (fn, impl, struct) before.
Now they only reference the obligation itself (`String: Copy`)

Address rust-lang#90869
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
warn on must_use use on async fn's

As referenced in rust-lang#78149

This only works on `async` fn's for now, I can also look into if I can get `Box<dyn Future>` and `impl Future` working at this level (hir)
…ostics, r=estebank

Improve diagnostics when a static lifetime is expected

Makes progress towards rust-lang#90600

The diagnostics here were previously entirely removed due to giving a misleading suggestion but if we instead provide an informative label in that same location it should better help the user understand the situation.

I included the example from the issue as it demonstrates an area where the diagnostics are still lacking.
Happy to remove that if its just adding noise atm.
Permit const panics in stable const contexts in stdlib

Without this change, it is not possible to use `panic!` and similar (including `assert!`) in stable const contexts inside of stdlib. See rust-lang#89542 for a real-world case that currently fails for this reason. This does _not_ affect any user code.

For example, this snippet currently fails to compile:

```rust
#[stable(feature = "foo", since = "1.0.0")]
#[rustc_const_stable(feature = "foo", since = "1.0.0")]
const fn foo() {
    assert!(false);
    assert!(false, "foo");
}
```

With the addition of `#[rustc_const_unstable]` to `core::panicking::panic`, the error no longer occurs. This snippet has been added verbatim in this PR as a UI test.

To avoid needing to add `#![feature(core_panic)]` to libcore, the two instances of direct calls to `core::panicking::panic` have been switched to use the `panic!` macro.

I am requesting prioritization because this is holding up other stabilizations such as rust-lang#89542 (which is otherwise ready to merge and succeeds with this change)
…shtriplett

Add Vec::retain_mut

This is to continue the discussion started in rust-lang#83218.

Original comment was:

> Take 2 of rust-lang#34265, since I needed this today.

The reason I think why we should add `retain_mut` is for coherency and for discoverability. For example we have `chunks` and `chunks_mut` or `get` and `get_mut` or `iter` and `iter_mut`, etc. When looking for mutable `retain`, I would expect `retain_mut` to exist. It took me a while to find out about `drain_filter`. So even if it provides an API close to `drain_filter`, just for the discoverability, I think it's worth it.

cc ``````@m-ou-se`````` ``````@jonas-schievink`````` ``````@Mark-Simulacrum``````
Print escaped string if char literal has multiple characters, but only one printable character

Fixes rust-lang#90857

I'm not sure about the error message here, it could get rather long and *maybe* using the names of characters would be better? That wouldn't help the length any, though.
…und, r=estebank

Fix span for non-satisfied trivial trait bounds

The spans for "trait bound not satisfied" errors in trivial trait bounds referenced the entire item (fn, impl, struct) before.
Now they only reference the obligation itself (`String: Copy`)

Address rust-lang#90869
Remove workaround for the forward progress handling in LLVM

this workaround was only needed for LLVM < 12 and the minimum LLVM version was updated to 12 in rust-lang#90175
…estebank

Improve ManuallyDrop suggestion

closes rust-lang#90585
* Fixes the recommended change to use ManuallyDrop as per the issue
* Changes the note to a help
* improves the span so it only points at the type.
@rustbot rustbot added the rollup A PR which is a rollup label Nov 17, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Nov 17, 2021

📌 Commit 469faa2 has been approved by matthiaskrgr

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 17, 2021
@bors
Copy link
Contributor

bors commented Nov 17, 2021

⌛ Testing commit 469faa2 with merge c9c4b5d...

@bors
Copy link
Contributor

bors commented Nov 17, 2021

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing c9c4b5d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 17, 2021
@bors bors merged commit c9c4b5d into rust-lang:master Nov 17, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 17, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c9c4b5d): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@matthiaskrgr matthiaskrgr deleted the rollup-j5bs96a branch November 20, 2021 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: 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.