diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index 5872440c36250..cc0548c0dffcd 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -266,7 +266,7 @@ macro_rules! late_lint_methods { macro_rules! expand_lint_pass_methods { ($context:ty, [$($(#[$attr:meta])* fn $name:ident($($param:ident: $arg:ty),*);)*]) => ( - $(#[inline(always)] fn $name(&mut self, $context, $(_: $arg),*) {})* + $(#[inline(always)] fn $name(&mut self, _: $context, $(_: $arg),*) {})* ) } diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 92a2ea2bf2d7e..6c32107c96e30 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -46,7 +46,6 @@ use syntax::tokenstream::{TokenTree, TokenStream}; use syntax::ast; use syntax::attr; use syntax::source_map::Spanned; -use syntax::edition::Edition; use syntax::feature_gate::{AttributeGate, AttributeType, Stability, deprecated_attributes}; use syntax_pos::{BytePos, Span, SyntaxContext}; use syntax::symbol::keywords; @@ -629,8 +628,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDebugImplementations { declare_lint! { pub ANONYMOUS_PARAMETERS, Allow, - "detects anonymous parameters", - Edition::Edition2018 => Warn + "detects anonymous parameters" } /// Checks for use of anonymous parameters (RFC 1685) diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 2dbaef30dfb73..05b11e3ba3a4c 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -277,7 +277,7 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) { FutureIncompatibleInfo { id: LintId::of(ANONYMOUS_PARAMETERS), reference: "issue #41686 ", - edition: None, + edition: Some(Edition::Edition2018), }, FutureIncompatibleInfo { id: LintId::of(PARENTHESIZED_PARAMS_IN_TYPES_AND_MODULES), diff --git a/src/libstd/sys/windows/backtrace/mod.rs b/src/libstd/sys/windows/backtrace/mod.rs index f64cae810b9ac..70de4a6f2b617 100644 --- a/src/libstd/sys/windows/backtrace/mod.rs +++ b/src/libstd/sys/windows/backtrace/mod.rs @@ -152,7 +152,14 @@ type StackWalk64Fn = unsafe extern "system" fn( trait StackWalker { type Item: StackFrame; - fn walk(&self, c::DWORD, c::HANDLE, c::HANDLE, &mut Self::Item, &mut c::CONTEXT) -> c::BOOL; + fn walk( + &self, + _: c::DWORD, + _: c::HANDLE, + _: c::HANDLE, + _: &mut Self::Item, + _: &mut c::CONTEXT + ) -> c::BOOL; } impl StackWalker for StackWalkExFn { diff --git a/src/test/ui/anon-params-deprecated.stderr b/src/test/ui/anon-params-deprecated.stderr index e1c27ceefa9e0..691c3159a5261 100644 --- a/src/test/ui/anon-params-deprecated.stderr +++ b/src/test/ui/anon-params-deprecated.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(anonymous_parameters)] | ^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #41686 warning: anonymous parameters are deprecated and will be removed in the next edition. @@ -18,7 +18,7 @@ warning: anonymous parameters are deprecated and will be removed in the next edi LL | fn bar_with_default_impl(String, String) {} | ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #41686 warning: anonymous parameters are deprecated and will be removed in the next edition. @@ -27,6 +27,6 @@ warning: anonymous parameters are deprecated and will be removed in the next edi LL | fn bar_with_default_impl(String, String) {} | ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #41686 diff --git a/src/test/ui/chalkify/lower_trait.rs b/src/test/ui/chalkify/lower_trait.rs index 7c0f233a645cb..c5ba5beeca7a5 100644 --- a/src/test/ui/chalkify/lower_trait.rs +++ b/src/test/ui/chalkify/lower_trait.rs @@ -12,9 +12,9 @@ #[rustc_dump_program_clauses] //~ ERROR program clause dump trait Foo { - fn s(S) -> S; - fn t(T) -> T; - fn u(U) -> U; + fn s(_: S) -> S; + fn t(_: T) -> T; + fn u(_: U) -> U; } fn main() { diff --git a/src/test/ui/chalkify/lower_trait_higher_rank.rs b/src/test/ui/chalkify/lower_trait_higher_rank.rs index 47e9398d3647e..7fc48cfd56ddc 100644 --- a/src/test/ui/chalkify/lower_trait_higher_rank.rs +++ b/src/test/ui/chalkify/lower_trait_higher_rank.rs @@ -13,7 +13,7 @@ #[rustc_dump_program_clauses] //~ ERROR program clause dump trait Foo where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8 { - fn s(F) -> F; + fn s(_: F) -> F; } fn main() { diff --git a/src/test/ui/chalkify/lower_trait_where_clause.rs b/src/test/ui/chalkify/lower_trait_where_clause.rs index 67ee7c28b6a4e..57e95e39cd996 100644 --- a/src/test/ui/chalkify/lower_trait_where_clause.rs +++ b/src/test/ui/chalkify/lower_trait_where_clause.rs @@ -15,9 +15,9 @@ use std::borrow::Borrow; #[rustc_dump_program_clauses] //~ ERROR program clause dump trait Foo<'a, 'b, S, T, U> where S: Debug, T: Borrow, U: ?Sized, 'a: 'b, U: 'b { - fn s(S) -> S; - fn t(T) -> T; - fn u(U) -> U; + fn s(_: S) -> S; + fn t(_: T) -> T; + fn u(_: U) -> U; } fn main() { diff --git a/src/test/ui/future-incompatible-lint-group.stderr b/src/test/ui/future-incompatible-lint-group.stderr index 56f4ff33eb2d8..c239131ee1685 100644 --- a/src/test/ui/future-incompatible-lint-group.stderr +++ b/src/test/ui/future-incompatible-lint-group.stderr @@ -10,7 +10,7 @@ note: lint level defined here LL | #![deny(future_incompatible)] | ^^^^^^^^^^^^^^^^^^^ = note: #[deny(anonymous_parameters)] implied by #[deny(future_incompatible)] - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #41686 error: aborting due to previous error diff --git a/src/test/ui/impl-trait/where-allowed.rs b/src/test/ui/impl-trait/where-allowed.rs index 2891cd59e3e1f..69f6d202f14ad 100644 --- a/src/test/ui/impl-trait/where-allowed.rs +++ b/src/test/ui/impl-trait/where-allowed.rs @@ -125,7 +125,7 @@ trait InTraitDefnReturn { // Allowed and disallowed in trait impls trait DummyTrait { type Out; - fn in_trait_impl_parameter(impl Debug); + fn in_trait_impl_parameter(_: impl Debug); fn in_trait_impl_return() -> Self::Out; } impl DummyTrait for () {