-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 5 pull requests #71707
Merged
Merged
Rollup of 5 pull requests #71707
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
UI tests are updated with additional error messages that were missing before.
Add testcases for the `#[track_caller]` and `#[target_feature(..)]` function attributes for errors that were not not caught before.
derefence instructions
The wording was discussed, to a limited degree in rust-lang#71679. This tries to address some confusion I as well as someone else had independently when looking at this macro. Fixes rust-lang#71679
Co-Authored-By: kennytm <kennytm@gmail.com>
…vink rustc: fix check_attr() for methods, closures and foreign functions This fixes an issue that previously turned up for methods in rust-lang#69274, but also exists for closures and foreign function: `check_attr` does not call `codegen_fn_attrs()` for these types when it should, meaning that incorrectly used function attributes are not diagnosed without codegen. The issue affects our UI tests, as they run with `--emit=metadata` by default, but as it turns out, this is not the only case: Function attributes are not checked on any dead code without this fix! This makes the fix a **breaking change**. The following very silly Rust programs compiles fine on stable Rust when it should not, which is fixed by this PR. ```rust fn main() { #[target_feature(enable = "sse2")] || {}; } ``` I assume any real-world program which may trigger this issue would at least emit a dead code warning, but of course that is no guarantee that such code does not exist... Fixes rust-lang#70307
Suggest deref when coercing `ty::Ref` to `ty::RawPtr` Fixes rust-lang#32122 Currently we do autoderef when casting `ty::Ref` ->`ty::Ref`, but we don't autoderef when casting `ty::Ref` -> `ty::RawPtr`. This PR make the compiler suggests deref when coercing `ty::Ref` to `ty::RawPtr`
…=oli-obk Miri: better document and fix dynamic const pattern soundness checks rust-lang/const-eval#42 got me thinking about soundness for consts being used in patterns, and I found a hole in our existing dynamic checks: a const referring to a mutable static *in a different crate* was not caught. This PR fixes that. It also adds some comments that explain which invariants are crucial for soundness of const-patterns. Curiously, trying to weaponize this soundness hole failed: pattern matching compilation ICEd when encountering the cross-crate static, saying "expected allocation ID alloc0 to point to memory". I don't know why that would happen, statics *should* be entirely normal memory for pattern matching to access. r? @oli-obk Cc @rust-lang/wg-const-eval
document missing stable counterparts of intrinsics Notes the stable counterpart of each intrinsic in case one exists. Implements rust-lang#34338 r? @Dylan-DPC
Add clarification on std::cfg macro docs v. #[cfg] attribute The wording was discussed, to a limited degree in rust-lang#71679. This tries to address some confusion I as well as someone else had independently when looking at this macro. Fixes rust-lang#71679
@bors r+ rollup=never |
📌 Commit 8f6eabf 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
Apr 30, 2020
@bors p=5 |
☀️ Test successful - checks-azure |
📣 Toolstate changed by #71707! Tested on commit eece58a. 💔 rustc-dev-guide on linux: test-pass → test-fail (cc @JohnTitor @amanjeev @spastorino @mark-i-m). |
rust-highfive
added a commit
to rust-lang-nursery/rust-toolstate
that referenced
this pull request
Apr 30, 2020
Tested on commit rust-lang/rust@eece58a. Direct link to PR: <rust-lang/rust#71707> 💔 rustc-dev-guide on linux: test-pass → test-fail (cc @JohnTitor @amanjeev @spastorino @mark-i-m).
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.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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:
ty::Ref
toty::RawPtr
#71540 (Suggest deref when coercingty::Ref
toty::RawPtr
)Failed merges:
r? @ghost