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 12 pull requests #65075

Closed
wants to merge 38 commits into from
Closed

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Oct 3, 2019

Successful merges:

Failed merges:

r? @ghost

Stjepan Glavina and others added 30 commits June 16, 2019 01:24
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This removes the implicit dependency on the environment variables set
when running `./x.py test`
- The attribute is behind a feature gate.
- Error if both #[naked] and #[track_caller] are applied to the same function.
- Error if #[track_caller] is applied to a non-function item.
- Error if ABI is not "rust"
- Error if #[track_caller] is applied to a trait function.

Error codes and descriptions are pending.
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Update: review feedback
Update: placate tidy
…elf`

(Without this commit, you still get an error (a very similar one, at
that), but it complains about use of forward declaration, which is
confusing since people do not necessarily think of `Self` as being
declared at all.)

Update: incorporate review feedback.
Update: incorporate review feedback.
…oats

Stabilize todo macro

The `todo!` macro is just another name for `unimplemented!`.

Tracking issue: rust-lang#59277

This PR needs a FCP to merge.

r? @withoutboats
Deprecate `#![plugin]` & `#[plugin_registrar]`

This PR deprecates `#![plugin]` and `#[plugin_registrar]`.

~A removal deadline is set: 1.44.0. This will be in 9 months from now and should give everyone who is still relying on the feature ample time to rid themselves of this dependency.~

cc rust-lang#29597

r? @Mark-Simulacrum
proc_macro API: Expose `macro_rules` hygiene

Proc macros do not have direct access to our oldest and most stable hygiene kind - `macro_rules` hygiene.

