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 10 pull requests #64246

Merged
merged 34 commits into from
Sep 7, 2019
Merged

Rollup of 10 pull requests #64246

merged 34 commits into from
Sep 7, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Sep 7, 2019

Successful merges:

Failed merges:

r? @ghost

mark-i-m and others added 30 commits August 26, 2019 18:06
`gensym_if_underscore` still exists. The symbol interner can still
create arbitray gensyms, this is just not exposed publicly.
Use these to create call-site spans for AST passes when needed.
Also ensure that we're consistently using the def-site span when
appropriate.
When encountering a likely intended turbofish without `::`, bubble
up the diagnostic instead of emitting it to allow the parser to recover
more gracefully and avoid uneccessary type errors that are likely to be
wrong.
No new code should be using it.
In rust-lang#60981 we switched to using src/llvm-project/compiler-rt inside
compiler-builtins rather than a separate copy of it.
In order to have the "c" feature turn on in builds from the source
tarball, we need to include that path in its creation.

fixes rust-lang#64239
…etrochenkov

Use hygiene for AST passes

AST passes are now able to have resolve consider their expansions as if they were opaque macros defined either in some module in the current crate, or a fake empty module with `#[no_implicit_prelude]`.

* Add an ExpnKind for AST passes.
* Remove gensyms in AST passes.
* Remove gensyms in`#[test]`, `#[bench]` and `#[test_case]`.
* Allow opaque macros to define tests.
* Move tests for unit tests to their own directory.
* Remove `Ident::{gensym, is_gensymed}` - `Ident::gensym_if_underscore` still exists.

cc rust-lang#60869, rust-lang#61019

r? @petrochenkov
Filter linkcheck spurious failure

r? @ehuss

cc @spastorino

Basically, we filter errors with messages containing "timed out"... a bit of a hack, but hopefully this will be functionality built into linkcheck soon.
rustc_codegen_llvm: give names to non-alloca variable values.

These names only matter when looking at LLVM IR, but they can help.

When one value is used for multiple variables, I decided to combine the names.
I chose `,` as a separator but maybe `=` or ` ` (space) are more appropriate.
(LLVM names can contain any characters - if necessary they end up having quotes)

As an example, this function:
```rust
#[no_mangle]
pub fn test(a: u32, b: u32) -> u32 {
    let c = a + b;
    let d = c;
    let e = d * a;
    e
}
```
Used to produce this LLVM IR:
```llvm
define i32 @test(i32 %a, i32 %b) unnamed_addr #0 {
start:
  %0 = add i32 %a, %b
  %1 = mul i32 %0, %a
  ret i32 %1
}
```
But after this PR you get this:
```llvm
define i32 @test(i32 %a, i32 %b) unnamed_addr #0 {
start:
  %"c,d" = add i32 %a, %b
  %e = mul i32 %"c,d", %a
  ret i32 %e
}
```

cc @nagisa @rkruppe
…chenkov

Bail out when encountering likely missing turbofish in parser

When encountering a likely intended turbofish without `::`, bubble
up the diagnostic instead of emitting it to allow the parser to recover
more gracefully and avoid uneccessary type errors that are likely to be
wrong.

Fix rust-lang#61329.
Move the HIR CFG to `rustc_ast_borrowck`

No new code should be using it.
…ebank

Correct pluralisation of various diagnostic messages
…richton

Include compiler-rt in the source tarball

In rust-lang#60981 we switched to using src/llvm-project/compiler-rt inside
compiler-builtins rather than a separate copy of it.
In order to have the "c" feature turn on in builds from the source
tarball, we need to include that path in its creation.

fixes rust-lang#64239
…mulacrum

[doc] Added more prereqs and note about default directory
Move injection of attributes from command line to `libsyntax_ext`

Just a tiny bit of code generation that wasn't moved into `libsyntax_ext` in rust-lang#62771.
@Centril
Copy link
Contributor Author

Centril commented Sep 7, 2019

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Sep 7, 2019

📌 Commit 3d4cb50 has been approved by Centril

@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 7, 2019
@bors
Copy link
Contributor

bors commented Sep 7, 2019

⌛ Testing commit 3d4cb50 with merge 2c06acb34bafc4c1f88e9bf683f34894c8411b7c...

@bors
Copy link
Contributor

bors commented Sep 7, 2019

💥 Test timed out

@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 7, 2019
@Centril
Copy link
Contributor Author

Centril commented Sep 7, 2019

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 7, 2019
@bors
Copy link
Contributor

bors commented Sep 7, 2019

⌛ Testing commit 3d4cb50 with merge ef54f57...

bors added a commit that referenced this pull request Sep 7, 2019
Rollup of 10 pull requests

Successful merges:

 - #63919 (Use hygiene for AST passes)
 - #63927 (Filter linkcheck spurious failure)
 - #64149 (rustc_codegen_llvm: give names to non-alloca variable values.)
 - #64192 (Bail out when encountering likely missing turbofish in parser)
 - #64231 (Move the HIR CFG to `rustc_ast_borrowck`)
 - #64233 (Correct pluralisation of various diagnostic messages)
 - #64236 (reduce visibility)
 - #64240 (Include compiler-rt in the source tarball)
 - #64241 ([doc] Added more prereqs and note about default directory)
 - #64243 (Move injection of attributes from command line to `libsyntax_ext`)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Sep 7, 2019

☀️ Test successful - checks-azure
Approved by: Centril
Pushing ef54f57 to master...

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.

10 participants