-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Closed
Rollup of 13 pull requests #77082
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Co-authored-by: Ivan Tham <[email protected]>
Co-authored-by: Ivan Tham <[email protected]>
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.
Match on it directly instead
…-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
Typo fix: "satsify" -> "satisfy"
…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
Merge two almost identical match arms
@bors r+ p=10 |
📌 Commit f7c06ea has been approved by |
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
⌛ Testing commit f7c06ea with merge b805a63808c3b54f39c367760801a780c2905c6f... |
💔 Test failed - checks-actions |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
temporary-cstring-as-ptr
lint fromclippy
into rustc #75671 (Uplifttemporary-cstring-as-ptr
lint fromclippy
into rustc)qualify_min_const_fn
#76850 (Removequalify_min_const_fn
)tcx.def_span
instead ofitem.span
in crate metadata #76898 (Recordtcx.def_span
instead ofitem.span
in crate metadata)Failed merges:
r? @ghost