To emulate it macro authors have to go through two steps - first generate a temporary `macro_rules` item (using a derive, at least until rust-lang#64035 is merged), then generate a macro call to that item. Popular crates like [proc_macro_hack](https://crates.io/crates/proc-macro-hack) use this trick to generate hygienic identifiers from proc macros.

I'd say that these workarounds with nested macro definitions have more chances to hit some corner cases in our hygiene system, in which we don't have full confidence.
So, let's provide a direct access to `macro_rules` hygiene instead.

This PR does that by adding a new method `Span::mixed_site` (bikeshedding is welcome) in addition to existing `Span::call_site` (stable) and `Span::def_site` (unstable).
Identifiers with this span resolve at def-site in for local variables, labels and `$crate`, and resolve at call-site for everything else, i.e. exactly like identifiers produced by `macro_rules`.

This API addition opens the way to stabilizing proc macros in expression positions (rust-lang#54727), for which use of call-site hygiene or workarounds with temporary items would be quite unfortunate.
(`macro_rules` expanded in expression position, on the other hand, are stable since 1.0 and widely used.)

r? @dtolnay @alexcrichton
…ure-doctests, r=QuietMisdreavus

Prevent rustdoc feature doctests

Part of rust-lang#61351

cc @ollie27
…pe-param-default, r=alexreg

Disallow Self in type param defaults of ADTs

Fix rust-lang#61631

(also includes a drive-by fix to a typo in some related diagnostic output.)
Replace mentions of IRC with Discord

Revival of rust-lang#61531

closes rust-lang#61524

what was the outcome of this? rust-lang#61531 (comment)

should this be changed in this PR as well? rust-lang#61531 (comment)
…ikomatsakis

Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr

This removes the implicit dependency on the environment variables set
when running `./x.py test`
`#[track_caller]` feature gate (RFC 2091)

RFC text: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md
Tracking issue: rust-lang#47809

I started with @ayosec's commit to add the feature gate with tests and rebased it onto current master. I fixed up some tidy lints and added a test.
…-E0556, r=petrochenkov

Add long error explanation for E0556

Part of rust-lang#61137
@tmandry
Copy link
Member Author

tmandry commented Oct 3, 2019

@bors r+ p=12 rollup=never

@bors
Copy link
Contributor

bors commented Oct 3, 2019

📌 Commit 5264e69 has been approved by tmandry

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

bors commented Oct 3, 2019

⌛ Testing commit 5264e69 with merge 726d97f9c4230d8372f85d6c50f0a6c16655041b...

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
2019-10-03T23:20:03.3540103Z [RUSTC-TIMING] tidy test:false 0.683
2019-10-03T23:20:03.3544447Z     Finished release [optimized] target(s) in 1m 29s
2019-10-03T23:20:03.3614356Z [TIMING] ToolBuild { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", tool: "tidy", path: "src/tools/tidy", mode: ToolBootstrap, is_optional_tool: false, source_type: InTree, extra_features: [] } -- 89.831
2019-10-03T23:20:03.3619812Z tidy check
2019-10-03T23:20:04.2472946Z tidy error: duplicate error code: 735
2019-10-03T23:20:04.2473986Z tidy error: /checkout/src/librustc_resolve/error_codes.rs:1709: E0735: r##"
2019-10-03T23:20:04.2474351Z tidy error: /checkout/src/librustc/error_codes.rs:2308:     E0735, // invalid track_caller application/syntax
2019-10-03T23:20:05.3348334Z some tidy checks failed
2019-10-03T23:20:05.3348509Z 
2019-10-03T23:20:05.3348509Z 
2019-10-03T23:20:05.3350334Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-10-03T23:20:05.3350566Z 
2019-10-03T23:20:05.3350602Z 
2019-10-03T23:20:05.3405063Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-10-03T23:20:05.3406145Z Build completed unsuccessfully in 0:01:33
2019-10-03T23:20:05.3406145Z Build completed unsuccessfully in 0:01:33
2019-10-03T23:20:05.3417289Z == clock drift check ==
2019-10-03T23:20:05.3457353Z   local time: Thu Oct  3 23:20:05 UTC 2019
2019-10-03T23:20:05.4289728Z   network time: Thu, 03 Oct 2019 23:20:05 GMT
2019-10-03T23:20:05.4296999Z == end clock drift check ==
2019-10-03T23:20:06.8508506Z ##[error]Bash exited with code '1'.
2019-10-03T23:20:06.8540403Z ##[section]Starting: Upload CPU usage statistics
2019-10-03T23:20:06.8544106Z ==============================================================================
2019-10-03T23:20:06.8544227Z Task         : Bash
2019-10-03T23:20:06.8544322Z Description  : Run a Bash script on macOS, Linux, or Windows

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 @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Oct 3, 2019

💔 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 Oct 3, 2019
@tmandry tmandry closed this Oct 3, 2019
@tmandry tmandry deleted the rollup-dlx6jvg branch October 3, 2019 23:26
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
2019-10-03T23:10:54.7568197Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-03T23:10:54.7775060Z ##[command]git config gc.auto 0
2019-10-03T23:10:54.7858069Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-03T23:10:54.7924593Z ##[command]git config --get-all http.proxy
2019-10-03T23:10:54.8085253Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/65075/merge:refs/remotes/pull/65075/merge
---
2019-10-03T23:18:09.8425559Z    Compiling serde_json v1.0.40
2019-10-03T23:18:11.7351466Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-10-03T23:18:23.2740593Z     Finished release [optimized] target(s) in 1m 31s
2019-10-03T23:18:23.2828991Z tidy check
2019-10-03T23:18:24.2127357Z tidy error: duplicate error code: 735
2019-10-03T23:18:24.2128383Z tidy error: /checkout/src/librustc_resolve/error_codes.rs:1709: E0735: r##"
2019-10-03T23:18:24.2128744Z tidy error: /checkout/src/librustc/error_codes.rs:2308:     E0735, // invalid track_caller application/syntax
2019-10-03T23:18:25.8339569Z some tidy checks failed
2019-10-03T23:18:25.8341003Z 
2019-10-03T23:18:25.8341003Z 
2019-10-03T23:18:25.8342070Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-10-03T23:18:25.8342497Z 
2019-10-03T23:18:25.8342626Z 
2019-10-03T23:18:25.8343483Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-10-03T23:18:25.8343969Z Build completed unsuccessfully in 0:01:34
2019-10-03T23:18:25.8343969Z Build completed unsuccessfully in 0:01:34
2019-10-03T23:18:25.8344101Z == clock drift check ==
2019-10-03T23:18:25.8344408Z   local time: Thu Oct  3 23:18:25 UTC 2019
2019-10-03T23:18:27.7654267Z   network time: Thu, 03 Oct 2019 23:18:27 GMT
2019-10-03T23:18:27.7655977Z == end clock drift check ==
2019-10-03T23:18:29.4061823Z ##[error]Bash exited with code '1'.
2019-10-03T23:18:29.4096315Z ##[section]Starting: Checkout
2019-10-03T23:18:29.4098590Z ==============================================================================
2019-10-03T23:18:29.4098651Z Task         : Get sources
2019-10-03T23:18:29.4098720Z 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 @TimNN. (Feature Requests)

@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
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.