From 8b2bf1d8c62d7e152a7c22d18e1ab2ce1ad9e8c5 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Mon, 1 Apr 2019 21:12:44 +0200 Subject: [PATCH 1/6] minimum-lint-levels: Introduce basics. - Define a declare_unsuppressable_lint! macro - Provide guidelines for it and C-future-compatibility lints more generally. --- src/librustc/lint/levels.rs | 32 +++++--- src/librustc/lint/mod.rs | 154 +++++++++++++++++++++++++----------- src/librustc_lint/lib.rs | 20 ++++- 3 files changed, 148 insertions(+), 58 deletions(-) diff --git a/src/librustc/lint/levels.rs b/src/librustc/lint/levels.rs index 2e5bd8add0cdc..c32d748931523 100644 --- a/src/librustc/lint/levels.rs +++ b/src/librustc/lint/levels.rs @@ -67,7 +67,7 @@ impl LintLevelSets { Err(_) => continue, // errors handled in check_lint_name_cmdline above }; for id in ids { - let src = LintSource::CommandLine(lint_flag_val); + let src = LintSource::CommandLine(lint_flag_val, None); specs.insert(id, (level, src)); } } @@ -90,18 +90,28 @@ impl LintLevelSets { // lint. let mut level = level.unwrap_or_else(|| lint.default_level(sess)); + // Ensure we don't go below the minimum level of the lint. + // Note that we allow `--cap-lints` to cap `WARNINGS`, + // but we will never allow `--cap-lints` to cap the lint itself. + let warn_level = cmp::max(level, lint.min_level); + // If we're about to issue a warning, check at the last minute for any // directives against the warnings "lint". If, for example, there's an // `allow(warnings)` in scope then we want to respect that instead. - if level == Level::Warn { + if warn_level == Level::Warn { let (warnings_level, warnings_src) = self.get_lint_id_level(LintId::of(lint::builtin::WARNINGS), idx, aux); if let Some(configured_warning_level) = warnings_level { if configured_warning_level != Level::Warn { + let orig_level = Some(level); level = configured_warning_level; - src = warnings_src; + src = match warnings_src { + LintSource::CommandLine(s, _) => LintSource::CommandLine(s, orig_level), + LintSource::Node(n, _, s, r) => LintSource::Node(n, orig_level, s, r), + other => other, + }; } } } @@ -290,7 +300,7 @@ impl<'a> LintLevelsBuilder<'a> { let name = meta_item.path.segments.last().expect("empty lint name").ident.name; match store.check_lint_name(&name.as_str(), tool_name) { CheckLintNameResult::Ok(ids) => { - let src = LintSource::Node(name, li.span(), reason); + let src = LintSource::Node(name, None, li.span(), reason); for id in ids { specs.insert(*id, (level, src)); } @@ -301,7 +311,7 @@ impl<'a> LintLevelsBuilder<'a> { Ok(ids) => { let complete_name = &format!("{}::{}", tool_name.unwrap(), name); let src = LintSource::Node( - Symbol::intern(complete_name), li.span(), reason + Symbol::intern(complete_name), None, li.span(), reason ); for id in ids { specs.insert(*id, (level, src)); @@ -334,7 +344,7 @@ impl<'a> LintLevelsBuilder<'a> { ).emit(); let src = LintSource::Node( - Symbol::intern(&new_lint_name), li.span(), reason + Symbol::intern(&new_lint_name), None, li.span(), reason ); for id in ids { specs.insert(*id, (level, src)); @@ -412,11 +422,11 @@ impl<'a> LintLevelsBuilder<'a> { }; let forbidden_lint_name = match forbid_src { LintSource::Default => id.to_string(), - LintSource::Node(name, _, _) => name.to_string(), - LintSource::CommandLine(name) => name.to_string(), + LintSource::Node(name, _, _, _) => name.to_string(), + LintSource::CommandLine(name, _) => name.to_string(), }; let (lint_attr_name, lint_attr_span) = match *src { - LintSource::Node(name, span, _) => (name, span), + LintSource::Node(name, _, span, _) => (name, span), _ => continue, }; let mut diag_builder = struct_span_err!(self.sess, @@ -429,14 +439,14 @@ impl<'a> LintLevelsBuilder<'a> { diag_builder.span_label(lint_attr_span, "overruled by previous forbid"); match forbid_src { LintSource::Default => {}, - LintSource::Node(_, forbid_source_span, reason) => { + LintSource::Node(_, _, forbid_source_span, reason) => { diag_builder.span_label(forbid_source_span, "`forbid` level set here"); if let Some(rationale) = reason { diag_builder.note(&rationale.as_str()); } }, - LintSource::CommandLine(_) => { + LintSource::CommandLine(_, _) => { diag_builder.note("`forbid` lint level was set on command line"); } } diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index 5ebb915d57f54..9f51416d7759a 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -33,7 +33,7 @@ use crate::ty::TyCtxt; use crate::ty::query::Providers; use crate::util::nodemap::NodeMap; use errors::{DiagnosticBuilder, DiagnosticId}; -use std::{hash, ptr}; +use std::{hash, ptr, cmp}; use syntax::ast; use syntax::source_map::{MultiSpan, ExpnFormat}; use syntax::early_buffered_lints::BufferedEarlyLintId; @@ -63,6 +63,11 @@ pub struct Lint { /// Default level for the lint. pub default_level: Level, + /// The minimum level this lint can be loosened to. + /// For example, suppose we have `#[allow(my_lint)]` and `min_level == Warn`. + /// In that case, a warning will still be emitted. + pub min_level: Level, + /// Description of the lint or the issue it detects. /// /// e.g., "imports that are never used" @@ -112,6 +117,7 @@ macro_rules! declare_lint { $vis static $NAME: &$crate::lint::Lint = &$crate::lint::Lint { name: stringify!($NAME), default_level: $crate::lint::$Level, + min_level: $crate::lint::Allow, desc: $desc, edition_lint_opts: None, report_in_external_macro: $external, @@ -123,6 +129,7 @@ macro_rules! declare_lint { $vis static $NAME: &$crate::lint::Lint = &$crate::lint::Lint { name: stringify!($NAME), default_level: $crate::lint::$Level, + min_level: $crate::lint::Allow, desc: $desc, edition_lint_opts: Some(($lint_edition, $crate::lint::Level::$edition_level)), report_in_external_macro: false, @@ -130,6 +137,35 @@ macro_rules! declare_lint { ); } +/// Declares a static item of type `&'static Lint` that is unsuppressable. +/// +/// This means that the lint will have `Warn` as the minimum lint level. +/// Therefore, it cannot be `#[allow(..)]`ed. +/// +/// This lint should be used for C-future-compatibility lints on an opt-in +/// case-by-case basis. +/// +/// Note that the default is to use `declare_lint!`. It is recommended that +/// a lint spend at least one release cycle using `declare_lint!` before +/// moving to `declare_unsuppressable_lint!`. +/// +/// Before moving the C-future-compatibility lint into a hard error, +/// it is also recommended that `declare_unsuppressable_lint!` be used +/// at least one release cycle. +#[macro_export] +macro_rules! declare_unsuppressable_lint { + ($vis: vis $NAME: ident, $Level: ident, $desc: expr) => { + $vis static $NAME: &$crate::lint::Lint = &$crate::lint::Lint { + name: stringify!($NAME), + default_level: $crate::lint::$Level, + min_level: $crate::lint::Warn, + desc: $desc, + edition_lint_opts: None, + report_in_external_macro: false, + }; + }; +} + #[macro_export] macro_rules! declare_tool_lint { ( @@ -151,6 +187,7 @@ macro_rules! declare_tool_lint { $vis static $NAME: &$crate::lint::Lint = &$crate::lint::Lint { name: &concat!(stringify!($tool), "::", stringify!($NAME)), default_level: $crate::lint::$Level, + min_level: $crate::lint::Allow, desc: $desc, edition_lint_opts: None, report_in_external_macro: $external, @@ -570,6 +607,15 @@ impl Level { _ => None, } } + + fn level_to_flag(self) -> &'static str { + match self { + Level::Warn => "-W", + Level::Deny => "-D", + Level::Forbid => "-F", + Level::Allow => "-A", + } + } } /// How a lint level was set. @@ -580,16 +626,22 @@ pub enum LintSource { Default, /// Lint level was set by an attribute. - Node(ast::Name, Span, Option /* RFC 2383 reason */), + /// + /// `Some(level)`, represents the original lint level which was altered by + /// by `#[(warnings)]`. + Node(ast::Name, Option, Span, Option /* RFC 2383 reason */), /// Lint level was set by a command-line flag. - CommandLine(Symbol), + /// + /// `Some(level)`, represents the original lint level which was altered by + /// by `#[(warnings)]`. + CommandLine(Symbol, Option), } impl_stable_hash_for!(enum self::LintSource { Default, - Node(name, span, reason), - CommandLine(text) + Node(name, original_level, span, reason), + CommandLine(text, original_level) }); pub type LevelSource = (Level, LintSource); @@ -636,14 +688,25 @@ impl LintBuffer { } } +fn hyphenate(s: &str) -> String { + s.replace("_", "-") +} + pub fn struct_lint_level<'a>(sess: &'a Session, lint: &'static Lint, - level: Level, + orig_level: Level, src: LintSource, span: Option, msg: &str) -> DiagnosticBuilder<'a> { + // Pick the highest level of the given one and the minimum. + // The effect of this is that if e.g. `min_level == Warn` and + // you have `#[allow({lint.name})]` then a warning will still + // be emitted. + let min_level = lint.min_level; + let level = cmp::max(orig_level, min_level); + let mut err = match (level, span) { (Level::Allow, _) => return sess.diagnostic().struct_dummy(), (Level::Warn, Some(span)) => sess.struct_span_warn(span, msg), @@ -655,50 +718,54 @@ pub fn struct_lint_level<'a>(sess: &'a Session, }; let name = lint.name_lower(); - match src { + let diag_msg_id = DiagnosticMessageId::from(lint); + + let pre_warn_level = match src { LintSource::Default => { - sess.diag_note_once( - &mut err, - DiagnosticMessageId::from(lint), - &format!("#[{}({})] on by default", level.as_str(), name)); + let msg = &format!("#[{}({})] on by default", orig_level.as_str(), name); + sess.diag_note_once(&mut err, diag_msg_id, msg); + None } - LintSource::CommandLine(lint_flag_val) => { - let flag = match level { - Level::Warn => "-W", - Level::Deny => "-D", - Level::Forbid => "-F", - Level::Allow => panic!(), - }; - let hyphen_case_lint_name = name.replace("_", "-"); - if lint_flag_val.as_str() == name { - sess.diag_note_once( - &mut err, - DiagnosticMessageId::from(lint), - &format!("requested on the command line with `{} {}`", - flag, hyphen_case_lint_name)); + LintSource::CommandLine(lint_flag_val, pre_warn_level) => { + let flag = orig_level.level_to_flag(); + let lint_name = hyphenate(&name); + let msg = if lint_flag_val.as_str() == name { + format!("requested on the command line with `{} {}`", flag, lint_name) } else { - let hyphen_case_flag_val = lint_flag_val.as_str().replace("_", "-"); - sess.diag_note_once( - &mut err, - DiagnosticMessageId::from(lint), - &format!("`{} {}` implied by `{} {}`", - flag, hyphen_case_lint_name, flag, - hyphen_case_flag_val)); - } + let flag_val = hyphenate(&lint_flag_val.as_str()); + format!("`{} {}` implied by `{} {}`", flag, lint_name, flag, flag_val) + }; + sess.diag_note_once(&mut err, diag_msg_id, &msg); + pre_warn_level } - LintSource::Node(lint_attr_name, src, reason) => { - if let Some(rationale) = reason { - err.note(&rationale.as_str()); + LintSource::Node(lint_attr_name, pre_warn_level, src, reason) => { + if orig_level >= level || pre_warn_level.is_some() { + if let Some(rationale) = reason { + err.note(&rationale.as_str()); + } } - sess.diag_span_note_once(&mut err, DiagnosticMessageId::from(lint), - src, "lint level defined here"); + + sess.diag_span_note_once(&mut err, diag_msg_id, src, "lint level defined here"); if lint_attr_name.as_str() != name { - let level_str = level.as_str(); - sess.diag_note_once(&mut err, DiagnosticMessageId::from(lint), - &format!("#[{}({})] implied by #[{}({})]", - level_str, name, level_str, lint_attr_name)); + let level_str = orig_level.as_str(); + let msg = format!( + "#[{}({})] implied by #[{}({})]", + level_str, name, level_str, lint_attr_name + ); + sess.diag_note_once(&mut err, diag_msg_id, &msg); } + + pre_warn_level } + }; + + // Highlight the minimum as cause of the lint iff it was raised due to the minimum. + let orig_level = pre_warn_level.map(|pwl| cmp::min(pwl, orig_level)).unwrap_or(orig_level); + if orig_level < min_level { + let min_msg = format!("#[{}({})] is the minimum lint level", min_level.as_str(), name); + let rem_msg = format!("the lint level cannot be reduced to `{}`", orig_level.as_str()); + sess.diag_note_once(&mut err, diag_msg_id, &min_msg); + sess.diag_note_once(&mut err, diag_msg_id, &rem_msg) } err.code(DiagnosticId::Lint(name)); @@ -725,8 +792,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session, } else { format!("{} in a future release!", STANDARD_MESSAGE) }; - let citation = format!("for more information, see {}", - future_incompatible.reference); + let citation = format!("for more information, see {}", future_incompatible.reference); err.warn(&explanation); err.note(&citation); } diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 07c505c6bde08..113fef6577dca 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -290,11 +290,25 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) { // Guidelines for creating a future incompatibility lint: // // - Create a lint defaulting to warn as normal, with ideally the same error - // message you would normally give + // message you would normally give. + // // - Add a suitable reference, typically an RFC or tracking issue. Go ahead // and include the full URL, sort items in ascending order of issue numbers. - // - Later, change lint to error - // - Eventually, remove lint + // + // - By default, `declare_lint!` is recommended for use to declare the `Lint`. + // + // After at least release cycle, and depending on how things have progressed, + // consider using `declare_unsuppressable_lint!` instead. + // This will turn the minimum level into `Warn` and make sure that `--cap-lints allow` + // won't suppress the lint when it arises in a dependency of the root crate being compiled. + // + // Please consult the documentation of `declare_unsuppressable_lint!` + // for more information about it. + // + // - Later, change lint to error, but we recommend that you first use + // `declare_unsuppressable_lint!` during at least one release cycle. + // + // - Eventually, remove the lint. store.register_future_incompatible(sess, vec![ FutureIncompatibleInfo { id: LintId::of(PRIVATE_IN_PUBLIC), From 5e541e24881af8f71acf39e3233da76362d84211 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Wed, 3 Apr 2019 04:49:16 +0200 Subject: [PATCH 2/6] minimum-lint-levels: Emit unused_attributes when e.g. allow(foo) has no effect. --- src/librustc/lint/builtin.rs | 6 ++++ src/librustc/lint/levels.rs | 39 +++++++++++++++++++++++++ src/librustc/lint/mod.rs | 55 ++++++++++++++++++++++-------------- src/librustc_lint/unused.rs | 7 +---- 4 files changed, 80 insertions(+), 27 deletions(-) diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs index cbdeda7b90206..9f48fbca66d11 100644 --- a/src/librustc/lint/builtin.rs +++ b/src/librustc/lint/builtin.rs @@ -22,6 +22,12 @@ declare_lint! { "constant evaluation detected erroneous expression" } +declare_lint! { + pub UNUSED_ATTRIBUTES, + Warn, + "detects attributes that were not used by the compiler" +} + declare_lint! { pub UNUSED_IMPORTS, Warn, diff --git a/src/librustc/lint/levels.rs b/src/librustc/lint/levels.rs index c32d748931523..9eeaf72264564 100644 --- a/src/librustc/lint/levels.rs +++ b/src/librustc/lint/levels.rs @@ -413,6 +413,8 @@ impl<'a> LintLevelsBuilder<'a> { } for (id, &(level, ref src)) in specs.iter() { + self.lint_higher_minimum_attr_lint(id.lint, level, src, &specs); + if level == Level::Forbid { continue } @@ -470,6 +472,43 @@ impl<'a> LintLevelsBuilder<'a> { } } + /// If we have e.g. `#[allow($some_future_compat_lint)]` this will have + /// no effect as `min_level > Allow`. We want to tell the user about this. + fn lint_higher_minimum_attr_lint( + &self, + lint: &'static Lint, + level: Level, + src: &LintSource, + specs: &FxHashMap, + ) { + let min_level = lint.min_level; + if min_level <= level { + return; + } + + if let LintSource::Node(name, _, span, _) = src { + // Get the `unused_attributes` lint specs: + let unused = builtin::UNUSED_ATTRIBUTES; + let (lvl, src) = self.sets.get_lint_level(unused, self.cur, Some(&specs), &self.sess); + + // Construct base diagnostic for `unused_attributes`: + let level_str = level.as_str(); + let msg = format!("#[{}({})] has no effect", level_str, name); + let multi_span = Some((*span).into()); + let mut err = lint::struct_lint_level(self.sess, unused, lvl, src, multi_span, &msg); + + // Add notes about minimum levels and what the user should do here: + err.note(&format!("the minimum lint level for `{}` is `{}`", name, min_level.as_str())) + .note(&format!("the lint level cannot be reduced to `{}`", level_str)) + .help(&format!("remove the #[{}({})] directive", level_str, name)); + + // If it is a future compat lint, warn the user about it. + crate::lint::check_future_compatibility(self.sess, lint, &mut err, Some(name)); + + err.emit(); + } + } + /// Called after `push` when the scope of a set of attributes are exited. pub fn pop(&mut self, push: BuilderPush) { self.cur = push.prev; diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index 9f51416d7759a..bdeec7a984e42 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -33,7 +33,7 @@ use crate::ty::TyCtxt; use crate::ty::query::Providers; use crate::util::nodemap::NodeMap; use errors::{DiagnosticBuilder, DiagnosticId}; -use std::{hash, ptr, cmp}; +use std::{hash, ptr, cmp, fmt}; use syntax::ast; use syntax::source_map::{MultiSpan, ExpnFormat}; use syntax::early_buffered_lints::BufferedEarlyLintId; @@ -770,31 +770,46 @@ pub fn struct_lint_level<'a>(sess: &'a Session, err.code(DiagnosticId::Lint(name)); + check_future_compatibility(sess, lint, &mut err, Option::<&str>::None); + + return err +} + +/// Check for future incompatibility lints and issue a stronger warning. +pub fn check_future_compatibility<'a>( + sess: &'a Session, + lint: &'static Lint, + err: &mut DiagnosticBuilder<'_>, + name: Option, +) { // Check for future incompatibility lints and issue a stronger warning. let lints = sess.lint_store.borrow(); let lint_id = LintId::of(lint); let future_incompatible = lints.future_incompatible(lint_id); if let Some(future_incompatible) = future_incompatible { - const STANDARD_MESSAGE: &str = - "this was previously accepted by the compiler but is being phased out; \ - it will become a hard error"; - - let explanation = if lint_id == LintId::of(builtin::UNSTABLE_NAME_COLLISIONS) { - "once this method is added to the standard library, \ - the ambiguity may cause an error or change in behavior!" - .to_owned() + if lint_id == LintId::of(crate::lint::builtin::UNSTABLE_NAME_COLLISIONS) { + err.warn("once this method is added to the standard library, \ + the ambiguity may cause an error or change in behavior!"); } else if lint_id == LintId::of(builtin::MUTABLE_BORROW_RESERVATION_CONFLICT) { - "this borrowing pattern was not meant to be accepted, \ - and may become a hard error in the future" - .to_owned() - } else if let Some(edition) = future_incompatible.edition { - format!("{} in the {} edition!", STANDARD_MESSAGE, edition) + err.warn("this borrowing pattern was not meant to be accepted, \ + and may become a hard error in the future"); } else { - format!("{} in a future release!", STANDARD_MESSAGE) - }; - let citation = format!("for more information, see {}", future_incompatible.reference); - err.warn(&explanation); - err.note(&citation); + let previously_msg = if let Some(n) = name { + format!("`{}` was previously accepted by the compiler but is being phased out", n) + } else { + format!("this was previously accepted by the compiler but is being phased out") + }; + err.warn(&previously_msg); + + let hard_err_msg = if let Some(edition) = future_incompatible.edition { + format!("it will become a hard error in the {} edition!", edition) + } else { + format!("it will become a hard error in a future release!") + }; + err.warn(&hard_err_msg); + } + + err.note(&format!("for more information, see {}", future_incompatible.reference)); } // If this code originates in a foreign macro, aka something that this crate @@ -812,8 +827,6 @@ pub fn struct_lint_level<'a>(sess: &'a Session, err.cancel() } } - - return err } pub fn maybe_lint_level_root(tcx: TyCtxt<'_, '_, '_>, id: hir::HirId) -> bool { diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs index d41d97f58bcbe..d2959739672a3 100644 --- a/src/librustc_lint/unused.rs +++ b/src/librustc_lint/unused.rs @@ -3,6 +3,7 @@ use rustc::hir::def_id::DefId; use rustc::lint; use rustc::ty; use rustc::ty::adjustment; +use lint::builtin::UNUSED_ATTRIBUTES; use lint::{LateContext, EarlyContext, LintContext, LintArray}; use lint::{LintPass, EarlyLintPass, LateLintPass}; @@ -204,12 +205,6 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PathStatements { } } -declare_lint! { - pub UNUSED_ATTRIBUTES, - Warn, - "detects attributes that were not used by the compiler" -} - declare_lint_pass!(UnusedAttributes => [UNUSED_ATTRIBUTES]); impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAttributes { From a122019ca50084c9d5c5ca6dcf3649170f210374 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sun, 7 Apr 2019 20:45:32 +0200 Subject: [PATCH 3/6] minimum-lint-levels: Use declare_unsuppressable_lint! for ILLEGAL_FLOATING_POINT_LITERAL_PATTERN. Leave FIXMEs for other C-future-compatibility lints. --- src/librustc/lint/builtin.rs | 38 ++++++++++++++++++------------------ src/librustc_lint/builtin.rs | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs index 9f48fbca66d11..def6c5144f708 100644 --- a/src/librustc/lint/builtin.rs +++ b/src/librustc/lint/builtin.rs @@ -125,7 +125,7 @@ declare_lint! { "detects trivial casts of numeric types which could be removed" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub PRIVATE_IN_PUBLIC, Warn, "detect private items in public interfaces not caught by the old implementation" @@ -143,7 +143,7 @@ declare_lint! { "detect public re-exports of private extern crates" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub INVALID_TYPE_PARAM_DEFAULT, Deny, "type parameter default erroneously allowed in invalid location" @@ -155,62 +155,62 @@ declare_lint! { "lints that have been renamed or removed" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub SAFE_EXTERN_STATICS, Deny, "safe access to extern statics was erroneously allowed" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub SAFE_PACKED_BORROWS, Warn, "safe borrows of fields of packed structs were was erroneously allowed" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub PATTERNS_IN_FNS_WITHOUT_BODY, Warn, "patterns in functions without body were erroneously allowed" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub LEGACY_DIRECTORY_OWNERSHIP, Deny, "non-inline, non-`#[path]` modules (e.g., `mod foo;`) were erroneously allowed in some files \ not named `mod.rs`" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub LEGACY_CONSTRUCTOR_VISIBILITY, Deny, "detects use of struct constructors that would be invisible with new visibility rules" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub MISSING_FRAGMENT_SPECIFIER, Deny, "detects missing fragment specifiers in unused `macro_rules!` patterns" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub PARENTHESIZED_PARAMS_IN_TYPES_AND_MODULES, Deny, "detects parenthesized generic parameters in type and module names" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub LATE_BOUND_LIFETIME_ARGUMENTS, Warn, "detects generic lifetime arguments in path segments with late bound lifetime parameters" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub INCOHERENT_FUNDAMENTAL_IMPLS, Deny, "potentially-conflicting impls were erroneously allowed" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub ORDER_DEPENDENT_TRAIT_OBJECTS, Deny, "trait-object types were treated as different depending on marker-trait order" @@ -253,7 +253,7 @@ declare_lint! { "detects lifetime parameters that are never used" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub TYVAR_BEHIND_RAW_POINTER, Warn, "raw pointer to an inference variable" @@ -278,7 +278,7 @@ declare_lint! { instead of `crate`, `self`, or an extern crate name" } -declare_lint! { +declare_unsuppressable_lint! { pub ILLEGAL_FLOATING_POINT_LITERAL_PATTERN, Warn, "floating-point literals cannot be used in patterns" @@ -326,7 +326,7 @@ declare_lint! { "detects code samples in docs of private items not documented by rustdoc" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub WHERE_CLAUSES_OBJECT_SAFETY, Warn, "checks the object safety of where clauses" @@ -358,7 +358,7 @@ declare_lint! { "outlives requirements can be inferred" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub DUPLICATE_MATCHER_BINDING_NAME, Deny, "duplicate macro matcher binding name" @@ -372,7 +372,7 @@ pub mod parser { "detects the use of `?` as a macro separator" } - declare_lint! { + declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub ILL_FORMED_ATTRIBUTE_INPUT, Warn, "ill-formed attribute inputs that were previously accepted and used in practice" @@ -386,13 +386,13 @@ declare_lint! { report_in_external_macro: true } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub AMBIGUOUS_ASSOCIATED_ITEMS, Warn, "ambiguous associated items" } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` pub NESTED_IMPL_TRAIT, Warn, "nested occurrence of `impl Trait` type" diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 7fe047ec2c65a..3087d4abe6714 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -1057,7 +1057,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnreachablePub { } } -declare_lint! { +declare_lint! { // FIXME(centril): consider using `declare_unsuppressable_lint` TYPE_ALIAS_BOUNDS, Warn, "bounds in type aliases are not enforced" From 8471a95f41cde7cb7811916ae2508fe6d7026edd Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sun, 7 Apr 2019 19:48:20 +0200 Subject: [PATCH 4/6] minimum-lint-levels: Add dedicated tests. --- src/test/ui/lint/lint-min-allow-no-effect.rs | 20 +++++++++++ .../ui/lint/lint-min-allow-no-effect.stderr | 33 +++++++++++++++++++ src/test/ui/lint/lint-min-deny-has-effect.rs | 7 ++++ .../ui/lint/lint-min-warn-cannot-allow.rs | 17 ++++++++++ .../ui/lint/lint-min-warn-cannot-allow.stderr | 20 +++++++++++ .../ui/lint/lint-min-warn-cannot-allow2.rs | 11 +++++++ .../lint/lint-min-warn-cannot-allow2.stderr | 27 +++++++++++++++ src/test/ui/lint/lint-min-warn-has-effect.rs | 7 ++++ 8 files changed, 142 insertions(+) create mode 100644 src/test/ui/lint/lint-min-allow-no-effect.rs create mode 100644 src/test/ui/lint/lint-min-allow-no-effect.stderr create mode 100644 src/test/ui/lint/lint-min-deny-has-effect.rs create mode 100644 src/test/ui/lint/lint-min-warn-cannot-allow.rs create mode 100644 src/test/ui/lint/lint-min-warn-cannot-allow.stderr create mode 100644 src/test/ui/lint/lint-min-warn-cannot-allow2.rs create mode 100644 src/test/ui/lint/lint-min-warn-cannot-allow2.stderr create mode 100644 src/test/ui/lint/lint-min-warn-has-effect.rs diff --git a/src/test/ui/lint/lint-min-allow-no-effect.rs b/src/test/ui/lint/lint-min-allow-no-effect.rs new file mode 100644 index 0000000000000..bbe1e1ad484ae --- /dev/null +++ b/src/test/ui/lint/lint-min-allow-no-effect.rs @@ -0,0 +1,20 @@ +#![deny(unused_attributes)] +//~^ NOTE lint level defined here + +#![allow(illegal_floating_point_literal_pattern)] +//~^ ERROR #[allow(illegal_floating_point_literal_pattern)] has no effect [unused_attributes] +//~| NOTE the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` +//~| NOTE the lint level cannot be reduced to `allow` +//~| HELP remove the #[allow(illegal_floating_point_literal_pattern)] directive +//~| WARN `illegal_floating_point_literal_pattern` was previously accepted +//~| WARN hard error +//~| NOTE for more information +//~| ERROR #[allow(illegal_floating_point_literal_pattern)] has no effect [unused_attributes] +//~| NOTE the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` +//~| NOTE the lint level cannot be reduced to `allow` +//~| HELP remove the #[allow(illegal_floating_point_literal_pattern)] directive +//~| WARN `illegal_floating_point_literal_pattern` was previously accepted +//~| WARN hard error +//~| NOTE for more information + +fn main() {} diff --git a/src/test/ui/lint/lint-min-allow-no-effect.stderr b/src/test/ui/lint/lint-min-allow-no-effect.stderr new file mode 100644 index 0000000000000..5d610a180acce --- /dev/null +++ b/src/test/ui/lint/lint-min-allow-no-effect.stderr @@ -0,0 +1,33 @@ +error: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/lint-min-allow-no-effect.rs:4:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +note: lint level defined here + --> $DIR/lint-min-allow-no-effect.rs:1:9 + | +LL | #![deny(unused_attributes)] + | ^^^^^^^^^^^^^^^^^ + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +error: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/lint-min-allow-no-effect.rs:4:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/lint/lint-min-deny-has-effect.rs b/src/test/ui/lint/lint-min-deny-has-effect.rs new file mode 100644 index 0000000000000..ca2d3a52e5f14 --- /dev/null +++ b/src/test/ui/lint/lint-min-deny-has-effect.rs @@ -0,0 +1,7 @@ +// run-pass + +#![deny(unused_attributes)] + +#![deny(illegal_floating_point_literal_pattern)] + +fn main() {} diff --git a/src/test/ui/lint/lint-min-warn-cannot-allow.rs b/src/test/ui/lint/lint-min-warn-cannot-allow.rs new file mode 100644 index 0000000000000..022400b2c1830 --- /dev/null +++ b/src/test/ui/lint/lint-min-warn-cannot-allow.rs @@ -0,0 +1,17 @@ +#![deny(warnings)] +//~^ NOTE lint level defined here + +#![allow(illegal_floating_point_literal_pattern)] + +fn _0() { + if let 0.0 = 0.0 {} + //~^ ERROR floating-point types cannot be used in patterns + //~| NOTE #[deny(illegal_floating_point_literal_pattern)] implied by #[deny(warnings)] + //~| NOTE #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + //~| NOTE the lint level cannot be reduced to `allow` + //~| WARN this was previously accepted + //~| WARN hard error + //~| NOTE for more information, see issue #41620 +} + +fn main() {} diff --git a/src/test/ui/lint/lint-min-warn-cannot-allow.stderr b/src/test/ui/lint/lint-min-warn-cannot-allow.stderr new file mode 100644 index 0000000000000..ec2b848b5d9e4 --- /dev/null +++ b/src/test/ui/lint/lint-min-warn-cannot-allow.stderr @@ -0,0 +1,20 @@ +error: floating-point types cannot be used in patterns + --> $DIR/lint-min-warn-cannot-allow.rs:7:12 + | +LL | if let 0.0 = 0.0 {} + | ^^^ + | +note: lint level defined here + --> $DIR/lint-min-warn-cannot-allow.rs:1:9 + | +LL | #![deny(warnings)] + | ^^^^^^^^ + = note: #[deny(illegal_floating_point_literal_pattern)] implied by #[deny(warnings)] + = note: #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + = note: the lint level cannot be reduced to `allow` + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +error: aborting due to previous error + diff --git a/src/test/ui/lint/lint-min-warn-cannot-allow2.rs b/src/test/ui/lint/lint-min-warn-cannot-allow2.rs new file mode 100644 index 0000000000000..1eb671da9c119 --- /dev/null +++ b/src/test/ui/lint/lint-min-warn-cannot-allow2.rs @@ -0,0 +1,11 @@ +// run-pass + +// FIXME(centril): enforce the warnings and such somehow. + +#![warn(warnings)] + +#![allow(illegal_floating_point_literal_pattern)] + +fn main() { + if let 0.0 = 0.0 {} +} diff --git a/src/test/ui/lint/lint-min-warn-cannot-allow2.stderr b/src/test/ui/lint/lint-min-warn-cannot-allow2.stderr new file mode 100644 index 0000000000000..9a2d9e67a28b3 --- /dev/null +++ b/src/test/ui/lint/lint-min-warn-cannot-allow2.stderr @@ -0,0 +1,27 @@ +warning: floating-point types cannot be used in patterns + --> $DIR/lint-min-warn-cannot-allow2.rs:10:12 + | +LL | if let 0.0 = 0.0 {} + | ^^^ + | +note: lint level defined here + --> $DIR/lint-min-warn-cannot-allow2.rs:7:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + = note: the lint level cannot be reduced to `allow` + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/lint-min-warn-cannot-allow2.rs:10:12 + | +LL | if let 0.0 = 0.0 {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + diff --git a/src/test/ui/lint/lint-min-warn-has-effect.rs b/src/test/ui/lint/lint-min-warn-has-effect.rs new file mode 100644 index 0000000000000..8599b9a5d2bb0 --- /dev/null +++ b/src/test/ui/lint/lint-min-warn-has-effect.rs @@ -0,0 +1,7 @@ +// run-pass + +#![deny(unused_attributes)] + +#![warn(illegal_floating_point_literal_pattern)] + +fn main() {} From b566b20f76922ce41cd2eabbf7aff976829262ea Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Tue, 2 Apr 2019 01:46:28 +0200 Subject: [PATCH 5/6] minimum-lint-levels: Adjust tests. --- .../ui/await-keyword/2015-edition-warning.rs | 6 ++ .../ui/derives/deriving-with-repr-packed.rs | 14 ++-- .../dyn-2015-edition-keyword-ident-lint.rs | 14 ++++ .../edition-raw-pointer-method-2015.rs | 1 + .../issue-43106-gating-of-inline.rs | 1 + ...re-gate-default_type_parameter_fallback.rs | 2 + src/test/ui/future-incompatible-lint-group.rs | 1 + .../issue-57979-impl-trait-in-path.rs | 6 +- ...e-57979-nested-impl-trait-in-assoc-proj.rs | 6 +- .../local-modularized-tricky-fail-3.rs | 2 + src/test/ui/issues/issue-27060.rs | 6 +- src/test/ui/issues/issue-30079.rs | 3 +- src/test/ui/issues/issue-32995-2.rs | 3 + src/test/ui/issues/issue-32995.rs | 7 ++ src/test/ui/issues/issue-38715.rs | 1 + src/test/ui/issues/issue-39404.rs | 1 + src/test/ui/issues/issue-41255.rs | 9 +++ src/test/ui/issues/issue-43355.rs | 3 +- src/test/ui/issues/issue-50781.rs | 1 + src/test/ui/issues/issue-6804.rs | 2 + .../lint-incoherent-auto-trait-objects.rs | 9 ++- .../method-call-lifetime-args-lint-fail.rs | 15 ++++ .../methods/method-call-lifetime-args-lint.rs | 2 + src/test/ui/no-patterns-in-args-2.rs | 1 + .../non-exhaustive-float-range-match.rs | 12 ++++ .../ui/non-exhaustive/non-exhaustive-match.rs | 18 +++++ src/test/ui/privacy/legacy-ctor-visibility.rs | 1 + .../ui/privacy/private-in-public-assoc-ty.rs | 2 + .../private-in-public-non-principal.rs | 1 + src/test/ui/privacy/private-in-public-warn.rs | 69 +++++++++++++------ src/test/ui/proc-macro/generate-mod.rs | 4 ++ .../ui/pub/pub-reexport-priv-extern-crate.rs | 3 + .../ui/rfc1445/match-forbidden-without-eq.rs | 5 +- src/test/ui/rust-2018/async-ident-allowed.rs | 3 +- src/test/ui/rust-2018/async-ident.rs | 17 ++++- src/test/ui/rust-2018/dyn-keyword.rs | 3 +- .../edition-lint-fully-qualified-paths.rs | 6 +- .../edition-lint-nested-empty-paths.rs | 3 + .../ui/rust-2018/edition-lint-nested-paths.rs | 6 +- src/test/ui/rust-2018/edition-lint-paths.rs | 7 ++ src/test/ui/rust-2018/extern-crate-rename.rs | 2 +- src/test/ui/rust-2018/extern-crate-submod.rs | 2 +- src/test/ui/safe-extern-statics.rs | 4 ++ .../ui/type-alias-enum-variants-priority.rs | 1 + 44 files changed, 238 insertions(+), 47 deletions(-) diff --git a/src/test/ui/await-keyword/2015-edition-warning.rs b/src/test/ui/await-keyword/2015-edition-warning.rs index a7543a14325fb..140957c17c57f 100644 --- a/src/test/ui/await-keyword/2015-edition-warning.rs +++ b/src/test/ui/await-keyword/2015-edition-warning.rs @@ -7,21 +7,27 @@ mod outer_mod { pub mod await { //~^ ERROR `await` is a keyword //~| WARN was previously accepted +//~| WARN hard error pub struct await; //~^ ERROR `await` is a keyword //~| WARN was previously accepted +//~| WARN hard error } } use outer_mod::await::await; //~^ ERROR `await` is a keyword //~| ERROR `await` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| WARN was previously accepted +//~| WARN hard error fn main() { match await { await => {} } //~^ ERROR `await` is a keyword //~| ERROR `await` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| WARN was previously accepted +//~| WARN hard error } diff --git a/src/test/ui/derives/deriving-with-repr-packed.rs b/src/test/ui/derives/deriving-with-repr-packed.rs index 66b0f85c85dd1..9799f03c007c7 100644 --- a/src/test/ui/derives/deriving-with-repr-packed.rs +++ b/src/test/ui/derives/deriving-with-repr-packed.rs @@ -7,15 +7,18 @@ #[derive(Copy, Clone, PartialEq, Eq)] //~^ ERROR #[derive] can't be used -//~| hard error -//~^^^ ERROR #[derive] can't be used -//~| hard error +//~| WARN this was previously accepted +//~| WARN hard error +//~| ERROR #[derive] can't be used +//~| WARN this was previously accepted +//~| WARN hard error #[repr(packed)] pub struct Foo(T, T, T); #[derive(PartialEq, Eq)] //~^ ERROR #[derive] can't be used -//~| hard error +//~| WARN this was previously accepted +//~| WARN hard error #[repr(packed)] pub struct Bar(u32, u32, u32); @@ -24,7 +27,8 @@ struct Y(usize); #[derive(PartialEq)] //~^ ERROR #[derive] can't be used -//~| hard error +//~| WARN this was previously accepted +//~| WARN hard error #[repr(packed)] struct X(Y); diff --git a/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs b/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs index 0e5c39fc501be..32ce9b58c20a9 100644 --- a/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs +++ b/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs @@ -13,26 +13,33 @@ mod outer_mod { pub mod dyn { //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error pub struct dyn; //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error } } use outer_mod::dyn::dyn; //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error fn main() { match dyn { dyn => {} } //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error macro_defn::dyn(); //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error macro_defn::boxed(); } @@ -43,6 +50,7 @@ mod macro_defn { macro_rules! dyn { //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error // Note that we do not lint nor fix occurrences under macros ($dyn:tt) => { (Box, Box<$dyn Trait>) } @@ -51,15 +59,20 @@ mod macro_defn { pub fn dyn() -> ::outer_mod::dyn::dyn { //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error ::outer_mod::dyn::dyn //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error } @@ -67,6 +80,7 @@ mod macro_defn { pub fn boxed() -> dyn!( //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted + //~| WARN hard error // Note that we do not lint nor fix occurrences under macros dyn diff --git a/src/test/ui/editions/edition-raw-pointer-method-2015.rs b/src/test/ui/editions/edition-raw-pointer-method-2015.rs index a538bca75f67d..d214e526d0cca 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2015.rs +++ b/src/test/ui/editions/edition-raw-pointer-method-2015.rs @@ -10,4 +10,5 @@ fn main() { let _ = y.is_null(); //~^ error: type annotations needed [tyvar_behind_raw_pointer] //~^^ warning: this was previously accepted + //~| warning: hard error } diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-inline.rs b/src/test/ui/feature-gate/issue-43106-gating-of-inline.rs index bb9e6d4ca83b0..f8565feb05347 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-inline.rs +++ b/src/test/ui/feature-gate/issue-43106-gating-of-inline.rs @@ -17,6 +17,7 @@ mod inline { #[inline = "2100"] fn f() { } //~^ WARN attribute must be of the form //~| WARN this was previously accepted + //~| WARN hard error #[inline] struct S; //~^ ERROR attribute should be applied to function or closure diff --git a/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.rs b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.rs index 33038e24bc62b..49ee0d91ad606 100644 --- a/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.rs +++ b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.rs @@ -3,10 +3,12 @@ fn avg(_: T) {} //~^ ERROR defaults for type parameters are only allowed //~| WARN this was previously accepted +//~| WARN hard error struct S(T); impl S {} //~^ ERROR defaults for type parameters are only allowed //~| WARN this was previously accepted +//~| WARN hard error fn main() {} diff --git a/src/test/ui/future-incompatible-lint-group.rs b/src/test/ui/future-incompatible-lint-group.rs index 3630f08c93778..416675cf0ecf0 100644 --- a/src/test/ui/future-incompatible-lint-group.rs +++ b/src/test/ui/future-incompatible-lint-group.rs @@ -3,6 +3,7 @@ trait Tr { fn f(u8) {} //~ ERROR anonymous parameters are deprecated //~^ WARN this was previously accepted + //~| WARN hard error } fn main() {} diff --git a/src/test/ui/impl-trait/issue-57979-impl-trait-in-path.rs b/src/test/ui/impl-trait/issue-57979-impl-trait-in-path.rs index 84fcb5e2880a7..07144c03ea017 100644 --- a/src/test/ui/impl-trait/issue-57979-impl-trait-in-path.rs +++ b/src/test/ui/impl-trait/issue-57979-impl-trait-in-path.rs @@ -19,7 +19,8 @@ mod warned { pub trait Quux { type Assoc; } pub fn demo(_: impl Quux<(), Assoc=<() as Quux>::Assoc>) { } //~^ WARN `impl Trait` is not allowed in path parameters - //~| WARN will become a hard error in a future release! + //~| WARN this was previously accepted + //~| WARN hard error impl Quux for () { type Assoc = u32; } } @@ -30,7 +31,8 @@ mod denied { pub trait Quux { type Assoc; } pub fn demo(_: impl Quux<(), Assoc=<() as Quux>::Assoc>) { } //~^ ERROR `impl Trait` is not allowed in path parameters - //~| WARN will become a hard error in a future release! + //~| WARN this was previously accepted + //~| WARN hard error impl Quux for () { type Assoc = u32; } } diff --git a/src/test/ui/impl-trait/issue-57979-nested-impl-trait-in-assoc-proj.rs b/src/test/ui/impl-trait/issue-57979-nested-impl-trait-in-assoc-proj.rs index 5c20ffc7c6724..6836fdaead0dc 100644 --- a/src/test/ui/impl-trait/issue-57979-nested-impl-trait-in-assoc-proj.rs +++ b/src/test/ui/impl-trait/issue-57979-nested-impl-trait-in-assoc-proj.rs @@ -20,7 +20,8 @@ mod warned { pub trait Quux { type Assoc; } pub fn demo(_: impl Quux>) { } //~^ WARN nested `impl Trait` is not allowed - //~| WARN will become a hard error in a future release! + //~| WARN this was previously accepted + //~| WARN hard error } mod denied { @@ -31,7 +32,8 @@ mod denied { pub trait Quux { type Assoc; } pub fn demo(_: impl Quux>) { } //~^ ERROR nested `impl Trait` is not allowed - //~| WARN will become a hard error in a future release! + //~| WARN this was previously accepted + //~| WARN hard error } fn main() { } diff --git a/src/test/ui/imports/local-modularized-tricky-fail-3.rs b/src/test/ui/imports/local-modularized-tricky-fail-3.rs index 386de88bc3d62..9756499b09c62 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-3.rs +++ b/src/test/ui/imports/local-modularized-tricky-fail-3.rs @@ -13,10 +13,12 @@ mod m { use exported; //~^ ERROR macro-expanded `macro_export` macros from the current crate cannot //~| WARN this was previously accepted + //~| WARN hard error } fn main() { ::exported!(); //~^ ERROR macro-expanded `macro_export` macros from the current crate cannot //~| WARN this was previously accepted + //~| WARN hard error } diff --git a/src/test/ui/issues/issue-27060.rs b/src/test/ui/issues/issue-27060.rs index 4caad03a36151..faeaae25d8b0f 100644 --- a/src/test/ui/issues/issue-27060.rs +++ b/src/test/ui/issues/issue-27060.rs @@ -24,9 +24,11 @@ fn main() { } let _ = &good.data; //~ ERROR borrow of packed field is unsafe - //~| hard error + //~| WARN previously accepted + //~| WARN hard error let _ = &good.data2[0]; //~ ERROR borrow of packed field is unsafe - //~| hard error + //~| WARN previously accepted + //~| WARN hard error let _ = &*good.data; // ok, behind a pointer let _ = &good.aligned; // ok, has align 1 let _ = &good.aligned[2]; // ok, has align 1 diff --git a/src/test/ui/issues/issue-30079.rs b/src/test/ui/issues/issue-30079.rs index a02a932d0570a..f8d22358282e2 100644 --- a/src/test/ui/issues/issue-30079.rs +++ b/src/test/ui/issues/issue-30079.rs @@ -4,7 +4,8 @@ mod m1 { struct Priv; impl ::SemiPriv { pub fn f(_: Priv) {} //~ WARN private type `m1::Priv` in public interface - //~^ WARNING hard error + //~^ WARN previously accepted + //~| WARNING hard error } impl Priv { diff --git a/src/test/ui/issues/issue-32995-2.rs b/src/test/ui/issues/issue-32995-2.rs index 2234f68f24629..43016d6d84788 100644 --- a/src/test/ui/issues/issue-32995-2.rs +++ b/src/test/ui/issues/issue-32995-2.rs @@ -4,10 +4,12 @@ fn main() { { fn f() {} } //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted + //~| WARN hard error { fn f() -> impl ::std::marker()::Send { } } //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted + //~| WARN hard error } #[derive(Clone)] @@ -16,3 +18,4 @@ struct X; impl ::std::marker()::Copy for X {} //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted +//~| WARN hard error diff --git a/src/test/ui/issues/issue-32995.rs b/src/test/ui/issues/issue-32995.rs index c32fb63f1e584..997f25398318f 100644 --- a/src/test/ui/issues/issue-32995.rs +++ b/src/test/ui/issues/issue-32995.rs @@ -4,30 +4,37 @@ fn main() { let x: usize() = 1; //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted + //~| WARN hard error let b: ::std::boxed()::Box<_> = Box::new(1); //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted + //~| WARN hard error let p = ::std::str::()::from_utf8(b"foo").unwrap(); //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted + //~| WARN hard error let p = ::std::str::from_utf8::()(b"foo").unwrap(); //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted + //~| WARN hard error let o : Box<::std::marker()::Send> = Box::new(1); //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted + //~| WARN hard error let o : Box = Box::new(1); //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted + //~| WARN hard error } fn foo() { let d : X() = Default::default(); //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait //~| WARN previously accepted + //~| WARN hard error } diff --git a/src/test/ui/issues/issue-38715.rs b/src/test/ui/issues/issue-38715.rs index 850ffcdabe4cb..17227eae1ddae 100644 --- a/src/test/ui/issues/issue-38715.rs +++ b/src/test/ui/issues/issue-38715.rs @@ -4,5 +4,6 @@ macro_rules! foo { ($i:ident) => {} } #[macro_export] macro_rules! foo { () => {} } //~ ERROR a macro named `foo` has already been exported //~| WARN this was previously accepted + //~| WARN hard error fn main() {} diff --git a/src/test/ui/issues/issue-39404.rs b/src/test/ui/issues/issue-39404.rs index 2229f2c3900c3..e3859f153e0b8 100644 --- a/src/test/ui/issues/issue-39404.rs +++ b/src/test/ui/issues/issue-39404.rs @@ -3,5 +3,6 @@ macro_rules! m { ($i) => {} } //~^ ERROR missing fragment specifier //~| WARN previously accepted +//~| WARN hard error fn main() {} diff --git a/src/test/ui/issues/issue-41255.rs b/src/test/ui/issues/issue-41255.rs index 395ab8601bcc5..8fa04de0cf0f0 100644 --- a/src/test/ui/issues/issue-41255.rs +++ b/src/test/ui/issues/issue-41255.rs @@ -8,18 +8,25 @@ fn main() { let x = 42.0; match x { 5.0 => {}, //~ ERROR floating-point types cannot be used in patterns + //~| WARN this was previously accepted //~| WARNING hard error 5.0f32 => {}, //~ ERROR floating-point types cannot be used in patterns + //~| WARN this was previously accepted //~| WARNING hard error -5.0 => {}, //~ ERROR floating-point types cannot be used in patterns + //~| WARN this was previously accepted //~| WARNING hard error 1.0 .. 33.0 => {}, //~ ERROR floating-point types cannot be used in patterns + //~| WARN this was previously accepted //~| WARNING hard error //~| ERROR floating-point types cannot be used in patterns + //~| WARN this was previously accepted //~| WARNING hard error 39.0 ..= 70.0 => {}, //~ ERROR floating-point types cannot be used in patterns + //~| WARN this was previously accepted //~| WARNING hard error //~| ERROR floating-point types cannot be used in patterns + //~| WARN this was previously accepted //~| WARNING hard error _ => {}, }; @@ -27,6 +34,7 @@ fn main() { // Same for tuples match (x, 5) { (3.14, 1) => {}, //~ ERROR floating-point types cannot be used + //~| WARN this was previously accepted //~| WARNING hard error _ => {}, } @@ -34,6 +42,7 @@ fn main() { struct Foo { x: f32 }; match (Foo { x }) { Foo { x: 2.0 } => {}, //~ ERROR floating-point types cannot be used + //~| WARN this was previously accepted //~| WARNING hard error _ => {}, } diff --git a/src/test/ui/issues/issue-43355.rs b/src/test/ui/issues/issue-43355.rs index 809300d6d1968..699990fbf06d2 100644 --- a/src/test/ui/issues/issue-43355.rs +++ b/src/test/ui/issues/issue-43355.rs @@ -12,7 +12,8 @@ impl Trait1 for T where T: Trait2 { impl Trait1> for A { //~^ ERROR conflicting implementations of trait -//~| hard error +//~| WARN this was previously accepted by the compiler but is being phased out +//~| WARN hard error //~| downstream crates may implement trait `Trait2>` for type `A` type Output = i32; } diff --git a/src/test/ui/issues/issue-50781.rs b/src/test/ui/issues/issue-50781.rs index edf8d82b48050..ae5f8ae80572d 100644 --- a/src/test/ui/issues/issue-50781.rs +++ b/src/test/ui/issues/issue-50781.rs @@ -5,6 +5,7 @@ trait Trait {} trait X { fn foo(&self) where Self: Trait; //~ ERROR the trait `X` cannot be made into an object //~^ WARN this was previously accepted by the compiler but is being phased out + //~| WARN hard error } impl X for () { diff --git a/src/test/ui/issues/issue-6804.rs b/src/test/ui/issues/issue-6804.rs index da73e2bd397d6..11c5c6f09994c 100644 --- a/src/test/ui/issues/issue-6804.rs +++ b/src/test/ui/issues/issue-6804.rs @@ -10,12 +10,14 @@ fn main() { match x { NAN => {}, //~ ERROR floating-point types cannot be used //~^ WARN this was previously accepted by the compiler but is being phased out + //~| WARN hard error _ => {}, }; match [x, 1.0] { [NAN, _] => {}, //~ ERROR floating-point types cannot be used //~^ WARN this was previously accepted by the compiler but is being phased out + //~| WARN hard error _ => {}, }; } diff --git a/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs b/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs index 0d18965ee7338..68294054f5567 100644 --- a/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs +++ b/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs @@ -6,16 +6,19 @@ impl Foo for dyn Send {} impl Foo for dyn Send + Send {} //~^ ERROR conflicting implementations -//~| hard error +//~| WARN this was previously accepted +//~| WARN hard error impl Foo for dyn Send + Sync {} impl Foo for dyn Sync + Send {} //~^ ERROR conflicting implementations -//~| hard error +//~| WARN this was previously accepted +//~| WARN hard error impl Foo for dyn Send + Sync + Send {} //~^ ERROR conflicting implementations -//~| hard error +//~| WARN this was previously accepted +//~| WARN hard error fn main() {} diff --git a/src/test/ui/methods/method-call-lifetime-args-lint-fail.rs b/src/test/ui/methods/method-call-lifetime-args-lint-fail.rs index 36a1a2fda6995..807175df50835 100644 --- a/src/test/ui/methods/method-call-lifetime-args-lint-fail.rs +++ b/src/test/ui/methods/method-call-lifetime-args-lint-fail.rs @@ -23,43 +23,55 @@ fn method_call() { S.late::<'static>(&0, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late::<'static, 'static>(&0, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late::<'static, 'static, 'static>(&0, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_early(&0); // OK S.late_early::<'static>(&0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_early::<'static, 'static>(&0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_early::<'static, 'static, 'static>(&0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_implicit(&0, &0); // OK S.late_implicit::<'static>(&0, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_implicit::<'static, 'static>(&0, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_implicit::<'static, 'static, 'static>(&0, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_implicit_early(&0); // OK S.late_implicit_early::<'static>(&0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_implicit_early::<'static, 'static>(&0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_implicit_early::<'static, 'static, 'static>(&0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S::early_tricky_explicit::<'static>(loop {}, loop {}); // OK S::early_tricky_implicit::<'static>(loop {}, loop {}); // OK @@ -69,10 +81,12 @@ fn ufcs() { S::late_early::<'static>(S, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S::late_implicit_early::<'static>(S, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error } fn lint_not_inference_error() { @@ -82,6 +96,7 @@ fn lint_not_inference_error() { f::<'static, u8>; //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error } fn main() {} diff --git a/src/test/ui/methods/method-call-lifetime-args-lint.rs b/src/test/ui/methods/method-call-lifetime-args-lint.rs index 14729e1e27e3c..280b0847c9515 100644 --- a/src/test/ui/methods/method-call-lifetime-args-lint.rs +++ b/src/test/ui/methods/method-call-lifetime-args-lint.rs @@ -12,10 +12,12 @@ fn method_call() { S.late::<'static>(&0, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error S.late_implicit::<'static>(&0, &0); //~^ ERROR cannot specify lifetime arguments explicitly //~| WARN this was previously accepted + //~| WARN hard error } fn main() {} diff --git a/src/test/ui/no-patterns-in-args-2.rs b/src/test/ui/no-patterns-in-args-2.rs index ccf57478b4850..0a983b5fc731c 100644 --- a/src/test/ui/no-patterns-in-args-2.rs +++ b/src/test/ui/no-patterns-in-args-2.rs @@ -3,6 +3,7 @@ trait Tr { fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in methods without bodies //~^ WARN was previously accepted + //~| WARN hard error fn f2(&arg: u8); //~ ERROR patterns aren't allowed in methods without bodies fn g1(arg: u8); // OK fn g2(_: u8); // OK diff --git a/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.rs b/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.rs index 588fecbf10dd5..9d55caa5c3da0 100644 --- a/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.rs +++ b/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.rs @@ -4,10 +4,22 @@ fn main() { match 0.0 { 0.0..=1.0 => {} + //~^ WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error + //~| WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error _ => {} // ok } match 0.0 { //~ ERROR non-exhaustive patterns 0.0..=1.0 => {} + //~^ WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error + //~| WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error } } diff --git a/src/test/ui/non-exhaustive/non-exhaustive-match.rs b/src/test/ui/non-exhaustive/non-exhaustive-match.rs index e888bcf516891..174b07dccf96e 100644 --- a/src/test/ui/non-exhaustive/non-exhaustive-match.rs +++ b/src/test/ui/non-exhaustive/non-exhaustive-match.rs @@ -46,8 +46,26 @@ fn main() { let vec: &[f32] = &vec; match *vec { //~ ERROR non-exhaustive patterns: `[_, _, _, _]` not covered [0.1, 0.2, 0.3] => (), + //~^ WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error + //~| WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error + //~| WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error [0.1, 0.2] => (), + //~^ WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error + //~| WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error [0.1] => (), + //~^ WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN hard error [] => () } let vec = vec![Some(42), None, Some(21)]; diff --git a/src/test/ui/privacy/legacy-ctor-visibility.rs b/src/test/ui/privacy/legacy-ctor-visibility.rs index 7db4be729e8fa..985fcd7806614 100644 --- a/src/test/ui/privacy/legacy-ctor-visibility.rs +++ b/src/test/ui/privacy/legacy-ctor-visibility.rs @@ -13,6 +13,7 @@ mod m { S(10); //~^ ERROR private struct constructors are not usable through re-exports in outer modules //~| WARN this was previously accepted + //~| WARN hard error } } } diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.rs b/src/test/ui/privacy/private-in-public-assoc-ty.rs index 81d23959fd4ad..6b02fd76fa25b 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.rs +++ b/src/test/ui/privacy/private-in-public-assoc-ty.rs @@ -15,8 +15,10 @@ mod m { pub trait PubTr { //~^ WARN private trait `m::PrivTr` in public interface //~| WARN this was previously accepted + //~| WARN hard error //~| WARN private type `m::Priv` in public interface //~| WARN this was previously accepted + //~| WARN hard error type Alias1: PrivTr; type Alias2: PubTrAux1 = u8; type Alias3: PubTrAux2 = u8; diff --git a/src/test/ui/privacy/private-in-public-non-principal.rs b/src/test/ui/privacy/private-in-public-non-principal.rs index 5de5a685208cd..d48c6c58df645 100644 --- a/src/test/ui/privacy/private-in-public-non-principal.rs +++ b/src/test/ui/privacy/private-in-public-non-principal.rs @@ -6,6 +6,7 @@ auto trait PrivNonPrincipal {} pub fn leak_dyn_nonprincipal() -> Box { loop {} } //~^ WARN private trait `PrivNonPrincipal` in public interface //~| WARN this was previously accepted +//~| WARN hard error #[deny(missing_docs)] fn container() { diff --git a/src/test/ui/privacy/private-in-public-warn.rs b/src/test/ui/privacy/private-in-public-warn.rs index 467b83746702b..7a88f78f9a252 100644 --- a/src/test/ui/privacy/private-in-public-warn.rs +++ b/src/test/ui/privacy/private-in-public-warn.rs @@ -13,29 +13,38 @@ mod types { } pub type Alias = Priv; //~ ERROR private type `types::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error pub enum E { V1(Priv), //~ ERROR private type `types::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error V2 { field: Priv }, //~ ERROR private type `types::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error } pub trait Tr { const C: Priv = Priv; //~ ERROR private type `types::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error type Alias = Priv; //~ ERROR private type `types::Priv` in public interface fn f1(arg: Priv) {} //~ ERROR private type `types::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error fn f2() -> Priv { panic!() } //~ ERROR private type `types::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error } extern { pub static ES: Priv; //~ ERROR private type `types::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error pub fn ef1(arg: Priv); //~ ERROR private type `types::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error pub fn ef2() -> Priv; //~ ERROR private type `types::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error } impl PubTr for Pub { type Alias = Priv; //~ ERROR private type `types::Priv` in public interface @@ -48,23 +57,30 @@ mod traits { pub trait PubTr {} pub type Alias = T; //~ ERROR private trait `traits::PrivTr` in public interface - //~| WARNING hard error - //~| WARNING bounds on generic parameters are not enforced in type aliases + //~^ WARNING this was previously accepted + //~| WARNING hard error + //~| WARNING bounds on generic parameters are not enforced in type aliases pub trait Tr1: PrivTr {} //~ ERROR private trait `traits::PrivTr` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error pub trait Tr2 {} //~ ERROR private trait `traits::PrivTr` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error pub trait Tr3 { //~^ ERROR private trait `traits::PrivTr` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error type Alias: PrivTr; fn f(arg: T) {} //~ ERROR private trait `traits::PrivTr` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error } impl Pub {} //~ ERROR private trait `traits::PrivTr` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error impl PubTr for Pub {} //~ ERROR private trait `traits::PrivTr` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error } mod traits_where { @@ -74,21 +90,26 @@ mod traits_where { pub type Alias where T: PrivTr = T; //~^ ERROR private trait `traits_where::PrivTr` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error //~| WARNING where clauses are not enforced in type aliases pub trait Tr2 where T: PrivTr {} //~^ ERROR private trait `traits_where::PrivTr` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error pub trait Tr3 { fn f(arg: T) where T: PrivTr {} //~^ ERROR private trait `traits_where::PrivTr` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error } impl Pub where T: PrivTr {} //~^ ERROR private trait `traits_where::PrivTr` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error impl PubTr for Pub where T: PrivTr {} //~^ ERROR private trait `traits_where::PrivTr` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error } @@ -100,13 +121,17 @@ mod generics { pub trait Tr1: PrivTr {} //~^ ERROR private trait `generics::PrivTr` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error pub trait Tr2: PubTr {} //~ ERROR private type `generics::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error pub trait Tr3: PubTr<[Priv; 1]> {} //~ ERROR private type `generics::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error pub trait Tr4: PubTr> {} //~ ERROR private type `generics::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error } mod impls { @@ -204,7 +229,8 @@ mod aliases_pub { impl PrivAlias { pub fn f(arg: Priv) {} //~ ERROR private type `aliases_pub::Priv` in public interface - //~^ WARNING hard error + //~^ WARNING this was previously accepted + //~| WARNING hard error } impl PrivUseAliasTr for PrivUseAlias { type Check = Priv; //~ ERROR private type `aliases_pub::Priv` in public interface @@ -248,11 +274,14 @@ mod aliases_priv { pub trait Tr1: PrivUseAliasTr {} //~^ ERROR private trait `aliases_priv::PrivTr1` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error pub trait Tr2: PrivUseAliasTr {} //~^ ERROR private trait `aliases_priv::PrivTr1` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error //~| ERROR private type `aliases_priv::Priv2` in public interface + //~| WARNING this was previously accepted //~| WARNING hard error impl PrivUseAlias { diff --git a/src/test/ui/proc-macro/generate-mod.rs b/src/test/ui/proc-macro/generate-mod.rs index e5f967416c922..3115cf356ad6d 100644 --- a/src/test/ui/proc-macro/generate-mod.rs +++ b/src/test/ui/proc-macro/generate-mod.rs @@ -16,14 +16,18 @@ struct S; #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside` in this scope //~| WARN cannot find type `OuterDerive` in this scope //~| WARN this was previously accepted + //~| WARN it will become a hard error //~| WARN this was previously accepted + //~| WARN it will become a hard error struct Z; fn inner_block() { #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside` in this scope //~| WARN cannot find type `OuterDerive` in this scope //~| WARN this was previously accepted + //~| WARN it will become a hard error //~| WARN this was previously accepted + //~| WARN it will become a hard error struct InnerZ; } diff --git a/src/test/ui/pub/pub-reexport-priv-extern-crate.rs b/src/test/ui/pub/pub-reexport-priv-extern-crate.rs index e95d6924026ca..8a945305075a7 100644 --- a/src/test/ui/pub/pub-reexport-priv-extern-crate.rs +++ b/src/test/ui/pub/pub-reexport-priv-extern-crate.rs @@ -3,6 +3,7 @@ extern crate core; pub use core as reexported_core; //~ ERROR `core` is private, and cannot be re-exported //~^ WARN this was previously accepted + //~| WARN hard error mod foo1 { extern crate core; @@ -11,6 +12,7 @@ mod foo1 { mod foo2 { use foo1::core; //~ ERROR `core` is private, and cannot be re-exported //~^ WARN this was previously accepted + //~| WARN hard error pub mod bar { extern crate core; } @@ -19,6 +21,7 @@ mod foo2 { mod baz { pub use foo2::bar::core; //~ ERROR `core` is private, and cannot be re-exported //~^ WARN this was previously accepted + //~| WARN hard error } fn main() {} diff --git a/src/test/ui/rfc1445/match-forbidden-without-eq.rs b/src/test/ui/rfc1445/match-forbidden-without-eq.rs index 78d799e2b01db..83a663c11a13b 100644 --- a/src/test/ui/rfc1445/match-forbidden-without-eq.rs +++ b/src/test/ui/rfc1445/match-forbidden-without-eq.rs @@ -18,8 +18,9 @@ fn main() { let x = 0.0; match x { f32::INFINITY => { } - //~^ WARNING floating-point types cannot be used in patterns - //~| WARNING will become a hard error in a future release + //~^ WARN floating-point types cannot be used in patterns + //~| WARN this was previously accepted + //~| WARN will become a hard error in a future release _ => { } } } diff --git a/src/test/ui/rust-2018/async-ident-allowed.rs b/src/test/ui/rust-2018/async-ident-allowed.rs index 9d961214afc07..525104574bf97 100644 --- a/src/test/ui/rust-2018/async-ident-allowed.rs +++ b/src/test/ui/rust-2018/async-ident-allowed.rs @@ -7,5 +7,6 @@ fn main() { let async = 3; //~ ERROR: is a keyword - //~^ WARN previously accepted + //~^ WARN this was previously accepted + //~| WARN hard error in the 2018 edition } diff --git a/src/test/ui/rust-2018/async-ident.rs b/src/test/ui/rust-2018/async-ident.rs index 6e8d33d237d52..90c7295fdea07 100644 --- a/src/test/ui/rust-2018/async-ident.rs +++ b/src/test/ui/rust-2018/async-ident.rs @@ -5,19 +5,23 @@ // run-rustfix fn async() {} //~ ERROR async -//~^ WARN hard error in the 2018 edition +//~^ WARN this was previously accepted +//~| WARN hard error in the 2018 edition macro_rules! foo { ($foo:ident) => {}; ($async:expr, async) => {}; //~^ ERROR async //~| ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } foo!(async); //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition mod dont_lint_raw { @@ -27,40 +31,49 @@ mod dont_lint_raw { mod async_trait { trait async {} //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition struct MyStruct; impl async for MyStruct {} //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } mod async_static { static async: u32 = 0; //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } mod async_const { const async: u32 = 0; //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } struct Foo; impl Foo { fn async() {} } //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition fn main() { struct async {} //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition let async: async = async {}; //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition //~| ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition //~| ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } @@ -68,6 +81,7 @@ fn main() { macro_rules! produces_async { () => (pub fn async() {}) //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } @@ -75,5 +89,6 @@ macro_rules! produces_async { macro_rules! consumes_async { (async) => (1) //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } diff --git a/src/test/ui/rust-2018/dyn-keyword.rs b/src/test/ui/rust-2018/dyn-keyword.rs index bdd3a90cab9ec..6fc21cd26f6de 100644 --- a/src/test/ui/rust-2018/dyn-keyword.rs +++ b/src/test/ui/rust-2018/dyn-keyword.rs @@ -6,5 +6,6 @@ fn main() { let dyn = (); //~ ERROR dyn - //~^ WARN hard error in the 2018 edition + //~^ WARN this was previously accepted + //~| WARN hard error in the 2018 edition } diff --git a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs b/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs index ace90a180d65f..f4b04f7608cad 100644 --- a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs +++ b/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs @@ -19,9 +19,11 @@ mod foo { fn main() { let _: ::Bar = (); //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| WARN this was previously accepted + //~| WARN it will become a hard error let _: <::foo::Baz as foo::Foo>::Bar = (); //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| WARN this was previously accepted + //~| WARN it will become a hard error } diff --git a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs b/src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs index 69bd4e3a187e6..f1b6fb34378ed 100644 --- a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs +++ b/src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs @@ -17,14 +17,17 @@ crate mod foo { use foo::{bar::{baz::{}}}; //~^ ERROR absolute paths must start with //~| WARN this was previously accepted +//~| WARN it will become a hard error use foo::{bar::{XX, baz::{}}}; //~^ ERROR absolute paths must start with //~| WARN this was previously accepted +//~| WARN it will become a hard error use foo::{bar::{baz::{}, baz1::{}}}; //~^ ERROR absolute paths must start with //~| WARN this was previously accepted +//~| WARN it will become a hard error fn main() { } diff --git a/src/test/ui/rust-2018/edition-lint-nested-paths.rs b/src/test/ui/rust-2018/edition-lint-nested-paths.rs index e13b7d0086406..2e7c26fd8d2ce 100644 --- a/src/test/ui/rust-2018/edition-lint-nested-paths.rs +++ b/src/test/ui/rust-2018/edition-lint-nested-paths.rs @@ -5,7 +5,8 @@ use foo::{a, b}; //~^ ERROR absolute paths must start with -//~| this was previously accepted +//~| WARN this was previously accepted +//~| WARN it will become a hard error mod foo { crate fn a() {} @@ -20,7 +21,8 @@ fn main() { { use foo::{self as x, c}; //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| WARN this was previously accepted + //~| WARN it will become a hard error x::a(); c(); } diff --git a/src/test/ui/rust-2018/edition-lint-paths.rs b/src/test/ui/rust-2018/edition-lint-paths.rs index c5b4be5a3acf9..9c8d145748f82 100644 --- a/src/test/ui/rust-2018/edition-lint-paths.rs +++ b/src/test/ui/rust-2018/edition-lint-paths.rs @@ -12,17 +12,20 @@ pub mod foo { use ::bar::Bar; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error use super::bar::Bar2; use crate::bar::Bar3; use bar; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error use crate::{bar as something_else}; use {Bar as SomethingElse, main}; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error use crate::{Bar as SomethingElse2, main as another_main}; @@ -35,6 +38,7 @@ pub mod foo { use bar::Bar; //~^ ERROR absolute //~| WARN this was previously accepted +//~| WARN it will become a hard error pub mod bar { use edition_lint_paths as foo; @@ -47,16 +51,19 @@ mod baz { use *; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error } impl ::foo::SomeTrait for u32 { } //~^ ERROR absolute //~| WARN this was previously accepted +//~| WARN it will become a hard error fn main() { let x = ::bar::Bar; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error let x = bar::Bar; let x = crate::bar::Bar; let x = self::bar::Bar; diff --git a/src/test/ui/rust-2018/extern-crate-rename.rs b/src/test/ui/rust-2018/extern-crate-rename.rs index 98c7d341bff22..3cb8dbe0497ac 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.rs +++ b/src/test/ui/rust-2018/extern-crate-rename.rs @@ -12,8 +12,8 @@ extern crate edition_lint_paths as my_crate; use my_crate::foo; //~^ ERROR absolute paths must start //~| WARNING this was previously accepted +//~| WARN it will become a hard error fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-submod.rs b/src/test/ui/rust-2018/extern-crate-submod.rs index 206f3903b4716..d5fd40eb3569e 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.rs +++ b/src/test/ui/rust-2018/extern-crate-submod.rs @@ -19,8 +19,8 @@ mod m { use m::edition_lint_paths::foo; //~^ ERROR absolute paths must start //~| WARNING this was previously accepted +//~| WARN it will become a hard error fn main() { foo(); } - diff --git a/src/test/ui/safe-extern-statics.rs b/src/test/ui/safe-extern-statics.rs index eda309444681b..44a3fe15a646b 100644 --- a/src/test/ui/safe-extern-statics.rs +++ b/src/test/ui/safe-extern-statics.rs @@ -12,10 +12,14 @@ extern { fn main() { let a = A; //~ ERROR use of extern static is unsafe //~^ WARN this was previously accepted by the compiler + //~| WARN it will become a hard error let ra = &A; //~ ERROR use of extern static is unsafe //~^ WARN this was previously accepted by the compiler + //~| WARN it will become a hard error let xa = XA; //~ ERROR use of extern static is unsafe //~^ WARN this was previously accepted by the compiler + //~| WARN it will become a hard error let xra = &XA; //~ ERROR use of extern static is unsafe //~^ WARN this was previously accepted by the compiler + //~| WARN it will become a hard error } diff --git a/src/test/ui/type-alias-enum-variants-priority.rs b/src/test/ui/type-alias-enum-variants-priority.rs index db1da2b12e256..3ed1a03a3c3f2 100644 --- a/src/test/ui/type-alias-enum-variants-priority.rs +++ b/src/test/ui/type-alias-enum-variants-priority.rs @@ -14,6 +14,7 @@ impl Tr for E { type V = u8; fn f() -> Self::V { 0 } //~^ ERROR ambiguous associated item + //~| WARN it will become a hard error //~| WARN this was previously accepted } From 6b13fadf3f963bc903a8ad7d3c20a5f964fe453e Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sun, 7 Apr 2019 20:38:03 +0200 Subject: [PATCH 6/6] minimum-lint-levels: --bless tests. --- .../vec-matching-autoslice.stderr | 54 ++++++ src/test/run-pass/binding/match-range.stderr | 124 +++++++++++++ .../issue-15881-model-lexer-dotdotdot.stderr | 84 +++++++++ src/test/run-pass/issues/issue-7222.stderr | 64 +++++++ .../union/union-pat-refutability.stderr | 54 ++++++ src/test/ui/anon-params-deprecated.stderr | 9 +- .../await-keyword/2015-edition-warning.fixed | 6 + .../await-keyword/2015-edition-warning.stderr | 28 +-- .../derives/deriving-with-repr-packed.stderr | 16 +- .../dyn-2015-edition-keyword-ident-lint.fixed | 14 ++ ...dyn-2015-edition-keyword-ident-lint.stderr | 68 +++++--- .../edition-raw-pointer-method-2015.stderr | 3 +- .../issue-43106-gating-of-inline.stderr | 9 +- ...ate-default_type_parameter_fallback.stderr | 8 +- .../ui/future-incompatible-lint-group.stderr | 3 +- .../issue-57979-impl-trait-in-path.stderr | 10 +- ...979-nested-impl-trait-in-assoc-proj.stderr | 10 +- .../local-modularized-tricky-fail-3.stderr | 8 +- ...ference-variable-behind-raw-pointer.stderr | 3 +- src/test/ui/issues/issue-27060.stderr | 8 +- src/test/ui/issues/issue-30079.stderr | 7 +- src/test/ui/issues/issue-32995-2.stderr | 13 +- src/test/ui/issues/issue-32995.stderr | 33 ++-- .../issue-33140-traitobject-crate.stderr | 9 +- src/test/ui/issues/issue-38715.stderr | 3 +- src/test/ui/issues/issue-39404.stderr | 3 +- src/test/ui/issues/issue-41255.stderr | 43 +++-- src/test/ui/issues/issue-43355.stderr | 3 +- src/test/ui/issues/issue-50781.stderr | 3 +- src/test/ui/issues/issue-6804.stderr | 8 +- .../lint-incoherent-auto-trait-objects.stderr | 13 +- ...acro-at-most-once-rep-2015-ques-sep.stderr | 6 +- .../macro-multiple-matcher-bindings.stderr | 12 +- .../ui/malformed/malformed-regressions.stderr | 15 +- .../ui/match/match-range-fail-dominate.stderr | 9 +- ...method-call-lifetime-args-lint-fail.stderr | 73 +++++--- .../method-call-lifetime-args-lint.stderr | 8 +- src/test/ui/no-patterns-in-args-2.stderr | 5 +- .../non-exhaustive-float-range-match.stderr | 49 +++++- .../non-exhaustive-match.stderr | 67 +++++++ .../ui/privacy/legacy-ctor-visibility.stderr | 3 +- .../privacy/private-in-public-assoc-ty.stderr | 12 +- .../private-in-public-non-principal.stderr | 7 +- .../ui/privacy/private-in-public-warn.stderr | 165 ++++++++++-------- src/test/ui/proc-macro/generate-mod.stderr | 16 +- .../pub/pub-reexport-priv-extern-crate.stderr | 13 +- .../rfc1445/match-forbidden-without-eq.stderr | 3 +- .../ui/rust-2018/async-ident-allowed.stderr | 3 +- src/test/ui/rust-2018/async-ident.fixed | 17 +- src/test/ui/rust-2018/async-ident.stderr | 73 +++++--- src/test/ui/rust-2018/dyn-keyword.fixed | 3 +- src/test/ui/rust-2018/dyn-keyword.stderr | 3 +- .../edition-lint-fully-qualified-paths.fixed | 6 +- .../edition-lint-fully-qualified-paths.stderr | 8 +- .../edition-lint-nested-empty-paths.fixed | 3 + .../edition-lint-nested-empty-paths.stderr | 13 +- .../rust-2018/edition-lint-nested-paths.fixed | 6 +- .../edition-lint-nested-paths.stderr | 8 +- .../ui/rust-2018/edition-lint-paths.fixed | 7 + .../ui/rust-2018/edition-lint-paths.stderr | 33 ++-- .../ui/rust-2018/extern-crate-rename.fixed | 2 +- .../ui/rust-2018/extern-crate-rename.stderr | 3 +- .../ui/rust-2018/extern-crate-submod.fixed | 2 +- .../ui/rust-2018/extern-crate-submod.stderr | 3 +- .../suggestions-not-always-applicable.stderr | 6 +- src/test/ui/rust-2018/try-ident.stderr | 6 +- src/test/ui/rust-2018/try-macro.stderr | 3 +- src/test/ui/safe-extern-statics.stderr | 18 +- .../type-alias-enum-variants-priority.stderr | 3 +- 69 files changed, 1073 insertions(+), 340 deletions(-) create mode 100644 src/test/run-pass/array-slice-vec/vec-matching-autoslice.stderr create mode 100644 src/test/run-pass/binding/match-range.stderr create mode 100644 src/test/run-pass/issues/issue-15881-model-lexer-dotdotdot.stderr create mode 100644 src/test/run-pass/issues/issue-7222.stderr create mode 100644 src/test/run-pass/union/union-pat-refutability.stderr diff --git a/src/test/run-pass/array-slice-vec/vec-matching-autoslice.stderr b/src/test/run-pass/array-slice-vec/vec-matching-autoslice.stderr new file mode 100644 index 0000000000000..351f222ab7f31 --- /dev/null +++ b/src/test/run-pass/array-slice-vec/vec-matching-autoslice.stderr @@ -0,0 +1,54 @@ +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/vec-matching-autoslice.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: #[warn(unused_attributes)] on by default + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/vec-matching-autoslice.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/vec-matching-autoslice.rs:20:18 + | +LL | ([_, _], 0.5) => panic!(), + | ^^^ + | +note: lint level defined here + --> $DIR/vec-matching-autoslice.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + = note: the lint level cannot be reduced to `allow` + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/vec-matching-autoslice.rs:20:18 + | +LL | ([_, _], 0.5) => panic!(), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + diff --git a/src/test/run-pass/binding/match-range.stderr b/src/test/run-pass/binding/match-range.stderr new file mode 100644 index 0000000000000..a4b382d4d7b2e --- /dev/null +++ b/src/test/run-pass/binding/match-range.stderr @@ -0,0 +1,124 @@ +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/match-range.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: #[warn(unused_attributes)] on by default + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/match-range.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range.rs:36:7 + | +LL | 1.0..=5.0 => {} + | ^^^ + | +note: lint level defined here + --> $DIR/match-range.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + = note: the lint level cannot be reduced to `allow` + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range.rs:36:13 + | +LL | 1.0..=5.0 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range.rs:40:8 + | +LL | -3.6..=3.6 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range.rs:40:14 + | +LL | -3.6..=3.6 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range.rs:44:9 + | +LL | 0.0..3.5 => panic!("should not match the range end"), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range.rs:44:14 + | +LL | 0.0..3.5 => panic!("should not match the range end"), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range.rs:48:9 + | +LL | 0.0..3.5 => {}, + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range.rs:48:14 + | +LL | 0.0..3.5 => {}, + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range.rs:36:7 + | +LL | 1.0..=5.0 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + diff --git a/src/test/run-pass/issues/issue-15881-model-lexer-dotdotdot.stderr b/src/test/run-pass/issues/issue-15881-model-lexer-dotdotdot.stderr new file mode 100644 index 0000000000000..7c04468792db6 --- /dev/null +++ b/src/test/run-pass/issues/issue-15881-model-lexer-dotdotdot.stderr @@ -0,0 +1,84 @@ +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/issue-15881-model-lexer-dotdotdot.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: #[warn(unused_attributes)] on by default + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/issue-15881-model-lexer-dotdotdot.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/issue-15881-model-lexer-dotdotdot.rs:30:7 + | +LL | 1.0...5.0 => {} + | ^^^ + | +note: lint level defined here + --> $DIR/issue-15881-model-lexer-dotdotdot.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + = note: the lint level cannot be reduced to `allow` + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/issue-15881-model-lexer-dotdotdot.rs:30:13 + | +LL | 1.0...5.0 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/issue-15881-model-lexer-dotdotdot.rs:34:8 + | +LL | -3.6...3.6 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/issue-15881-model-lexer-dotdotdot.rs:34:14 + | +LL | -3.6...3.6 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/issue-15881-model-lexer-dotdotdot.rs:30:7 + | +LL | 1.0...5.0 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + diff --git a/src/test/run-pass/issues/issue-7222.stderr b/src/test/run-pass/issues/issue-7222.stderr new file mode 100644 index 0000000000000..749fffac0deff --- /dev/null +++ b/src/test/run-pass/issues/issue-7222.stderr @@ -0,0 +1,64 @@ +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/issue-7222.rs:3:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: #[warn(unused_attributes)] on by default + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/issue-7222.rs:3:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/issue-7222.rs:9:9 + | +LL | 0.0 ..= FOO => (), + | ^^^ + | +note: lint level defined here + --> $DIR/issue-7222.rs:3:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] // FIXME #41620 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + = note: the lint level cannot be reduced to `allow` + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/issue-7222.rs:9:17 + | +LL | 0.0 ..= FOO => (), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/issue-7222.rs:9:9 + | +LL | 0.0 ..= FOO => (), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + diff --git a/src/test/run-pass/union/union-pat-refutability.stderr b/src/test/run-pass/union/union-pat-refutability.stderr new file mode 100644 index 0000000000000..1b3b21cbf0481 --- /dev/null +++ b/src/test/run-pass/union/union-pat-refutability.stderr @@ -0,0 +1,54 @@ +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/union-pat-refutability.rs:3:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: #[warn(unused_attributes)] on by default + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: #[allow(illegal_floating_point_literal_pattern)] has no effect + --> $DIR/union-pat-refutability.rs:3:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: the minimum lint level for `illegal_floating_point_literal_pattern` is `warn` + = note: the lint level cannot be reduced to `allow` + = help: remove the #[allow(illegal_floating_point_literal_pattern)] directive + = warning: `illegal_floating_point_literal_pattern` was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/union-pat-refutability.rs:24:44 + | +LL | Value { tag: Tag::F, u: U { f: 0.0 } } => true, + | ^^^ + | +note: lint level defined here + --> $DIR/union-pat-refutability.rs:3:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + = note: the lint level cannot be reduced to `allow` + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/union-pat-refutability.rs:24:44 + | +LL | Value { tag: Tag::F, u: U { f: 0.0 } } => true, + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + diff --git a/src/test/ui/anon-params-deprecated.stderr b/src/test/ui/anon-params-deprecated.stderr index e97dbc15f9cde..114748f7cfe59 100644 --- a/src/test/ui/anon-params-deprecated.stderr +++ b/src/test/ui/anon-params-deprecated.stderr @@ -9,7 +9,8 @@ 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 the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: 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 +19,8 @@ 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 the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: 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 +29,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 the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #41686 diff --git a/src/test/ui/await-keyword/2015-edition-warning.fixed b/src/test/ui/await-keyword/2015-edition-warning.fixed index c58496c91f513..8a1e8df6bede6 100644 --- a/src/test/ui/await-keyword/2015-edition-warning.fixed +++ b/src/test/ui/await-keyword/2015-edition-warning.fixed @@ -7,21 +7,27 @@ mod outer_mod { pub mod r#await { //~^ ERROR `await` is a keyword //~| WARN was previously accepted +//~| WARN hard error pub struct r#await; //~^ ERROR `await` is a keyword //~| WARN was previously accepted +//~| WARN hard error } } use outer_mod::r#await::r#await; //~^ ERROR `await` is a keyword //~| ERROR `await` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| WARN was previously accepted +//~| WARN hard error fn main() { match r#await { r#await => {} } //~^ ERROR `await` is a keyword //~| ERROR `await` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| WARN was previously accepted +//~| WARN hard error } diff --git a/src/test/ui/await-keyword/2015-edition-warning.stderr b/src/test/ui/await-keyword/2015-edition-warning.stderr index d9ae1b9a167a6..18a149809d57b 100644 --- a/src/test/ui/await-keyword/2015-edition-warning.stderr +++ b/src/test/ui/await-keyword/2015-edition-warning.stderr @@ -9,52 +9,58 @@ note: lint level defined here | LL | #![deny(keyword_idents)] | ^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-warning.rs:10:20 + --> $DIR/2015-edition-warning.rs:11:20 | LL | pub struct await; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-warning.rs:15:16 + --> $DIR/2015-edition-warning.rs:17:16 | LL | use outer_mod::await::await; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-warning.rs:15:23 + --> $DIR/2015-edition-warning.rs:17:23 | LL | use outer_mod::await::await; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-warning.rs:22:11 + --> $DIR/2015-edition-warning.rs:26:11 | LL | match await { await => {} } | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-warning.rs:22:19 + --> $DIR/2015-edition-warning.rs:26:19 | LL | match await { await => {} } | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: aborting due to 6 previous errors diff --git a/src/test/ui/derives/deriving-with-repr-packed.stderr b/src/test/ui/derives/deriving-with-repr-packed.stderr index 9d96908a05620..66724949d40ab 100644 --- a/src/test/ui/derives/deriving-with-repr-packed.stderr +++ b/src/test/ui/derives/deriving-with-repr-packed.stderr @@ -9,7 +9,8 @@ note: lint level defined here | LL | #![deny(safe_packed_borrows)] | ^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #46043 error: #[derive] can't be used on a #[repr(packed)] struct with type or const parameters (error E0133) @@ -18,25 +19,28 @@ error: #[derive] can't be used on a #[repr(packed)] struct with type or const pa LL | #[derive(Copy, Clone, PartialEq, Eq)] | ^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #46043 error: #[derive] can't be used on a #[repr(packed)] struct that does not derive Copy (error E0133) - --> $DIR/deriving-with-repr-packed.rs:16:10 + --> $DIR/deriving-with-repr-packed.rs:18:10 | LL | #[derive(PartialEq, Eq)] | ^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #46043 error: #[derive] can't be used on a #[repr(packed)] struct that does not derive Copy (error E0133) - --> $DIR/deriving-with-repr-packed.rs:25:10 + --> $DIR/deriving-with-repr-packed.rs:28:10 | LL | #[derive(PartialEq)] | ^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #46043 error: aborting due to 4 previous errors diff --git a/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed b/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed index 003736208ed38..ddf5fd8d2e76b 100644 --- a/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed +++ b/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed @@ -13,26 +13,33 @@ mod outer_mod { pub mod r#dyn { //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error pub struct r#dyn; //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error } } use outer_mod::r#dyn::r#dyn; //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error fn main() { match r#dyn { r#dyn => {} } //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error macro_defn::r#dyn(); //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error macro_defn::boxed(); } @@ -43,6 +50,7 @@ mod macro_defn { macro_rules! r#dyn { //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error // Note that we do not lint nor fix occurrences under macros ($dyn:tt) => { (Box, Box<$dyn Trait>) } @@ -51,15 +59,20 @@ mod macro_defn { pub fn r#dyn() -> ::outer_mod::r#dyn::r#dyn { //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error ::outer_mod::r#dyn::r#dyn //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error //~| ERROR `dyn` is a keyword //~| WARN was previously accepted +//~| WARN hard error } @@ -67,6 +80,7 @@ mod macro_defn { pub fn boxed() -> r#dyn!( //~^ ERROR `dyn` is a keyword //~| WARN was previously accepted + //~| WARN hard error // Note that we do not lint nor fix occurrences under macros dyn diff --git a/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.stderr b/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.stderr index 361727733bc57..f9207bb64806c 100644 --- a/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.stderr +++ b/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.stderr @@ -9,124 +9,138 @@ note: lint level defined here | LL | #![deny(keyword_idents)] | ^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:16:20 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:17:20 | LL | pub struct dyn; | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:21:16 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:23:16 | LL | use outer_mod::dyn::dyn; | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:21:21 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:23:21 | LL | use outer_mod::dyn::dyn; | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:28:11 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:32:11 | LL | match dyn { dyn => {} } | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:28:17 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:32:17 | LL | match dyn { dyn => {} } | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:33:17 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:39:17 | LL | macro_defn::dyn(); | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:43:18 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:50:18 | LL | macro_rules! dyn { | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:51:12 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:59:12 | LL | pub fn dyn() -> ::outer_mod::dyn::dyn { | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:51:34 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:59:34 | LL | pub fn dyn() -> ::outer_mod::dyn::dyn { | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:51:39 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:59:39 | LL | pub fn dyn() -> ::outer_mod::dyn::dyn { | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:58:22 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:69:22 | LL | ::outer_mod::dyn::dyn | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:58:27 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:69:27 | LL | ::outer_mod::dyn::dyn | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:67:23 + --> $DIR/dyn-2015-edition-keyword-ident-lint.rs:80:23 | LL | pub fn boxed() -> dyn!( | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: aborting due to 14 previous errors diff --git a/src/test/ui/editions/edition-raw-pointer-method-2015.stderr b/src/test/ui/editions/edition-raw-pointer-method-2015.stderr index deea6a71b24f3..848c535b5b1a0 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2015.stderr +++ b/src/test/ui/editions/edition-raw-pointer-method-2015.stderr @@ -10,7 +10,8 @@ note: lint level defined here LL | #[deny(warnings)] | ^^^^^^^^ = note: #[deny(tyvar_behind_raw_pointer)] implied by #[deny(warnings)] - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #46906 error: aborting due to previous error diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr index ef89a887fd44d..a1034de5ceea8 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr @@ -5,7 +5,8 @@ LL | #[inline = "2100"] fn f() { } | ^^^^^^^^^^^^^^^^^^ | = note: #[warn(ill_formed_attribute_input)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57571 error[E0518]: attribute should be applied to function or closure @@ -30,19 +31,19 @@ LL | mod inner { #![inline] } | ------------^^^^^^^^^^-- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-inline.rs:21:5 + --> $DIR/issue-43106-gating-of-inline.rs:22:5 | LL | #[inline] struct S; | ^^^^^^^^^ --------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-inline.rs:24:5 + --> $DIR/issue-43106-gating-of-inline.rs:25:5 | LL | #[inline] type T = S; | ^^^^^^^^^ ----------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-inline.rs:27:5 + --> $DIR/issue-43106-gating-of-inline.rs:28:5 | LL | #[inline] impl S { } | ^^^^^^^^^ ---------- not a function or closure diff --git a/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr index ac8cd101767f4..666c3afcff1f6 100644 --- a/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr +++ b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr @@ -5,16 +5,18 @@ LL | fn avg(_: T) {} | ^ | = note: #[deny(invalid_type_param_default)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #36887 error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions. - --> $DIR/feature-gate-default_type_parameter_fallback.rs:8:6 + --> $DIR/feature-gate-default_type_parameter_fallback.rs:9:6 | LL | impl S {} | ^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #36887 error: aborting due to 2 previous errors diff --git a/src/test/ui/future-incompatible-lint-group.stderr b/src/test/ui/future-incompatible-lint-group.stderr index 65c37e01eaa93..eacc00158ac8f 100644 --- a/src/test/ui/future-incompatible-lint-group.stderr +++ b/src/test/ui/future-incompatible-lint-group.stderr @@ -10,7 +10,8 @@ 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 the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: 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/issue-57979-impl-trait-in-path.stderr b/src/test/ui/impl-trait/issue-57979-impl-trait-in-path.stderr index 982ecba291f79..40645c666b619 100644 --- a/src/test/ui/impl-trait/issue-57979-impl-trait-in-path.stderr +++ b/src/test/ui/impl-trait/issue-57979-impl-trait-in-path.stderr @@ -9,21 +9,23 @@ note: lint level defined here | LL | #![warn(nested_impl_trait)] | ^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #59014 error: `impl Trait` is not allowed in path parameters - --> $DIR/issue-57979-impl-trait-in-path.rs:31:52 + --> $DIR/issue-57979-impl-trait-in-path.rs:32:52 | LL | pub fn demo(_: impl Quux<(), Assoc=<() as Quux>::Assoc>) { } | ^^^^^^^^ | note: lint level defined here - --> $DIR/issue-57979-impl-trait-in-path.rs:27:13 + --> $DIR/issue-57979-impl-trait-in-path.rs:28:13 | LL | #![deny(nested_impl_trait)] | ^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #59014 error: aborting due to previous error diff --git a/src/test/ui/impl-trait/issue-57979-nested-impl-trait-in-assoc-proj.stderr b/src/test/ui/impl-trait/issue-57979-nested-impl-trait-in-assoc-proj.stderr index 508aea2432132..236d9d86f443d 100644 --- a/src/test/ui/impl-trait/issue-57979-nested-impl-trait-in-assoc-proj.stderr +++ b/src/test/ui/impl-trait/issue-57979-nested-impl-trait-in-assoc-proj.stderr @@ -12,11 +12,12 @@ note: lint level defined here | LL | #![warn(nested_impl_trait)] | ^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #59014 error: nested `impl Trait` is not allowed - --> $DIR/issue-57979-nested-impl-trait-in-assoc-proj.rs:32:45 + --> $DIR/issue-57979-nested-impl-trait-in-assoc-proj.rs:33:45 | LL | pub fn demo(_: impl Quux>) { } | ---------^^^^^^^^- @@ -25,11 +26,12 @@ LL | pub fn demo(_: impl Quux>) { } | outer `impl Trait` | note: lint level defined here - --> $DIR/issue-57979-nested-impl-trait-in-assoc-proj.rs:27:13 + --> $DIR/issue-57979-nested-impl-trait-in-assoc-proj.rs:28:13 | LL | #![deny(nested_impl_trait)] | ^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #59014 error: aborting due to previous error diff --git a/src/test/ui/imports/local-modularized-tricky-fail-3.stderr b/src/test/ui/imports/local-modularized-tricky-fail-3.stderr index 6bece2b17cecf..348fb698816eb 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-3.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-3.stderr @@ -5,7 +5,8 @@ LL | use exported; | ^^^^^^^^ | = note: #[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #52234 note: the macro is defined here --> $DIR/local-modularized-tricky-fail-3.rs:5:5 @@ -19,12 +20,13 @@ LL | define_exported!(); | ------------------- in this macro invocation error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths - --> $DIR/local-modularized-tricky-fail-3.rs:19:5 + --> $DIR/local-modularized-tricky-fail-3.rs:20:5 | LL | ::exported!(); | ^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #52234 note: the macro is defined here --> $DIR/local-modularized-tricky-fail-3.rs:5:5 diff --git a/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr b/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr index 52cf68ae2a6d1..1b6b94951c144 100644 --- a/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr +++ b/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr @@ -5,6 +5,7 @@ LL | if data.is_null() {} | ^^^^^^^ | = note: #[warn(tyvar_behind_raw_pointer)] on by default - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #46906 diff --git a/src/test/ui/issues/issue-27060.stderr b/src/test/ui/issues/issue-27060.stderr index bc44c1a4ac571..97fc3823e1b3e 100644 --- a/src/test/ui/issues/issue-27060.stderr +++ b/src/test/ui/issues/issue-27060.stderr @@ -9,17 +9,19 @@ note: lint level defined here | LL | #[deny(safe_packed_borrows)] | ^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #46043 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior error: borrow of packed field is unsafe and requires unsafe function or block (error E0133) - --> $DIR/issue-27060.rs:28:13 + --> $DIR/issue-27060.rs:29:13 | LL | let _ = &good.data2[0]; | ^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #46043 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior diff --git a/src/test/ui/issues/issue-30079.stderr b/src/test/ui/issues/issue-30079.stderr index 57ca572154484..a74a344e0c8e4 100644 --- a/src/test/ui/issues/issue-30079.stderr +++ b/src/test/ui/issues/issue-30079.stderr @@ -5,11 +5,12 @@ LL | pub fn f(_: Priv) {} | ^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(private_in_public)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error[E0446]: private type `m2::Priv` in public interface - --> $DIR/issue-30079.rs:18:9 + --> $DIR/issue-30079.rs:19:9 | LL | struct Priv; | - `m2::Priv` declared as private @@ -18,7 +19,7 @@ LL | type Target = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `m3::Priv` in public interface - --> $DIR/issue-30079.rs:35:9 + --> $DIR/issue-30079.rs:36:9 | LL | struct Priv; | - `m3::Priv` declared as private diff --git a/src/test/ui/issues/issue-32995-2.stderr b/src/test/ui/issues/issue-32995-2.stderr index 104b76cba2df9..fe9a24c653e99 100644 --- a/src/test/ui/issues/issue-32995-2.stderr +++ b/src/test/ui/issues/issue-32995-2.stderr @@ -5,25 +5,28 @@ LL | { fn f() {} } | ^^ | = note: #[deny(parenthesized_params_in_types_and_modules)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:8:35 + --> $DIR/issue-32995-2.rs:9:35 | LL | { fn f() -> impl ::std::marker()::Send { } } | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:16:19 + --> $DIR/issue-32995-2.rs:18:19 | LL | impl ::std::marker()::Copy for X {} | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-32995.stderr b/src/test/ui/issues/issue-32995.stderr index 97b4b7fa76ca8..77c18f8598a26 100644 --- a/src/test/ui/issues/issue-32995.stderr +++ b/src/test/ui/issues/issue-32995.stderr @@ -5,61 +5,68 @@ LL | let x: usize() = 1; | ^^ | = note: #[deny(parenthesized_params_in_types_and_modules)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:8:24 + --> $DIR/issue-32995.rs:9:24 | LL | let b: ::std::boxed()::Box<_> = Box::new(1); | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:12:25 + --> $DIR/issue-32995.rs:14:25 | LL | let p = ::std::str::()::from_utf8(b"foo").unwrap(); | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:16:36 + --> $DIR/issue-32995.rs:19:36 | LL | let p = ::std::str::from_utf8::()(b"foo").unwrap(); | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:20:30 + --> $DIR/issue-32995.rs:24:30 | LL | let o : Box<::std::marker()::Send> = Box::new(1); | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:24:37 + --> $DIR/issue-32995.rs:29:37 | LL | let o : Box = Box::new(1); | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:30:14 + --> $DIR/issue-32995.rs:36:14 | LL | let d : X() = Default::default(); | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42238 error: aborting due to 7 previous errors diff --git a/src/test/ui/issues/issue-33140-traitobject-crate.stderr b/src/test/ui/issues/issue-33140-traitobject-crate.stderr index 6f71e79d0ee7a..c82584e5d84b9 100644 --- a/src/test/ui/issues/issue-33140-traitobject-crate.stderr +++ b/src/test/ui/issues/issue-33140-traitobject-crate.stderr @@ -11,7 +11,8 @@ note: lint level defined here | LL | #![warn(order_dependent_trait_objects)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #56484 warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) @@ -22,7 +23,8 @@ LL | unsafe impl Trait for ::std::marker::Send + Send + Sync { } LL | unsafe impl Trait for ::std::marker::Sync + Send { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #56484 warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) @@ -34,6 +36,7 @@ LL | unsafe impl Trait for ::std::marker::Sync + Sync { } LL | unsafe impl Trait for ::std::marker::Sync + Send + Sync { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #56484 diff --git a/src/test/ui/issues/issue-38715.stderr b/src/test/ui/issues/issue-38715.stderr index 34e08bfc93aaf..719a10636b5f4 100644 --- a/src/test/ui/issues/issue-38715.stderr +++ b/src/test/ui/issues/issue-38715.stderr @@ -5,7 +5,8 @@ LL | macro_rules! foo { () => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `foo` already exported | = note: #[deny(duplicate_macro_exports)] on by default - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #35896 note: previous macro export is now shadowed --> $DIR/issue-38715.rs:2:1 diff --git a/src/test/ui/issues/issue-39404.stderr b/src/test/ui/issues/issue-39404.stderr index bffea49362a4d..c6b29c3445003 100644 --- a/src/test/ui/issues/issue-39404.stderr +++ b/src/test/ui/issues/issue-39404.stderr @@ -5,7 +5,8 @@ LL | macro_rules! m { ($i) => {} } | ^^ | = note: #[deny(missing_fragment_specifier)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #40107 error: aborting due to previous error diff --git a/src/test/ui/issues/issue-41255.stderr b/src/test/ui/issues/issue-41255.stderr index 9ccfc9a001605..b99d245519cdf 100644 --- a/src/test/ui/issues/issue-41255.stderr +++ b/src/test/ui/issues/issue-41255.stderr @@ -9,79 +9,88 @@ note: lint level defined here | LL | #![forbid(illegal_floating_point_literal_pattern)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:12:9 + --> $DIR/issue-41255.rs:13:9 | LL | 5.0f32 => {}, | ^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:14:10 + --> $DIR/issue-41255.rs:16:10 | LL | -5.0 => {}, | ^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:16:9 + --> $DIR/issue-41255.rs:19:9 | LL | 1.0 .. 33.0 => {}, | ^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:16:16 + --> $DIR/issue-41255.rs:19:16 | LL | 1.0 .. 33.0 => {}, | ^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:20:9 + --> $DIR/issue-41255.rs:25:9 | LL | 39.0 ..= 70.0 => {}, | ^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:20:18 + --> $DIR/issue-41255.rs:25:18 | LL | 39.0 ..= 70.0 => {}, | ^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:29:10 + --> $DIR/issue-41255.rs:36:10 | LL | (3.14, 1) => {}, | ^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:36:18 + --> $DIR/issue-41255.rs:44:18 | LL | Foo { x: 2.0 } => {}, | ^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: aborting due to 9 previous errors diff --git a/src/test/ui/issues/issue-43355.stderr b/src/test/ui/issues/issue-43355.stderr index 039f10447c072..71da1c7469f6c 100644 --- a/src/test/ui/issues/issue-43355.stderr +++ b/src/test/ui/issues/issue-43355.stderr @@ -8,7 +8,8 @@ LL | impl Trait1> for A { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `A` | = note: #[deny(incoherent_fundamental_impls)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #46205 = note: downstream crates may implement trait `Trait2>` for type `A` diff --git a/src/test/ui/issues/issue-50781.stderr b/src/test/ui/issues/issue-50781.stderr index c98f78c51ee5f..704dc40bcc81e 100644 --- a/src/test/ui/issues/issue-50781.stderr +++ b/src/test/ui/issues/issue-50781.stderr @@ -9,7 +9,8 @@ note: lint level defined here | LL | #![deny(where_clauses_object_safety)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #51443 = note: method `foo` references the `Self` type in where clauses diff --git a/src/test/ui/issues/issue-6804.stderr b/src/test/ui/issues/issue-6804.stderr index 1c251ed8445ff..c80d308d139e2 100644 --- a/src/test/ui/issues/issue-6804.stderr +++ b/src/test/ui/issues/issue-6804.stderr @@ -9,16 +9,18 @@ note: lint level defined here | LL | #![deny(illegal_floating_point_literal_pattern)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-6804.rs:17:10 + --> $DIR/issue-6804.rs:18:10 | LL | [NAN, _] => {}, | ^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr index 928c92ef91655..1e34f86f1856d 100644 --- a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr +++ b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr @@ -8,11 +8,12 @@ LL | impl Foo for dyn Send + Send {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)` | = note: #[deny(order_dependent_trait_objects)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #56484 error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) - --> $DIR/lint-incoherent-auto-trait-objects.rs:13:1 + --> $DIR/lint-incoherent-auto-trait-objects.rs:14:1 | LL | impl Foo for dyn Send + Sync {} | ---------------------------- first implementation here @@ -20,11 +21,12 @@ LL | LL | impl Foo for dyn Sync + Send {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #56484 error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) - --> $DIR/lint-incoherent-auto-trait-objects.rs:17:1 + --> $DIR/lint-incoherent-auto-trait-objects.rs:19:1 | LL | impl Foo for dyn Sync + Send {} | ---------------------------- first implementation here @@ -32,7 +34,8 @@ LL | impl Foo for dyn Sync + Send {} LL | impl Foo for dyn Send + Sync + Send {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #56484 error: aborting due to 3 previous errors diff --git a/src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.stderr b/src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.stderr index bf1861ae54052..d08faf471d637 100644 --- a/src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.stderr +++ b/src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.stderr @@ -10,7 +10,8 @@ note: lint level defined here LL | #![warn(rust_2018_compatibility)] | ^^^^^^^^^^^^^^^^^^^^^^^ = note: #[warn(question_mark_macro_sep)] implied by #[warn(rust_2018_compatibility)] - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #48075 warning: using `?` as a separator is deprecated and will be a hard error in an upcoming edition @@ -19,6 +20,7 @@ warning: using `?` as a separator is deprecated and will be a hard error in an u LL | ($(a)?+) => {} | ^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #48075 diff --git a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr index f7970dbd2eb22..1290bbff2005c 100644 --- a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr +++ b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr @@ -9,7 +9,8 @@ note: lint level defined here | LL | #![warn(duplicate_matcher_binding_name)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57593 warning: duplicate matcher binding @@ -18,7 +19,8 @@ warning: duplicate matcher binding LL | ($a:ident, $a:path) => {}; | ^^^^^^^^ ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57593 warning: duplicate matcher binding @@ -27,7 +29,8 @@ warning: duplicate matcher binding LL | ($a:ident, $($a:ident),*) => {}; | ^^^^^^^^ ^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57593 warning: duplicate matcher binding @@ -36,6 +39,7 @@ warning: duplicate matcher binding LL | ($($a:ident)+ # $($($a:path),+);*) => {}; | ^^^^^^^^ ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57593 diff --git a/src/test/ui/malformed/malformed-regressions.stderr b/src/test/ui/malformed/malformed-regressions.stderr index 9a81c1056ca90..b32e9af8129a1 100644 --- a/src/test/ui/malformed/malformed-regressions.stderr +++ b/src/test/ui/malformed/malformed-regressions.stderr @@ -5,7 +5,8 @@ LL | #[doc] | ^^^^^^ | = note: #[warn(ill_formed_attribute_input)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57571 warning: attribute must be of the form `#[ignore]` or `#[ignore = "reason"]` @@ -14,7 +15,8 @@ warning: attribute must be of the form `#[ignore]` or `#[ignore = "reason"]` LL | #[ignore()] | ^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57571 warning: attribute must be of the form `#[inline]` or `#[inline(always|never)]` @@ -23,7 +25,8 @@ warning: attribute must be of the form `#[inline]` or `#[inline(always|never)]` LL | #[inline = ""] | ^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57571 warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", @@ -33,7 +36,8 @@ warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dyl LL | #[link] | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57571 warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", @@ -43,6 +47,7 @@ warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dyl LL | #[link = ""] | ^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57571 diff --git a/src/test/ui/match/match-range-fail-dominate.stderr b/src/test/ui/match/match-range-fail-dominate.stderr index d35394aa38ba0..3a238e4e6023c 100644 --- a/src/test/ui/match/match-range-fail-dominate.stderr +++ b/src/test/ui/match/match-range-fail-dominate.stderr @@ -35,7 +35,8 @@ LL | 0.01f64 ... 6.5f64 => {} | ^^^^^^^ | = note: #[warn(illegal_floating_point_literal_pattern)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 warning: floating-point types cannot be used in patterns @@ -44,7 +45,8 @@ warning: floating-point types cannot be used in patterns LL | 0.01f64 ... 6.5f64 => {} | ^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 warning: floating-point types cannot be used in patterns @@ -53,7 +55,8 @@ warning: floating-point types cannot be used in patterns LL | 0.02f64 => {} | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: unreachable pattern diff --git a/src/test/ui/methods/method-call-lifetime-args-lint-fail.stderr b/src/test/ui/methods/method-call-lifetime-args-lint-fail.stderr index b510a08ae3775..174baea1c0db6 100644 --- a/src/test/ui/methods/method-call-lifetime-args-lint-fail.stderr +++ b/src/test/ui/methods/method-call-lifetime-args-lint-fail.stderr @@ -12,11 +12,12 @@ note: lint level defined here | LL | #![deny(late_bound_lifetime_arguments)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:26:14 + --> $DIR/method-call-lifetime-args-lint-fail.rs:27:14 | LL | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} | -- the late bound lifetime parameter is introduced here @@ -24,11 +25,12 @@ LL | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} LL | S.late::<'static, 'static>(&0, &0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:29:14 + --> $DIR/method-call-lifetime-args-lint-fail.rs:31:14 | LL | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} | -- the late bound lifetime parameter is introduced here @@ -36,11 +38,12 @@ LL | fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {} LL | S.late::<'static, 'static, 'static>(&0, &0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:33:20 + --> $DIR/method-call-lifetime-args-lint-fail.rs:36:20 | LL | fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} } | -- the late bound lifetime parameter is introduced here @@ -48,11 +51,12 @@ LL | fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} } LL | S.late_early::<'static>(&0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:36:20 + --> $DIR/method-call-lifetime-args-lint-fail.rs:40:20 | LL | fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} } | -- the late bound lifetime parameter is introduced here @@ -60,11 +64,12 @@ LL | fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} } LL | S.late_early::<'static, 'static>(&0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:39:20 + --> $DIR/method-call-lifetime-args-lint-fail.rs:44:20 | LL | fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} } | -- the late bound lifetime parameter is introduced here @@ -72,11 +77,12 @@ LL | fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} } LL | S.late_early::<'static, 'static, 'static>(&0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:44:23 + --> $DIR/method-call-lifetime-args-lint-fail.rs:50:23 | LL | fn late_implicit(self, _: &u8, _: &u8) {} | - the late bound lifetime parameter is introduced here @@ -84,11 +90,12 @@ LL | fn late_implicit(self, _: &u8, _: &u8) {} LL | S.late_implicit::<'static>(&0, &0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:47:23 + --> $DIR/method-call-lifetime-args-lint-fail.rs:54:23 | LL | fn late_implicit(self, _: &u8, _: &u8) {} | - the late bound lifetime parameter is introduced here @@ -96,11 +103,12 @@ LL | fn late_implicit(self, _: &u8, _: &u8) {} LL | S.late_implicit::<'static, 'static>(&0, &0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:50:23 + --> $DIR/method-call-lifetime-args-lint-fail.rs:58:23 | LL | fn late_implicit(self, _: &u8, _: &u8) {} | - the late bound lifetime parameter is introduced here @@ -108,11 +116,12 @@ LL | fn late_implicit(self, _: &u8, _: &u8) {} LL | S.late_implicit::<'static, 'static, 'static>(&0, &0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:54:29 + --> $DIR/method-call-lifetime-args-lint-fail.rs:63:29 | LL | fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} } | - the late bound lifetime parameter is introduced here @@ -120,11 +129,12 @@ LL | fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} } LL | S.late_implicit_early::<'static>(&0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:57:29 + --> $DIR/method-call-lifetime-args-lint-fail.rs:67:29 | LL | fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} } | - the late bound lifetime parameter is introduced here @@ -132,11 +142,12 @@ LL | fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} } LL | S.late_implicit_early::<'static, 'static>(&0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:60:29 + --> $DIR/method-call-lifetime-args-lint-fail.rs:71:29 | LL | fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} } | - the late bound lifetime parameter is introduced here @@ -144,11 +155,12 @@ LL | fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} } LL | S.late_implicit_early::<'static, 'static, 'static>(&0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:69:21 + --> $DIR/method-call-lifetime-args-lint-fail.rs:81:21 | LL | fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} } | -- the late bound lifetime parameter is introduced here @@ -156,11 +168,12 @@ LL | fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} } LL | S::late_early::<'static>(S, &0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:73:30 + --> $DIR/method-call-lifetime-args-lint-fail.rs:86:30 | LL | fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} } | - the late bound lifetime parameter is introduced here @@ -168,11 +181,12 @@ LL | fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} } LL | S::late_implicit_early::<'static>(S, &0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint-fail.rs:82:9 + --> $DIR/method-call-lifetime-args-lint-fail.rs:96:9 | LL | fn f<'early, 'late, T: 'early>() {} | ----- the late bound lifetime parameter is introduced here @@ -180,7 +194,8 @@ LL | fn f<'early, 'late, T: 'early>() {} LL | f::<'static, u8>; | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: aborting due to 15 previous errors diff --git a/src/test/ui/methods/method-call-lifetime-args-lint.stderr b/src/test/ui/methods/method-call-lifetime-args-lint.stderr index eb1d4fe2e504e..6bd6a73d107aa 100644 --- a/src/test/ui/methods/method-call-lifetime-args-lint.stderr +++ b/src/test/ui/methods/method-call-lifetime-args-lint.stderr @@ -12,11 +12,12 @@ note: lint level defined here | LL | #![deny(late_bound_lifetime_arguments)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/method-call-lifetime-args-lint.rs:16:23 + --> $DIR/method-call-lifetime-args-lint.rs:17:23 | LL | fn late_implicit(self, _: &u8, _: &u8) {} | - the late bound lifetime parameter is introduced here @@ -24,7 +25,8 @@ LL | fn late_implicit(self, _: &u8, _: &u8) {} LL | S.late_implicit::<'static>(&0, &0); | ^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #42868 error: aborting due to 2 previous errors diff --git a/src/test/ui/no-patterns-in-args-2.stderr b/src/test/ui/no-patterns-in-args-2.stderr index ec7d2d9f0d114..483738efb1f72 100644 --- a/src/test/ui/no-patterns-in-args-2.stderr +++ b/src/test/ui/no-patterns-in-args-2.stderr @@ -1,5 +1,5 @@ error[E0642]: patterns aren't allowed in methods without bodies - --> $DIR/no-patterns-in-args-2.rs:6:11 + --> $DIR/no-patterns-in-args-2.rs:7:11 | LL | fn f2(&arg: u8); | ^^^^ @@ -15,7 +15,8 @@ note: lint level defined here | LL | #![deny(patterns_in_fns_without_body)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #35203 error: aborting due to 2 previous errors diff --git a/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.stderr b/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.stderr index 6de615c3de4fd..2cf2ee7270ad1 100644 --- a/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.stderr +++ b/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.stderr @@ -1,5 +1,52 @@ +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-float-range-match.rs:6:7 + | +LL | 0.0..=1.0 => {} + | ^^^ + | +note: lint level defined here + --> $DIR/non-exhaustive-float-range-match.rs:1:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + = note: the lint level cannot be reduced to `allow` + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-float-range-match.rs:6:13 + | +LL | 0.0..=1.0 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-float-range-match.rs:17:7 + | +LL | 0.0..=1.0 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-float-range-match.rs:17:13 + | +LL | 0.0..=1.0 => {} + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + error[E0004]: non-exhaustive patterns: `_` not covered - --> $DIR/non-exhaustive-float-range-match.rs:10:11 + --> $DIR/non-exhaustive-float-range-match.rs:16:11 | LL | match 0.0 { | ^^^ pattern `_` not covered diff --git a/src/test/ui/non-exhaustive/non-exhaustive-match.stderr b/src/test/ui/non-exhaustive/non-exhaustive-match.stderr index 58e3309fd267a..a9cb884fdbfd0 100644 --- a/src/test/ui/non-exhaustive/non-exhaustive-match.stderr +++ b/src/test/ui/non-exhaustive/non-exhaustive-match.stderr @@ -66,6 +66,73 @@ LL | match *vec { | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-match.rs:48:10 + | +LL | [0.1, 0.2, 0.3] => (), + | ^^^ + | +note: lint level defined here + --> $DIR/non-exhaustive-match.rs:2:10 + | +LL | #![allow(illegal_floating_point_literal_pattern)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: #[warn(illegal_floating_point_literal_pattern)] is the minimum lint level + = note: the lint level cannot be reduced to `allow` + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-match.rs:48:15 + | +LL | [0.1, 0.2, 0.3] => (), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-match.rs:48:20 + | +LL | [0.1, 0.2, 0.3] => (), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-match.rs:58:10 + | +LL | [0.1, 0.2] => (), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-match.rs:58:15 + | +LL | [0.1, 0.2] => (), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + +warning: floating-point types cannot be used in patterns + --> $DIR/non-exhaustive-match.rs:65:10 + | +LL | [0.1] => (), + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in a future release! + = note: for more information, see issue #41620 + error[E0004]: non-exhaustive patterns: `[_, _, _, _]` not covered --> $DIR/non-exhaustive-match.rs:47:11 | diff --git a/src/test/ui/privacy/legacy-ctor-visibility.stderr b/src/test/ui/privacy/legacy-ctor-visibility.stderr index f0590951c081d..0f03cceafec06 100644 --- a/src/test/ui/privacy/legacy-ctor-visibility.stderr +++ b/src/test/ui/privacy/legacy-ctor-visibility.stderr @@ -5,7 +5,8 @@ LL | S(10); | ^ | = note: #[deny(legacy_constructor_visibility)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #39207 error: aborting due to previous error diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.stderr index a610b47592315..076ba46fb150a 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.stderr +++ b/src/test/ui/privacy/private-in-public-assoc-ty.stderr @@ -11,7 +11,8 @@ LL | | } | |_____^ | = note: #[warn(private_in_public)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 warning: private type `m::Priv` in public interface (error E0446) @@ -26,11 +27,12 @@ LL | | fn infer_exist() -> Self::Exist; LL | | } | |_____^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error[E0446]: private type `m::Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:24:9 + --> $DIR/private-in-public-assoc-ty.rs:26:9 | LL | struct Priv; | - `m::Priv` declared as private @@ -39,7 +41,7 @@ LL | type Alias4 = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `m::Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:31:9 + --> $DIR/private-in-public-assoc-ty.rs:33:9 | LL | struct Priv; | - `m::Priv` declared as private @@ -48,7 +50,7 @@ LL | type Alias1 = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0445]: private trait `m::PrivTr` in public interface - --> $DIR/private-in-public-assoc-ty.rs:34:9 + --> $DIR/private-in-public-assoc-ty.rs:36:9 | LL | trait PrivTr {} | - `m::PrivTr` declared as private diff --git a/src/test/ui/privacy/private-in-public-non-principal.stderr b/src/test/ui/privacy/private-in-public-non-principal.stderr index 729b94ed8926a..84081c7c4cb89 100644 --- a/src/test/ui/privacy/private-in-public-non-principal.stderr +++ b/src/test/ui/privacy/private-in-public-non-principal.stderr @@ -5,17 +5,18 @@ LL | pub fn leak_dyn_nonprincipal() -> Box { lo | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(private_in_public)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: missing documentation for a method - --> $DIR/private-in-public-non-principal.rs:13:9 + --> $DIR/private-in-public-non-principal.rs:14:9 | LL | pub fn check_doc_lint() {} | ^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/private-in-public-non-principal.rs:10:8 + --> $DIR/private-in-public-non-principal.rs:11:8 | LL | #[deny(missing_docs)] | ^^^^^^^^^^^^ diff --git a/src/test/ui/privacy/private-in-public-warn.stderr b/src/test/ui/privacy/private-in-public-warn.stderr index 16b7e5103283f..6f2627382b038 100644 --- a/src/test/ui/privacy/private-in-public-warn.stderr +++ b/src/test/ui/privacy/private-in-public-warn.stderr @@ -9,38 +9,42 @@ note: lint level defined here | LL | #![deny(private_in_public)] | ^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `types::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:18:12 + --> $DIR/private-in-public-warn.rs:19:12 | LL | V1(Priv), | ^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `types::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:20:14 + --> $DIR/private-in-public-warn.rs:22:14 | LL | V2 { field: Priv }, | ^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `types::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:24:9 + --> $DIR/private-in-public-warn.rs:27:9 | LL | const C: Priv = Priv; | ^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error[E0446]: private type `types::Priv` in public interface - --> $DIR/private-in-public-warn.rs:26:9 + --> $DIR/private-in-public-warn.rs:30:9 | LL | struct Priv; | - `types::Priv` declared as private @@ -49,52 +53,57 @@ LL | type Alias = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error: private type `types::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:27:9 + --> $DIR/private-in-public-warn.rs:31:9 | LL | fn f1(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `types::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:29:9 + --> $DIR/private-in-public-warn.rs:34:9 | LL | fn f2() -> Priv { panic!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `types::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:33:9 + --> $DIR/private-in-public-warn.rs:39:9 | LL | pub static ES: Priv; | ^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `types::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:35:9 + --> $DIR/private-in-public-warn.rs:42:9 | LL | pub fn ef1(arg: Priv); | ^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `types::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:37:9 + --> $DIR/private-in-public-warn.rs:45:9 | LL | pub fn ef2() -> Priv; | ^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error[E0446]: private type `types::Priv` in public interface - --> $DIR/private-in-public-warn.rs:41:9 + --> $DIR/private-in-public-warn.rs:50:9 | LL | struct Priv; | - `types::Priv` declared as private @@ -103,157 +112,173 @@ LL | type Alias = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error: private trait `traits::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:50:5 + --> $DIR/private-in-public-warn.rs:59:5 | LL | pub type Alias = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:53:5 + --> $DIR/private-in-public-warn.rs:63:5 | LL | pub trait Tr1: PrivTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:55:5 + --> $DIR/private-in-public-warn.rs:66:5 | LL | pub trait Tr2 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:57:5 + --> $DIR/private-in-public-warn.rs:69:5 | LL | / pub trait Tr3 { LL | | LL | | -LL | | type Alias: PrivTr; -LL | | fn f(arg: T) {} +LL | | +... | LL | | LL | | } | |_____^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:61:9 + --> $DIR/private-in-public-warn.rs:74:9 | LL | fn f(arg: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:64:5 + --> $DIR/private-in-public-warn.rs:78:5 | LL | impl Pub {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:66:5 + --> $DIR/private-in-public-warn.rs:81:5 | LL | impl PubTr for Pub {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits_where::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:75:5 + --> $DIR/private-in-public-warn.rs:91:5 | LL | pub type Alias where T: PrivTr = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits_where::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:79:5 + --> $DIR/private-in-public-warn.rs:96:5 | LL | pub trait Tr2 where T: PrivTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits_where::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:83:9 + --> $DIR/private-in-public-warn.rs:101:9 | LL | fn f(arg: T) where T: PrivTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits_where::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:87:5 + --> $DIR/private-in-public-warn.rs:106:5 | LL | impl Pub where T: PrivTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `traits_where::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:90:5 + --> $DIR/private-in-public-warn.rs:110:5 | LL | impl PubTr for Pub where T: PrivTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `generics::PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:101:5 + --> $DIR/private-in-public-warn.rs:122:5 | LL | pub trait Tr1: PrivTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `generics::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:104:5 + --> $DIR/private-in-public-warn.rs:126:5 | LL | pub trait Tr2: PubTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `generics::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:106:5 + --> $DIR/private-in-public-warn.rs:129:5 | LL | pub trait Tr3: PubTr<[Priv; 1]> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `generics::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:108:5 + --> $DIR/private-in-public-warn.rs:132:5 | LL | pub trait Tr4: PubTr> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error[E0446]: private type `impls::Priv` in public interface - --> $DIR/private-in-public-warn.rs:135:9 + --> $DIR/private-in-public-warn.rs:160:9 | LL | struct Priv; | - `impls::Priv` declared as private @@ -262,16 +287,17 @@ LL | type Alias = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error: private type `aliases_pub::Priv` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:206:9 + --> $DIR/private-in-public-warn.rs:231:9 | LL | pub fn f(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error[E0446]: private type `aliases_pub::Priv` in public interface - --> $DIR/private-in-public-warn.rs:210:9 + --> $DIR/private-in-public-warn.rs:236:9 | LL | struct Priv; | - `aliases_pub::Priv` declared as private @@ -280,7 +306,7 @@ LL | type Check = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_pub::Priv` in public interface - --> $DIR/private-in-public-warn.rs:213:9 + --> $DIR/private-in-public-warn.rs:239:9 | LL | struct Priv; | - `aliases_pub::Priv` declared as private @@ -289,7 +315,7 @@ LL | type Check = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_pub::Priv` in public interface - --> $DIR/private-in-public-warn.rs:216:9 + --> $DIR/private-in-public-warn.rs:242:9 | LL | struct Priv; | - `aliases_pub::Priv` declared as private @@ -298,7 +324,7 @@ LL | type Check = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_pub::Priv` in public interface - --> $DIR/private-in-public-warn.rs:219:9 + --> $DIR/private-in-public-warn.rs:245:9 | LL | struct Priv; | - `aliases_pub::Priv` declared as private @@ -307,34 +333,37 @@ LL | type Check = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error: private trait `aliases_priv::PrivTr1` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:249:5 + --> $DIR/private-in-public-warn.rs:275:5 | LL | pub trait Tr1: PrivUseAliasTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private trait `aliases_priv::PrivTr1` in public interface (error E0445) - --> $DIR/private-in-public-warn.rs:252:5 + --> $DIR/private-in-public-warn.rs:279:5 | LL | pub trait Tr2: PrivUseAliasTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: private type `aliases_priv::Priv2` in public interface (error E0446) - --> $DIR/private-in-public-warn.rs:252:5 + --> $DIR/private-in-public-warn.rs:279:5 | LL | pub trait Tr2: PrivUseAliasTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 warning: bounds on generic parameters are not enforced in type aliases - --> $DIR/private-in-public-warn.rs:50:23 + --> $DIR/private-in-public-warn.rs:59:23 | LL | pub type Alias = T; | ^^^^^^ @@ -343,7 +372,7 @@ LL | pub type Alias = T; = help: the bound will not be checked when the type alias is used, and should be removed warning: where clauses are not enforced in type aliases - --> $DIR/private-in-public-warn.rs:75:29 + --> $DIR/private-in-public-warn.rs:91:29 | LL | pub type Alias where T: PrivTr = T; | ^^^^^^^^^ diff --git a/src/test/ui/proc-macro/generate-mod.stderr b/src/test/ui/proc-macro/generate-mod.stderr index 1b828b4f03f2c..ab378312d4107 100644 --- a/src/test/ui/proc-macro/generate-mod.stderr +++ b/src/test/ui/proc-macro/generate-mod.stderr @@ -29,7 +29,8 @@ LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import | = note: #[warn(proc_macro_derive_resolution_fallback)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #50504 warning: cannot find type `OuterDerive` in this scope @@ -38,25 +39,28 @@ warning: cannot find type `OuterDerive` in this scope LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #50504 warning: cannot find type `FromOutside` in this scope - --> $DIR/generate-mod.rs:23:14 + --> $DIR/generate-mod.rs:25:14 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #50504 warning: cannot find type `OuterDerive` in this scope - --> $DIR/generate-mod.rs:23:14 + --> $DIR/generate-mod.rs:25:14 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #50504 error: aborting due to 4 previous errors diff --git a/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr b/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr index 61c148bf2df27..dac24384297ff 100644 --- a/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr +++ b/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr @@ -5,25 +5,28 @@ LL | pub use core as reexported_core; | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[deny(pub_use_of_private_extern_crate)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: extern crate `core` is private, and cannot be re-exported (error E0365), consider declaring with `pub` - --> $DIR/pub-reexport-priv-extern-crate.rs:12:9 + --> $DIR/pub-reexport-priv-extern-crate.rs:13:9 | LL | use foo1::core; | ^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: extern crate `core` is private, and cannot be re-exported (error E0365), consider declaring with `pub` - --> $DIR/pub-reexport-priv-extern-crate.rs:20:13 + --> $DIR/pub-reexport-priv-extern-crate.rs:22:13 | LL | pub use foo2::bar::core; | ^^^^^^^^^^^^^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #34537 error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc1445/match-forbidden-without-eq.stderr b/src/test/ui/rfc1445/match-forbidden-without-eq.stderr index ebea2f364ec88..db7027f873786 100644 --- a/src/test/ui/rfc1445/match-forbidden-without-eq.stderr +++ b/src/test/ui/rfc1445/match-forbidden-without-eq.stderr @@ -11,7 +11,8 @@ LL | f32::INFINITY => { } | ^^^^^^^^^^^^^ | = note: #[warn(illegal_floating_point_literal_pattern)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #41620 error: aborting due to previous error diff --git a/src/test/ui/rust-2018/async-ident-allowed.stderr b/src/test/ui/rust-2018/async-ident-allowed.stderr index d3e450e9be0b5..9ed190f52b7e6 100644 --- a/src/test/ui/rust-2018/async-ident-allowed.stderr +++ b/src/test/ui/rust-2018/async-ident-allowed.stderr @@ -10,7 +10,8 @@ note: lint level defined here LL | #![deny(rust_2018_compatibility)] | ^^^^^^^^^^^^^^^^^^^^^^^ = note: #[deny(keyword_idents)] implied by #[deny(rust_2018_compatibility)] - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: aborting due to previous error diff --git a/src/test/ui/rust-2018/async-ident.fixed b/src/test/ui/rust-2018/async-ident.fixed index 3d6f6ff8c4922..c8cc2f1d66028 100644 --- a/src/test/ui/rust-2018/async-ident.fixed +++ b/src/test/ui/rust-2018/async-ident.fixed @@ -5,19 +5,23 @@ // run-rustfix fn r#async() {} //~ ERROR async -//~^ WARN hard error in the 2018 edition +//~^ WARN this was previously accepted +//~| WARN hard error in the 2018 edition macro_rules! foo { ($foo:ident) => {}; ($r#async:expr, r#async) => {}; //~^ ERROR async //~| ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } foo!(r#async); //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition mod dont_lint_raw { @@ -27,40 +31,49 @@ mod dont_lint_raw { mod async_trait { trait r#async {} //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition struct MyStruct; impl r#async for MyStruct {} //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } mod async_static { static r#async: u32 = 0; //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } mod async_const { const r#async: u32 = 0; //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } struct Foo; impl Foo { fn r#async() {} } //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition fn main() { struct r#async {} //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition let r#async: r#async = r#async {}; //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition //~| ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition //~| ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } @@ -68,6 +81,7 @@ fn main() { macro_rules! produces_async { () => (pub fn r#async() {}) //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } @@ -75,5 +89,6 @@ macro_rules! produces_async { macro_rules! consumes_async { (r#async) => (1) //~^ ERROR async + //~| WARN this was previously accepted //~| WARN hard error in the 2018 edition } diff --git a/src/test/ui/rust-2018/async-ident.stderr b/src/test/ui/rust-2018/async-ident.stderr index b149533775633..218833d73c5d8 100644 --- a/src/test/ui/rust-2018/async-ident.stderr +++ b/src/test/ui/rust-2018/async-ident.stderr @@ -9,133 +9,148 @@ note: lint level defined here | LL | #![deny(keyword_idents)] | ^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:12:7 + --> $DIR/async-ident.rs:13:7 | LL | ($async:expr, async) => {}; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:12:19 + --> $DIR/async-ident.rs:13:19 | LL | ($async:expr, async) => {}; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:19:6 + --> $DIR/async-ident.rs:22:6 | LL | foo!(async); | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:28:11 + --> $DIR/async-ident.rs:32:11 | LL | trait async {} | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:32:10 + --> $DIR/async-ident.rs:37:10 | LL | impl async for MyStruct {} | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:38:12 + --> $DIR/async-ident.rs:44:12 | LL | static async: u32 = 0; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:44:11 + --> $DIR/async-ident.rs:51:11 | LL | const async: u32 = 0; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:50:15 + --> $DIR/async-ident.rs:58:15 | LL | impl Foo { fn async() {} } | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:55:12 + --> $DIR/async-ident.rs:64:12 | LL | struct async {} | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:58:9 + --> $DIR/async-ident.rs:68:9 | LL | let async: async = async {}; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:58:16 + --> $DIR/async-ident.rs:68:16 | LL | let async: async = async {}; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:58:24 + --> $DIR/async-ident.rs:68:24 | LL | let async: async = async {}; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:69:19 + --> $DIR/async-ident.rs:82:19 | LL | () => (pub fn async() {}) | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:76:6 + --> $DIR/async-ident.rs:90:6 | LL | (async) => (1) | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: aborting due to 15 previous errors diff --git a/src/test/ui/rust-2018/dyn-keyword.fixed b/src/test/ui/rust-2018/dyn-keyword.fixed index e9cda1af93932..f7c587ff91552 100644 --- a/src/test/ui/rust-2018/dyn-keyword.fixed +++ b/src/test/ui/rust-2018/dyn-keyword.fixed @@ -6,5 +6,6 @@ fn main() { let r#dyn = (); //~ ERROR dyn - //~^ WARN hard error in the 2018 edition + //~^ WARN this was previously accepted + //~| WARN hard error in the 2018 edition } diff --git a/src/test/ui/rust-2018/dyn-keyword.stderr b/src/test/ui/rust-2018/dyn-keyword.stderr index fa79df49fb665..057fdf687f77a 100644 --- a/src/test/ui/rust-2018/dyn-keyword.stderr +++ b/src/test/ui/rust-2018/dyn-keyword.stderr @@ -9,7 +9,8 @@ note: lint level defined here | LL | #![deny(keyword_idents)] | ^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 error: aborting due to previous error diff --git a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed b/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed index 76fbfa660311a..ec0caa2871a0e 100644 --- a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed +++ b/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed @@ -19,9 +19,11 @@ mod foo { fn main() { let _: ::Bar = (); //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| WARN this was previously accepted + //~| WARN it will become a hard error let _: ::Bar = (); //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| WARN this was previously accepted + //~| WARN it will become a hard error } diff --git a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr b/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr index 412ebe1a9c48f..b2d7b4d0ae813 100644 --- a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr +++ b/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr @@ -9,16 +9,18 @@ note: lint level defined here | LL | #![deny(absolute_paths_not_starting_with_crate)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-fully-qualified-paths.rs:24:13 + --> $DIR/edition-lint-fully-qualified-paths.rs:25:13 | LL | let _: <::foo::Baz as foo::Foo>::Bar = (); | ^^^^^^^^^^ help: use `crate`: `crate::foo::Baz` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: aborting due to 2 previous errors diff --git a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed b/src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed index 77478e8c608ff..ac33b4075af29 100644 --- a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed +++ b/src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed @@ -17,14 +17,17 @@ crate mod foo { use crate::foo::{bar::{baz::{}}}; //~^ ERROR absolute paths must start with //~| WARN this was previously accepted +//~| WARN it will become a hard error use crate::foo::{bar::{XX, baz::{}}}; //~^ ERROR absolute paths must start with //~| WARN this was previously accepted +//~| WARN it will become a hard error use crate::foo::{bar::{baz::{}, baz1::{}}}; //~^ ERROR absolute paths must start with //~| WARN this was previously accepted +//~| WARN it will become a hard error fn main() { } diff --git a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr b/src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr index 742203e998510..a3f90a1dee639 100644 --- a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr +++ b/src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr @@ -9,25 +9,28 @@ note: lint level defined here | LL | #![deny(absolute_paths_not_starting_with_crate)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-empty-paths.rs:21:5 + --> $DIR/edition-lint-nested-empty-paths.rs:22:5 | LL | use foo::{bar::{XX, baz::{}}}; | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{XX, baz::{}}}` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-empty-paths.rs:25:5 + --> $DIR/edition-lint-nested-empty-paths.rs:27:5 | LL | use foo::{bar::{baz::{}, baz1::{}}}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}, baz1::{}}}` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: aborting due to 3 previous errors diff --git a/src/test/ui/rust-2018/edition-lint-nested-paths.fixed b/src/test/ui/rust-2018/edition-lint-nested-paths.fixed index da7524a63e240..9f6b7b5c85566 100644 --- a/src/test/ui/rust-2018/edition-lint-nested-paths.fixed +++ b/src/test/ui/rust-2018/edition-lint-nested-paths.fixed @@ -5,7 +5,8 @@ use crate::foo::{a, b}; //~^ ERROR absolute paths must start with -//~| this was previously accepted +//~| WARN this was previously accepted +//~| WARN it will become a hard error mod foo { crate fn a() {} @@ -20,7 +21,8 @@ fn main() { { use crate::foo::{self as x, c}; //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| WARN this was previously accepted + //~| WARN it will become a hard error x::a(); c(); } diff --git a/src/test/ui/rust-2018/edition-lint-nested-paths.stderr b/src/test/ui/rust-2018/edition-lint-nested-paths.stderr index 6cd8e9acd1096..21482059029ad 100644 --- a/src/test/ui/rust-2018/edition-lint-nested-paths.stderr +++ b/src/test/ui/rust-2018/edition-lint-nested-paths.stderr @@ -9,16 +9,18 @@ note: lint level defined here | LL | #![deny(absolute_paths_not_starting_with_crate)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-paths.rs:21:13 + --> $DIR/edition-lint-nested-paths.rs:22:13 | LL | use foo::{self as x, c}; | ^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{self as x, c}` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: aborting due to 2 previous errors diff --git a/src/test/ui/rust-2018/edition-lint-paths.fixed b/src/test/ui/rust-2018/edition-lint-paths.fixed index de16291fea6bd..4a0fee3f56dc5 100644 --- a/src/test/ui/rust-2018/edition-lint-paths.fixed +++ b/src/test/ui/rust-2018/edition-lint-paths.fixed @@ -12,17 +12,20 @@ pub mod foo { use crate::bar::Bar; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error use super::bar::Bar2; use crate::bar::Bar3; use crate::bar; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error use crate::{bar as something_else}; use crate::{Bar as SomethingElse, main}; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error use crate::{Bar as SomethingElse2, main as another_main}; @@ -35,6 +38,7 @@ pub mod foo { use crate::bar::Bar; //~^ ERROR absolute //~| WARN this was previously accepted +//~| WARN it will become a hard error pub mod bar { use edition_lint_paths as foo; @@ -47,16 +51,19 @@ mod baz { use crate::*; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error } impl crate::foo::SomeTrait for u32 { } //~^ ERROR absolute //~| WARN this was previously accepted +//~| WARN it will become a hard error fn main() { let x = crate::bar::Bar; //~^ ERROR absolute //~| WARN this was previously accepted + //~| WARN it will become a hard error let x = bar::Bar; let x = crate::bar::Bar; let x = self::bar::Bar; diff --git a/src/test/ui/rust-2018/edition-lint-paths.stderr b/src/test/ui/rust-2018/edition-lint-paths.stderr index 4f1904a1f8aba..da938564af60e 100644 --- a/src/test/ui/rust-2018/edition-lint-paths.stderr +++ b/src/test/ui/rust-2018/edition-lint-paths.stderr @@ -9,61 +9,68 @@ note: lint level defined here | LL | #![deny(absolute_paths_not_starting_with_crate)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:18:9 + --> $DIR/edition-lint-paths.rs:19:9 | LL | use bar; | ^^^ help: use `crate`: `crate::bar` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:23:9 + --> $DIR/edition-lint-paths.rs:25:9 | LL | use {Bar as SomethingElse, main}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{Bar as SomethingElse, main}` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:35:5 + --> $DIR/edition-lint-paths.rs:38:5 | LL | use bar::Bar; | ^^^^^^^^ help: use `crate`: `crate::bar::Bar` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:47:9 + --> $DIR/edition-lint-paths.rs:51:9 | LL | use *; | ^ help: use `crate`: `crate::*` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:52:6 + --> $DIR/edition-lint-paths.rs:57:6 | LL | impl ::foo::SomeTrait for u32 { } | ^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::SomeTrait` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:57:13 + --> $DIR/edition-lint-paths.rs:63:13 | LL | let x = ::bar::Bar; | ^^^^^^^^^^ help: use `crate`: `crate::bar::Bar` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: aborting due to 7 previous errors diff --git a/src/test/ui/rust-2018/extern-crate-rename.fixed b/src/test/ui/rust-2018/extern-crate-rename.fixed index aa8b935289e44..efbe749a85be0 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.fixed +++ b/src/test/ui/rust-2018/extern-crate-rename.fixed @@ -12,8 +12,8 @@ extern crate edition_lint_paths as my_crate; use crate::my_crate::foo; //~^ ERROR absolute paths must start //~| WARNING this was previously accepted +//~| WARN it will become a hard error fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-rename.stderr b/src/test/ui/rust-2018/extern-crate-rename.stderr index 4e33b1e959ab0..a47124b84bc5f 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.stderr +++ b/src/test/ui/rust-2018/extern-crate-rename.stderr @@ -9,7 +9,8 @@ note: lint level defined here | LL | #![deny(absolute_paths_not_starting_with_crate)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: aborting due to previous error diff --git a/src/test/ui/rust-2018/extern-crate-submod.fixed b/src/test/ui/rust-2018/extern-crate-submod.fixed index 0564e58f3c7dd..ddea1b9dc0377 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.fixed +++ b/src/test/ui/rust-2018/extern-crate-submod.fixed @@ -19,8 +19,8 @@ mod m { use crate::m::edition_lint_paths::foo; //~^ ERROR absolute paths must start //~| WARNING this was previously accepted +//~| WARN it will become a hard error fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-submod.stderr b/src/test/ui/rust-2018/extern-crate-submod.stderr index e0b61dd265cc8..00f2c92a3279b 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.stderr +++ b/src/test/ui/rust-2018/extern-crate-submod.stderr @@ -9,7 +9,8 @@ note: lint level defined here | LL | #![deny(absolute_paths_not_starting_with_crate)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 error: aborting due to previous error diff --git a/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr b/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr index 19e87b664cc9e..cf38689ff54dc 100644 --- a/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr +++ b/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr @@ -10,7 +10,8 @@ note: lint level defined here LL | #![warn(rust_2018_compatibility)] | ^^^^^^^^^^^^^^^^^^^^^^^ = note: #[warn(absolute_paths_not_starting_with_crate)] implied by #[warn(rust_2018_compatibility)] - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition @@ -19,6 +20,7 @@ warning: absolute paths must start with `self`, `super`, `crate`, or an external LL | #[foo] | ^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 diff --git a/src/test/ui/rust-2018/try-ident.stderr b/src/test/ui/rust-2018/try-ident.stderr index 9494603589947..75618dbd3f658 100644 --- a/src/test/ui/rust-2018/try-ident.stderr +++ b/src/test/ui/rust-2018/try-ident.stderr @@ -10,7 +10,8 @@ note: lint level defined here LL | #![warn(rust_2018_compatibility)] | ^^^^^^^^^^^^^^^^^^^^^^^ = note: #[warn(keyword_idents)] implied by #[warn(rust_2018_compatibility)] - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 warning: `try` is a keyword in the 2018 edition @@ -19,6 +20,7 @@ warning: `try` is a keyword in the 2018 edition LL | fn try() { | ^^^ help: you can use a raw identifier to stay compatible: `r#try` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 diff --git a/src/test/ui/rust-2018/try-macro.stderr b/src/test/ui/rust-2018/try-macro.stderr index 40a4564cc3d6d..65767de4d1eb5 100644 --- a/src/test/ui/rust-2018/try-macro.stderr +++ b/src/test/ui/rust-2018/try-macro.stderr @@ -10,6 +10,7 @@ note: lint level defined here LL | #![warn(rust_2018_compatibility)] | ^^^^^^^^^^^^^^^^^^^^^^^ = note: #[warn(keyword_idents)] implied by #[warn(rust_2018_compatibility)] - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this was previously accepted by the compiler but is being phased out + = warning: it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 diff --git a/src/test/ui/safe-extern-statics.stderr b/src/test/ui/safe-extern-statics.stderr index 86976a2c932d1..0b78227126ac4 100644 --- a/src/test/ui/safe-extern-statics.stderr +++ b/src/test/ui/safe-extern-statics.stderr @@ -5,37 +5,41 @@ LL | let a = A; | ^ | = note: #[deny(safe_extern_statics)] on by default - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #36247 = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior error: use of extern static is unsafe and requires unsafe function or block (error E0133) - --> $DIR/safe-extern-statics.rs:15:14 + --> $DIR/safe-extern-statics.rs:16:14 | LL | let ra = &A; | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #36247 = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior error: use of extern static is unsafe and requires unsafe function or block (error E0133) - --> $DIR/safe-extern-statics.rs:17:14 + --> $DIR/safe-extern-statics.rs:19:14 | LL | let xa = XA; | ^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #36247 = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior error: use of extern static is unsafe and requires unsafe function or block (error E0133) - --> $DIR/safe-extern-statics.rs:19:15 + --> $DIR/safe-extern-statics.rs:22:15 | LL | let xra = &XA; | ^^^ | - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #36247 = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior diff --git a/src/test/ui/type-alias-enum-variants-priority.stderr b/src/test/ui/type-alias-enum-variants-priority.stderr index dcf7dc77ed5ea..da6614b22bdde 100644 --- a/src/test/ui/type-alias-enum-variants-priority.stderr +++ b/src/test/ui/type-alias-enum-variants-priority.stderr @@ -9,7 +9,8 @@ note: lint level defined here | LL | #![deny(ambiguous_associated_items)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 + = warning: it will become a hard error in a future release! = note: for more information, see issue #57644 note: `V` could refer to variant defined here --> $DIR/type-alias-enum-variants-priority.rs:5:5