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 7 pull requests #69845

Closed
wants to merge 39 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 9, 2020

Successful merges:

Failed merges:

r? @ghost

12101111 and others added 30 commits March 3, 2020 16:17
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 {}
```
Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
Additionally whenever possible match C API provided by the LLVM.
tmiasko and others added 9 commits March 9, 2020 02:05
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 {}
```

Closes rust-lang#68618
…nison

Extend search

I realized that when looking for "struct:String" in the rustdoc search for example, the "in arguments" and "returned" tabs were always empty. After some investigation, I realized it was because we only provided the name, and not the type, making it impossible to pass the "type filtering" check.

To resolve this, I added the type alongside the name. Note for the future: we could improve this by instead only registering the path id and use the path dictionary directly. The only problem with that solution (which I already tested) is that it becomes complicated for types in other crates. It'd force us to handle both case with an id and a case with `(name, type)`. I found the current PR big enough to not want to provide it directly. However, I think this is definitely worth it to make it work this way in the future.

About the two tests I added: they don't have much interest except checking that we actually have something returned in the search in the cases of a type filtering with and without literal search.

I also had to update a bit the test script to add the new locally global (haha) variable I created (`NO_TYPE_FILTER`). I added this variable to make the code easier to read than just "-1".

r? @kinnison

cc @ollie27
…=nagisa,smaeul

 Don't use static crt by default when build proc-macro

Don't check value of `crt-static` when build proc-macro crates, since they are always built dynamically.
For more information, see rust-lang/cargo#7563 (comment)
I hope this will fix issues about compiling `proc_macro` crates on musl host without bring more issues.
Note: I can't test this on my musl host locally, because I encounter this issue when bootstraping from a beta snapshot.
Fix rust-lang/cargo#7563
unix: 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.

Fixes rust-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.
@Centril Centril added the rollup A PR which is a rollup label Mar 9, 2020
@Centril
Copy link
Contributor Author

Centril commented Mar 9, 2020

@bors r+ p=1001 rollup=never

@bors
Copy link
Contributor

bors commented Mar 9, 2020

📌 Commit 51ff921 has been approved by Centril

@bors
Copy link
Contributor

bors commented Mar 9, 2020

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@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 Mar 9, 2020
@bors
Copy link
Contributor

bors commented Mar 9, 2020

⌛ Testing commit 51ff921 with merge 88f2f3404d680c3245c029538403cf7129ef3317...

@rust-highfive
Copy link
Collaborator

