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 13 pull requests #77082

Closed
wants to merge 54 commits into from

Conversation

ecstatic-morse
Copy link
Contributor

Successful merges:

Failed merges:

r? @ghost

lcnr and others added 30 commits September 19, 2020 22:17
This was missed in PR rust-lang#75465. As a result, a few places have been using
the full body span of functions, instead of just the header span.
I little clarification
Continuation of rust-lang#74526

Adds the #[track_caller] attribute to almost all panicking Cell
functions. The ones that borrow two Cells in their function
body are spared, because the panic location helps pinpoint
which of the two borrows failed. You'd need to have
full debuginfo and backtraces enabled together with column
info in order to be able to discern the cases.
Column info is only available on non-Windows platforms.
This may not be strictly minimal, but all unstable functions also need a
`rustc_const_unstable` attribute.
This is a hack for parity with `qualify_min_const_fn`, which only
emitted a single error.
ecstatic-morse and others added 19 commits September 22, 2020 10:22
…-obk

Uplift `temporary-cstring-as-ptr` lint from `clippy` into rustc

The general consensus seems to be that this lint covers a common enough mistake to warrant inclusion in rustc.
The diagnostic message might need some tweaking, as I'm not sure the use of second-person perspective matches the rest of rustc, but I'd like to hear others' thoughts on that.

(cc rust-lang#53224).

r? @oli-obk
…tor, r=oli-obk

Remove `qualify_min_const_fn`

~~Blocked on rust-lang#76807 (the first six commits).~~

With this PR, all checks in `qualify_min_const_fn` are replicated in `check_consts`, and the former is no longer invoked. My goal was to have as few changes to test output as possible, since making sweeping changes to the code *while* doing big batches of diagnostics updates turned out to be a headache. To this end, there's a few `HACK`s in `check_consts` to achieve parity with `qualify_min_const_fn`.

The new system that replaces `is_min_const_fn` is referred to as "const-stability"  My end goal for the const-stability rules is this:
* Const-stability is only applicable to functions defined in `staged_api` crates.
* All functions not marked `rustc_const_unstable` are considered "const-stable".
    - NB. This is currently not implemented. `#[unstable]` functions are also const-unstable. This causes problems when searching for feature gates.
    - All "const-unstable" functions have an associated feature gate
* const-stable functions can only call other const-stable functions
     - `allow_internal_unstable` can be used to circumvent this.
* All const-stable functions are subject to some additional checks (the ones that were unique to `qualify_min_const_fn`)

The plan is to remove each `HACK` individually in subsequent PRs. That way, changes to error message output can be reviewed in isolation.
Record `tcx.def_span` instead of `item.span` in crate metadata

This was missed in PR rust-lang#75465. As a result, a few places have been using
the full body span of functions, instead of just the header span.
emit errors during AbstractConst building

There changes are currently still untested, so I don't expect this to pass CI 😆

It seems to me like this is the direction we want to go in, though we didn't have too much of a discussion about this.

r? @oli-obk
fix small typo in docs and comments

Fixed `the the` to `the`, as far as I found.
Improve documentation for ToSocketAddrs

I little clarification
Liballoc bench vec use mem take not replace
Miri: more informative deallocation error messages

Make sure we show the affected AllocId.

r? @oli-obk
…ulacrum

Add #[track_caller] to more panicking Cell functions

Continuation of rust-lang#74526

Adds the #[track_caller] attribute to almost all panicking Cell
functions. The ones that borrow two Cells in their function
body are spared, because the panic location helps pinpoint
which of the two borrows failed. You'd need to have
full debuginfo and backtraces enabled together with column
info in order to be able to discern the cases.
Column info in debuginfo is only available on non-Windows platforms.
…=oli-obk

Fix dest prop miscompilation around references

Closes rust-lang#77002
Don't use an if guard to check equality with a constant

Match on it directly instead
@ecstatic-morse
Copy link
Contributor Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Sep 22, 2020

📌 Commit f7c06ea has been approved by ecstatic-morse

@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 Sep 22, 2020
@bors
Copy link
Contributor

bors commented Sep 23, 2020

⌛ Testing commit f7c06ea with merge b805a63808c3b54f39c367760801a780c2905c6f...

@bors
Copy link
Contributor

bors commented Sep 23, 2020

💔 Test failed - checks-actions

@bors bors 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 Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.