8000 Rollup of 12 pull requests by tmandry · Pull Request #65075 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 12 pull requests #65075

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

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8e3b9d2
Stabilize todo macro
Jun 15, 2019
560bf1b
Update src/libcore/macros.rs
Sep 4, 2019
711f673
Update macros.rs
Sep 4, 2019
445e735
Prevent rustdoc feature to be passed down to doctests
GuillaumeGomez Sep 25, 2019
366fdeb
Add new rustdoc-ui test to ensuire that rustdoc feature isn't passed …
GuillaumeGomez Sep 30, 2019
2ab7a67
Replace mentions of IRC with Discord
Oct 2, 2019
a336536
Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr
Aaron1011 Oct 2, 2019
a8b2fe0
[RFC 2091] Add #[track_caller] attribute.
ayosec Jul 20, 2019
a8d70d1
Add visit_projection_elem method to visitors
spastorino Oct 2, 2019
e9deff0
track_caller run-pass test, lint cleanup, PR review.
anp Oct 3, 2019
1e78d99
track_caller feature gate starts in 1.40.0.
anp Oct 3, 2019
287ceed
Deprecate `#![plugin]` and `#[plugin_registrar]`.
Centril Sep 21, 2019
1b8ec97
plugin_registrary: use normal deprecation instead of hard coded warning.
Centril Oct 3, 2019
da86007
Mark #![feature(track_caller)] as incomplete.
anp Oct 3, 2019
8ac9104
track_caller error numbers and text.
anp Oct 3, 2019
9e301d1
track_caller tests account for incomplete feature warning.
anp Oct 3, 2019
d1f95ef
--bless ui-fulldeps tests
Centril Oct 3, 2019
d1310dc
proc_macro: Add `Span::mixed_site` exposing `macro_rules` hygiene
petrochenkov Sep 22, 2019
4396a1c
add regression test for #60218
nikomatsakis Sep 20, 2019
3a4921c
The crux of the bug fix.
pnkfelix Sep 27, 2019
a18d424
Allocate a new diagnostic for defaulted type parameters cannot use `S…
pnkfelix Sep 27, 2019
e86af1b
Add long error explanation for E0556
GuillaumeGomez Oct 3, 2019
1d49f9a
update ui tests
GuillaumeGomez Oct 3, 2019
126bf3b
typo: fix typo in E0392
mathstuf Oct 3, 2019
b9ed642
Make visit_projection iterative
spastorino Oct 2, 2019
e443e1b
Regression tests.
pnkfelix Sep 27, 2019
2d5f4df
Rollup merge of #61879 - stjepang:stabilize-todo, r=withoutboats
tmandry Oct 3, 2019
ae41bcd
Rollup merge of #64675 - Centril:deprecate-plugin, r=oli-obk
tmandry Oct 3, 2019
a647b74
Rollup merge of #64690 - petrochenkov:mixed, r=dtolnay
tmandry Oct 3, 2019
b6d8169
Rollup merge of #64706 - nikomatsakis:issue-60218-test-case, r=centril
tmandry Oct 3, 2019
cd0028e
Rollup merge of #64741 - GuillaumeGomez:prevent-rustdoc-feature-docte…
tmandry Oct 3, 2019
4cc2872
Rollup merge of #64842 - pnkfelix:fix-issue-61631-self-in-type-param-…
tmandry Oct 3, 2019
51dd307
Rollup merge of #65004 - BO41:mentions, r=alexcrichton
tmandry Oct 3, 2019
772f689
Rollup merge of #65018 - Aaron1011:fix/backtrace-stderr, r=nikomatsakis
tmandry Oct 3, 2019
6d6a3fb
Rollup merge of #65037 - anp:track-caller, r=oli-obk
tmandry Oct 3, 2019
c086b9f
Rollup merge of #65055 - GuillaumeGomez:long-err-explanation-E0556, r…
tmandry Oct 3, 2019
a9244f7
Rollup merge of #65056 - spastorino:place-mut-visitor-adjusts, r=oli-obk
tmandry Oct 3, 2019
5264e69
Rollup merge of #65057 - mathstuf:fix-warning-typo, r=Centril
tmandry Oct 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Deprecate #![plugin] and #[plugin_registrar].
  • Loading branch information
Centril committed Oct 3, 2019
commit 287ceed469e11214ff2650f0aea94e94711aa401
11 changes: 8 additions & 3 deletions src/libsyntax/feature_gate/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,14 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[

// Plugins:
ungated!(plugin_registrar, Normal, template!(Word)),
gated!(
plugin, CrateLevel, template!(List: "name|name(args)"),
"compiler plugins are experimental and possibly buggy",
(
sym::plugin, CrateLevel, template!(List: "name|name(args)"),
Gated(
Stability::Deprecated("https://github.com/rust-lang/rust/issues/29597", None),
sym::plugin,
"compiler plugins are deprecated and will be removed in 1.44.0",
cfg_fn!(plugin)
)
),

// Testing:
Expand Down
4 changes: 4 additions & 0 deletions src/libsyntax/feature_gate/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
if attr::contains_name(&i.attrs[..], sym::plugin_registrar) {
gate_feature_post!(&self, plugin_registrar, i.span,
"compiler plugins are experimental and possibly buggy");
self.parse_sess.span_diagnostic.span_warn(
i.span,
"`#[plugin_registrar]` is deprecated and will be removed in 1.44.0",
);
}
if attr::contains_name(&i.attrs[..], sym::start) {
gate_feature_post!(&self, start, i.span,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl MetadataLoader for NoLlvmMetadataLoader {
struct TheBackend;

impl CodegenBackend for TheBackend {
fn metadata_loader(&self) -> Box<MetadataLoader + Sync> {
fn metadata_loader(&self) -> Box<dyn MetadataLoader + Sync> {
Box::new(NoLlvmMetadataLoader)
}

Expand All @@ -64,15 +64,15 @@ impl CodegenBackend for TheBackend {
tcx: TyCtxt<'tcx>,
_metadata: EncodedMetadata,
_need_metadata_module: bool,
) -> Box<Any> {
) -> Box<dyn Any> {
use rustc::hir::def_id::LOCAL_CRATE;

Box::new(tcx.crate_name(LOCAL_CRATE) as Symbol)
}

fn join_codegen_and_link(
&self,
ongoing_codegen: Box<Any>,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
_dep_graph: &DepGraph,
outputs: &OutputFilenames,
Expand All @@ -97,6 +97,6 @@ impl CodegenBackend for TheBackend {

/// This is the entrypoint for a hot plugged rustc_codegen_llvm
#[no_mangle]
pub fn __rustc_codegen_backend() -> Box<CodegenBackend> {
pub fn __rustc_codegen_backend() -> Box<dyn CodegenBackend> {
Box::new(TheBackend)
}
4 changes: 3 additions & 1 deletion src/test/ui-fulldeps/gated-plugin.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// ignore-tidy-linelength
// aux-build:attr-plugin-test.rs

#![plugin(attr_plugin_test)]
//~^ ERROR compiler plugins are experimental and possibly buggy
//~^ ERROR compiler plugins are deprecated and will be removed in 1.44.0
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0

fn main() {}
12 changes: 10 additions & 2 deletions src/test/ui-fulldeps/gated-plugin.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
error[E0658]: compiler plugins are experimental and possibly buggy
--> $DIR/gated-plugin.rs:3:1
error[E0658]: compiler plugins are deprecated and will be removed in 1.44.0
--> $DIR/gated-plugin.rs:4:1
|
LL | #![plugin(attr_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29597
= help: add `#![feature(plugin)]` to the crate attributes to enable

warning: use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/gated-plugin.rs:4:1
|
LL | #![plugin(attr_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
1 change: 1 addition & 0 deletions src/test/ui-fulldeps/macro-crate-rlib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
#![feature(plugin)]
#![plugin(rlib_crate_test)]
//~^ ERROR: plugin `rlib_crate_test` only found in rlib format, but must be available in dylib format
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0

fn main() {}
8 changes: 8 additions & 0 deletions src/test/ui-fulldeps/macro-crate-rlib.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ error[E0457]: plugin `rlib_crate_test` only found in rlib format, but must be av
LL | #![plugin(rlib_crate_test)]
| ^^^^^^^^^^^^^^^

warning: use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/macro-crate-rlib.rs:6:1
|
LL | #![plugin(rlib_crate_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

error: aborting due to previous error

3 changes: 2 additions & 1 deletion src/test/ui/feature-gates/feature-gate-plugin.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Test that `#![plugin(...)]` attribute is gated by `plugin` feature gate

#![plugin(foo)]
//~^ ERROR compiler plugins are experimental and possibly buggy
//~^ ERROR compiler plugins are deprecated and will be removed in 1.44.0
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated

fn main() {}
10 changes: 9 additions & 1 deletion src/test/ui/feature-gates/feature-gate-plugin.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: compiler plugins are experimental and possibly buggy
error[E0658]: compiler plugins are deprecated and will be removed in 1.44.0
--> $DIR/feature-gate-plugin.rs:3:1
|
LL | #![plugin(foo)]
Expand All @@ -7,6 +7,14 @@ LL | #![plugin(foo)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29597
= help: add `#![feature(plugin)]` to the crate attributes to enable

warning: use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/feature-gate-plugin.rs:3:1
|
LL | #![plugin(foo)]
| ^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
2 changes: 2 additions & 0 deletions src/test/ui/feature-gates/feature-gate-plugin_registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
#[plugin_registrar]
pub fn registrar() {}
//~^ ERROR compiler plugins are experimental
//~| WARN `#[plugin_registrar]` is deprecated and will be removed in 1.44.0

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ LL | pub fn registrar() {}
= note: for more information, see https://github.com/rust-lang/rust/issues/29597
= help: add `#![feature(plugin_registrar)]` to the crate attributes to enable

warning: `#[plugin_registrar]` is deprecated and will be removed in 1.44.0
--> $DIR/feature-gate-plugin_registrar.rs:6:1
|
LL | pub fn registrar() {}
| ^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
3 changes: 3 additions & 0 deletions src/test/ui/invalid/invalid-plugin-attr.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// ignore-tidy-linelength

#![deny(unused_attributes)]
#![feature(plugin)]

#[plugin(bla)] //~ ERROR unused attribute
//~^ ERROR should be an inner attribute
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0

fn main() {}
14 changes: 11 additions & 3 deletions src/test/ui/invalid/invalid-plugin-attr.stderr
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/invalid-plugin-attr.rs:6:1
|
LL | #[plugin(bla)]
| ^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

error: unused attribute
--> $DIR/invalid-plugin-attr.rs:4:1
--> $DIR/invalid-plugin-attr.rs:6:1
|
LL | #[plugin(bla)]
| ^^^^^^^^^^^^^^
|
note: lint level defined here
--> $DIR/invalid-plugin-attr.rs:1:9
--> $DIR/invalid-plugin-attr.rs:3:9
|
LL | #![deny(unused_attributes)]
| ^^^^^^^^^^^^^^^^^

error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
--> $DIR/invalid-plugin-attr.rs:4:1
--> $DIR/invalid-plugin-attr.rs:6:1
|
LL | #[plugin(bla)]
| ^^^^^^^^^^^^^^
Expand Down
3 changes: 3 additions & 0 deletions src/test/ui/malformed/malformed-plugin-1.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-tidy-linelength

#![feature(plugin)]
#![plugin] //~ ERROR malformed `plugin` attribute
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0

fn main() {}
10 changes: 9 additions & 1 deletion src/test/ui/malformed/malformed-plugin-1.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
error: malformed `plugin` attribute input
--> $DIR/malformed-plugin-1.rs:2:1
--> $DIR/malformed-plugin-1.rs:4:1
|
LL | #![plugin]
| ^^^^^^^^^^ help: must be of the form: `#[plugin(name|name(args))]`

warning: use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/malformed-plugin-1.rs:4:1
|
LL | #![plugin]
| ^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

error: aborting due to previous error

3 changes: 3 additions & 0 deletions src/test/ui/malformed/malformed-plugin-2.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-tidy-linelength

#![feature(plugin)]
#![plugin="bleh"] //~ ERROR malformed `plugin` attribute
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0

fn main() {}
10 changes: 9 additions & 1 deletion src/test/ui/malformed/malformed-plugin-2.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
error: malformed `plugin` attribute input
--> $DIR/malformed-plugin-2.rs:2:1
--> $DIR/malformed-plugin-2.rs:4:1
|
LL | #![plugin="bleh"]
| ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[plugin(name|name(args))]`

warning: use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/malformed-plugin-2.rs:4:1
|
LL | #![plugin="bleh"]
| ^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

error: aborting due to previous error

3 changes: 3 additions & 0 deletions src/test/ui/malformed/malformed-plugin-3.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore-tidy-linelength

#![feature(plugin)]
#![plugin(foo="bleh")] //~ ERROR malformed `plugin` attribute
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0

fn main() {}
10 changes: 9 additions & 1 deletion src/test/ui/malformed/malformed-plugin-3.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
error[E0498]: malformed `plugin` attribute
--> $DIR/malformed-plugin-3.rs:2:1
--> $DIR/malformed-plugin-3.rs:4:1
|
LL | #![plugin(foo="bleh")]
| ^^^^^^^^^^^^^^^^^^^^^^ malformed attribute

warning: use of deprecated attribute `plugin`: compiler plugins are deprecated and will be removed in 1.44.0. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/malformed-plugin-3.rs:4:1
|
LL | #![plugin(foo="bleh")]
| ^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

error: aborting due to previous error

12 changes: 12 additions & 0 deletions src/test/ui/multiple-plugin-registrars.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
warning: `#[plugin_registrar]` is deprecated and will be removed in 1.44.0
--> $DIR/multiple-plugin-registrars.rs:7:1
|
LL | pub fn one() {}
| ^^^^^^^^^^^^^^^

warning: `#[plugin_registrar]` is deprecated and will be removed in 1.44.0
--> $DIR/multiple-plugin-registrars.rs:10:1
|
LL | pub fn two() {}
| ^^^^^^^^^^^^^^^

error: multiple plugin registration functions found
|
note: one is here
Expand Down
0