The job x86_64-apple of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-09T07:34:22.0636300Z test [ui] ui/hygiene/stdlib-prelude-from-opaque-early.rs ... ok
2020-03-09T07:34:22.1099820Z test [ui] ui/hygiene/specialization.rs ... ok
2020-03-09T07:34:22.1107080Z test [ui] ui/hygiene/trait_items.rs ... ok
2020-03-09T07:34:22.1108210Z test [ui] ui/hygiene/unpretty-debug.rs ... ok
2020-03-09T07:34:22.1744160Z test [ui] ui/if-attrs/bad-cfg.rs ... ok
2020-03-09T07:34:22.2832960Z test [ui] ui/if-attrs/builtin-if-attr.rs ... ok
2020-03-09T07:34:22.2931390Z test [ui] ui/hygiene/transparent-basic.rs ... ok
2020-03-09T07:34:22.3514900Z test [ui] ui/if-attrs/else-attrs.rs ... ok
2020-03-09T07:34:22.3616940Z test [ui] ui/if-attrs/cfg-false-if-attr.rs ... ok
2020-03-09T07:34:22.4320240Z test [ui] ui/if-attrs/let-chains-attr.rs ... ok
2020-03-09T07:34:22.5092890Z test [ui] ui/if-attrs/stmt-expr-gated.rs ... ok
2020-03-09T07:34:22.5674320Z test [ui] ui/hygiene/wrap_unhygienic_example.rs ... ok
2020-03-09T07:34:22.7366140Z test [ui] ui/if-attrs/gate-whole-expr.rs ... ok
2020-03-09T07:34:22.9064570Z test [ui] ui/if-bot.rs ... ok
2020-03-09T07:34:22.9267790Z test [ui] ui/if-else-type-mismatch.rs ... ok
2020-03-09T07:34:22.9983540Z test [ui] ui/if-check.rs ... ok
2020-03-09T07:34:23.0178210Z test [ui] ui/if/if-branch-types.rs ... ok
---
2020-03-09T07:39:47.7668740Z test [ui] ui/sanitize/memory.rs ... ignored
2020-03-09T07:39:49.1406000Z test [ui] ui/sanitize/address.rs ... ok
2020-03-09T07:39:49.2306460Z test [ui] ui/sanitize/leak.rs ... ok
2020-03-09T07:39:49.2700860Z test [ui] ui/sanitize/unsupported-target.rs ... ok
2020-03-09T07:39:49.3191680Z test [ui] ui/sanitize/badfree.rs ... ok
2020-03-09T07:39:49.5304390Z test [ui] ui/save-analysis/issue-59134-0.rs ... ok
2020-03-09T07:39:49.6208140Z test [ui] ui/save-analysis/issue-59134-1.rs ... ok
2020-03-09T07:39:49.7236290Z test [ui] ui/save-analysis/issue-63663.rs ... ok
2020-03-09T07:39:49.8065960Z test [ui] ui/save-analysis/issue-64659.rs ... ok
---
2020-03-09T07:42:04.2880550Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-09T07:42:04.2881140Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-09T07:42:04.2897120Z 
2020-03-09T07:42:04.2897400Z 
2020-03-09T07:42:04.2903790Z command did not execute successfully: "/Users/runner/runners/2.165.0/work/1/s/build/x86_64-apple-darwin/stage0-tools-bin/compiletest" "--compile-lib-path" "/Users/runner/runners/2.165.0/work/1/s/build/x86_64-apple-darwin/stage2/lib" "--run-lib-path" "/Users/runner/runners/2.165.0/work/1/s/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "--rustc-path" "/Users/runner/runners/2.165.0/work/1/s/build/x86_64-apple-darwin/stage2/bin/rustc" "--src-base" "/Users/runner/runners/2.165.0/work/1/s/src/test/ui" "--build-base" "/Users/runner/runners/2.165.0/work/1/s/build/x86_64-apple-darwin/test/ui" "--stage-id" "stage2-x86_64-apple-darwin" "--mode" "ui" "--target" "x86_64-apple-darwin" "--host" "x86_64-apple-darwin" "--llvm-filecheck" "/Users/runner/runners/2.165.0/work/1/s/build/x86_64-apple-darwin/llvm/build/bin/FileCheck" "--nodejs" "/usr/local/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/Users/runner/runners/2.165.0/work/1/s/build/x86_64-apple-darwin/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/Users/runner/runners/2.165.0/work/1/s/build/x86_64-apple-darwin/native/rust-test-helpers" "--docck-python" "/usr/local/bin/python2.7" "--lldb-python" "/usr/bin/python3" "--lldb-version" "lldb-1100.0.30.12\nApple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)\n" "--lldb-python-dir" "/Applications/Xcode_11.3.1.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python3" "--llvm-version" "9.0.1-rust-1.43.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-09T07:42:04.2908160Z 
2020-03-09T07:42:04.2908280Z 
2020-03-09T07:42:04.2911440Z failed to run: /Users/runner/runners/2.165.0/work/1/s/build/bootstrap/debug/bootstrap test
2020-03-09T07:42:04.2911910Z Build completed unsuccessfully in 0:53:56
2020-03-09T07:42:04.2911910Z Build completed unsuccessfully in 0:53:56
2020-03-09T07:42:04.2961630Z == clock drift check ==
2020-03-09T07:42:04.3021040Z   local time: Mon Mar  9 07:42:04 UTC 2020
2020-03-09T07:42:04.3758220Z   network time: Mon, 09 Mar 2020 07:42:04 GMT
2020-03-09T07:42:04.3759850Z == end clock drift check ==
2020-03-09T07:42:04.3801130Z 
2020-03-09T07:42:04.3874490Z ##[error]Bash exited with code '1'.
2020-03-09T07:42:04.3953180Z ##[section]Starting: Checkout rust-lang/rust@auto to s
2020-03-09T07:42:04.3959680Z ==============================================================================
2020-03-09T07:42:04.3960070Z Task         : Get sources
2020-03-09T07:42:04.3960500Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@bors
Copy link
Contributor

bors commented Mar 9, 2020

💔 Test failed - checks-azure

@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 Mar 9, 2020
@Centril Centril mentioned this pull request Mar 9, 2020
@Centril Centril closed this Mar 9, 2020
@Centril Centril deleted the rollup-2ytrff9 branch March 9, 2020 07:44
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.

9 participants