Uh oh!
There was an error while loading. Please reload this page.
Rollup of 6 pull requests - #69851
Merged
Merged
Conversation
Previously, attributes on 'if' expressions (e.g. #[attr] if true {})
were disallowed during parsing. This made it impossible for macros to
perform any custom handling of such attributes (e.g. stripping them
away), since a compilation error would be emitted before they ever had a
chance to run.
This PR permits attributes on 'if' expressions ('if-attrs' from here on).
Both built-in attributes (e.g. `#[allow]`, `#[cfg]`) are supported.
We still do *not* accept attributes on 'other parts' of an if-else
chain. That is, the following code snippet still fails to parse:
```rust
if true {} #[attr] else if false {} else #[attr] if false {} #[attr]
else {}
```Additionally whenever possible match C API provided by the LLVM.
Although `stack_overflow::init` runs very early in the process, even before `main`, there may already be signal handlers installed for things like the address sanitizer. In that case, just leave it alone, and don't bother trying to allocate our own signal stacks either.
…=Centril
Permit attributes on 'if' expressions
Previously, attributes on 'if' expressions (e.g. `#[attr] if true {}`)
were disallowed during parsing. This made it impossible for macros to
perform any custom handling of such attributes (e.g. stripping them
away), since a compilation error would be emitted before they ever had a
chance to run.
This PR permits attributes on 'if' expressions ('if-attrs' from here on).
Both built-in attributes (e.g. `#[allow]`, `#[cfg]`) and proc-macro attributes are supported.
We still do *not* accept attributes on 'other parts' of an if-else
chain. That is, the following code snippet still fails to parse:
```rust
if true {} #[attr] else if false {} else #[attr] if false {} #[attr]
else {}
```
Closesrust-lang#68618unix: Don't override existing SIGSEGV/BUS handlers Although `stack_overflow::init` runs very early in the process, even before `main`, there may already be signal handlers installed for things like the address sanitizer. In that case, just leave it alone, and don't bother trying to allocate our own signal stacks either. Fixesrust-lang#69524.
Ensure that validity only raises validity errors For now, only as a debug-assertion (similar to const-prop detecting errors that allocate). Now includes rust-lang#69646. [Relative diff](RalfJung/rust@layout-visitor...RalfJung:validity-errors). r? @oli-obk
librustc_codegen_llvm: Use slices in preference to 0-terminated strings Additionally whenever possible match C API provided by the LLVM.
rustc_parse: Remove `Parser::normalized(_prev)_token` Perform the "normalization" (renamed to "uninterpolation") on the fly when necessary. The final part of rust-lang#69579rust-lang#69384rust-lang#69376rust-lang#69211rust-lang#69034rust-lang#69006. r? @Centril
Add more regression tests Closesrust-lang#54239Closesrust-lang#57200Closesrust-lang#57201Closesrust-lang#60473Closesrust-lang#64620Closesrust-lang#67166 r? @Centril
Centril
commented
Mar 9, 2020
ContributorAuthor
@bors r+ p=1001 rollup=never |
bors
commented
Mar 9, 2020
Collaborator
📌 Commit 7e903f8 has been approved by |
bors
commented
Mar 9, 2020
Collaborator
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
bors
commented
Mar 9, 2020
Collaborator
bors
commented
Mar 9, 2020
Collaborator
☀️ Test successful - checks-azure |
rust-highfive added a commit
to rust-lang-nursery/rust-toolstate
that referenced
this pull request
Mar 9, 2020
Tested on commit rust-lang/rust@3dbade6. Direct link to PR: <rust-lang/rust#69851> 💔 miri on windows: test-pass → test-fail (cc @oli-obk@eddyb@RalfJung). 💔 miri on linux: test-pass → test-fail (cc @oli-obk@eddyb@RalfJung).
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Parser::normalized(_prev)_token#69801 (rustc_parse: RemoveParser::normalized(_prev)_token)Failed merges:
r? @ghost