diff --git a/compiler/rustc_apfloat/tests/ieee.rs b/compiler/rustc_apfloat/tests/ieee.rs index 2264106431592..f8fac0c2358c9 100644 --- a/compiler/rustc_apfloat/tests/ieee.rs +++ b/compiler/rustc_apfloat/tests/ieee.rs @@ -552,7 +552,7 @@ fn fma() { assert!(f1.is_negative() && f1.is_zero()); } - // Test x87 extended precision case from http://llvm.org/PR20728. + // Test x87 extended precision case from https://llvm.org/PR20728. { let mut m1 = X87DoubleExtended::from_u128(1).value; let m2 = X87DoubleExtended::from_u128(1).value; diff --git a/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs b/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs index 983839d48d2d7..2643fae0a810a 100644 --- a/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs +++ b/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs @@ -1,4 +1,4 @@ -#![feature(rustc_private)] +#![feature(rustc_private, once_cell)] extern crate rustc_data_structures; extern crate rustc_driver; @@ -6,12 +6,33 @@ extern crate rustc_interface; extern crate rustc_session; extern crate rustc_target; +use std::panic; +use std::lazy::SyncLazy; + use rustc_data_structures::profiling::{get_resident_set_size, print_time_passes_entry}; use rustc_interface::interface; use rustc_session::config::ErrorOutputType; use rustc_session::early_error; use rustc_target::spec::PanicStrategy; +const BUG_REPORT_URL: &str = "https://github.com/bjorn3/rustc_codegen_cranelift/issues/new"; + +static DEFAULT_HOOK: SyncLazy) + Sync + Send + 'static>> = + SyncLazy::new(|| { + let hook = panic::take_hook(); + panic::set_hook(Box::new(|info| { + // Invoke the default handler, which prints the actual panic message and optionally a backtrace + (*DEFAULT_HOOK)(info); + + // Separate the output with an empty line + eprintln!(); + + // Print the ICE message + rustc_driver::report_ice(info, BUG_REPORT_URL); + })); + hook + }); + #[derive(Default)] pub struct CraneliftPassesCallbacks { time_passes: bool, @@ -37,7 +58,7 @@ fn main() { let start_rss = get_resident_set_size(); rustc_driver::init_rustc_env_logger(); let mut callbacks = CraneliftPassesCallbacks::default(); - rustc_driver::install_ice_hook(); + SyncLazy::force(&DEFAULT_HOOK); // Install ice hook let exit_code = rustc_driver::catch_with_exit_code(|| { let args = std::env::args_os() .enumerate() diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index c8cf0116c641e..582c9354041de 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -606,7 +606,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { // According to LLVM [1] building a nontemporal store must // *always* point to a metadata value of the integer 1. // - // [1]: http://llvm.org/docs/LangRef.html#store-instruction + // [1]: https://llvm.org/docs/LangRef.html#store-instruction let one = self.cx.const_i32(1); let node = llvm::LLVMMDNodeInContext(self.cx.llcx, &one, 1); llvm::LLVMSetMetadata(store, llvm::MD_nontemporal as c_uint, node); diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 6aa952462fa58..7415a57045336 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -71,7 +71,7 @@ pub struct CodegenCx<'ll, 'tcx> { pub statics_to_rauw: RefCell>, /// Statics that will be placed in the llvm.used variable - /// See for details + /// See for details pub used_statics: RefCell>, pub lltypes: RefCell, Option), &'ll Type>>, diff --git a/compiler/rustc_codegen_llvm/src/llvm/mod.rs b/compiler/rustc_codegen_llvm/src/llvm/mod.rs index 38d56f8721169..c1521a760b002 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/mod.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/mod.rs @@ -102,7 +102,7 @@ pub fn SetFunctionCallConv(fn_: &'a Value, cc: CallConv) { // example happen for generics when using multiple codegen units. This function simply uses the // value's name as the comdat value to make sure that it is in a 1-to-1 relationship to the // function. -// For more details on COMDAT sections see e.g., http://www.airs.com/blog/archives/52 +// For more details on COMDAT sections see e.g., https://www.airs.com/blog/archives/52 pub fn SetUniqueComdat(llmod: &Module, val: &'a Value) { unsafe { let name = get_value_name(val); diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 87bc829b48891..35a6495946ff0 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -1167,23 +1167,26 @@ pub fn catch_with_exit_code(f: impl FnOnce() -> interface::Result<()>) -> i32 { static DEFAULT_HOOK: SyncLazy) + Sync + Send + 'static>> = SyncLazy::new(|| { let hook = panic::take_hook(); - panic::set_hook(Box::new(|info| report_ice(info, BUG_REPORT_URL))); + panic::set_hook(Box::new(|info| { + // Invoke the default handler, which prints the actual panic message and optionally a backtrace + (*DEFAULT_HOOK)(info); + + // Separate the output with an empty line + eprintln!(); + + // Print the ICE message + report_ice(info, BUG_REPORT_URL); + })); hook }); -/// Prints the ICE message, including backtrace and query stack. +/// Prints the ICE message, including query stack, but without backtrace. /// /// The message will point the user at `bug_report_url` to report the ICE. /// /// When `install_ice_hook` is called, this function will be called as the panic /// hook. pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) { - // Invoke the default handler, which prints the actual panic message and optionally a backtrace - (*DEFAULT_HOOK)(info); - - // Separate the output with an empty line - eprintln!(); - let emitter = Box::new(rustc_errors::emitter::EmitterWriter::stderr( rustc_errors::ColorConfig::Auto, None, diff --git a/compiler/rustc_graphviz/src/lib.rs b/compiler/rustc_graphviz/src/lib.rs index db70beb59141b..27390fd2e4d91 100644 --- a/compiler/rustc_graphviz/src/lib.rs +++ b/compiler/rustc_graphviz/src/lib.rs @@ -1,11 +1,11 @@ -//! Generate files suitable for use with [Graphviz](http://www.graphviz.org/) +//! Generate files suitable for use with [Graphviz](https://www.graphviz.org/) //! //! The `render` function generates output (e.g., an `output.dot` file) for -//! use with [Graphviz](http://www.graphviz.org/) by walking a labeled +//! use with [Graphviz](https://www.graphviz.org/) by walking a labeled //! graph. (Graphviz can then automatically lay out the nodes and edges //! of the graph, and also optionally render the graph as an image or //! other [output formats]( -//! http://www.graphviz.org/content/output-formats), such as SVG.) +//! https://www.graphviz.org/content/output-formats), such as SVG.) //! //! Rather than impose some particular graph data structure on clients, //! this library exposes two traits that clients can implement on their @@ -13,8 +13,8 @@ //! //! Note: This library does not yet provide access to the full //! expressiveness of the [DOT language]( -//! http://www.graphviz.org/doc/info/lang.html). For example, there are -//! many [attributes](http://www.graphviz.org/content/attrs) related to +//! https://www.graphviz.org/doc/info/lang.html). For example, there are +//! many [attributes](https://www.graphviz.org/content/attrs) related to //! providing layout hints (e.g., left-to-right versus top-down, which //! algorithm to use, etc). The current intention of this library is to //! emit a human-readable .dot file with very regular structure suitable @@ -267,9 +267,9 @@ //! //! # References //! -//! * [Graphviz](http://www.graphviz.org/) +//! * [Graphviz](https://www.graphviz.org/) //! -//! * [DOT language](http://www.graphviz.org/doc/info/lang.html) +//! * [DOT language](https://www.graphviz.org/doc/info/lang.html) #![doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/", @@ -292,7 +292,7 @@ pub enum LabelText<'a> { LabelStr(Cow<'a, str>), /// This kind of label uses the graphviz label escString type: - /// + /// /// /// Occurrences of backslashes (`\`) are not escaped; instead they /// are interpreted as initiating an escString escape sequence. @@ -307,12 +307,12 @@ pub enum LabelText<'a> { /// printed exactly as given, but between `<` and `>`. **No /// escaping is performed.** /// - /// [html]: http://www.graphviz.org/content/node-shapes#html + /// [html]: https://www.graphviz.org/content/node-shapes#html HtmlStr(Cow<'a, str>), } /// The style for a node or edge. -/// See for descriptions. +/// See for descriptions. /// Note that some of these are not valid for edges. #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum Style { @@ -439,7 +439,7 @@ pub trait Labeller<'a> { /// Maps `n` to one of the [graphviz `shape` names][1]. If `None` /// is returned, no `shape` attribute is specified. /// - /// [1]: http://www.graphviz.org/content/node-shapes + /// [1]: https://www.graphviz.org/content/node-shapes fn node_shape(&'a self, _node: &Self::Node) -> Option> { None } diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 9e3e96df3a7f2..4abc4b29b50e5 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -581,7 +581,7 @@ fn output_conflicts_with_dir(output_paths: &[PathBuf]) -> Option { fn escape_dep_filename(filename: &String) -> String { // Apparently clang and gcc *only* escape spaces: - // http://llvm.org/klaus/clang/commit/9d50634cfc268ecc9a7250226dd5ca0e945240d4 + // https://llvm.org/klaus/clang/commit/9d50634cfc268ecc9a7250226dd5ca0e945240d4 filename.replace(" ", "\\ ") } diff --git a/compiler/rustc_lint/src/array_into_iter.rs b/compiler/rustc_lint/src/array_into_iter.rs index 0b5bd39f7f984..14ffbbc35ebf0 100644 --- a/compiler/rustc_lint/src/array_into_iter.rs +++ b/compiler/rustc_lint/src/array_into_iter.rs @@ -3,7 +3,8 @@ use rustc_errors::Applicability; use rustc_hir as hir; use rustc_middle::ty; use rustc_middle::ty::adjustment::{Adjust, Adjustment}; -use rustc_session::lint::FutureBreakage; +use rustc_session::lint::FutureIncompatibilityReason; +use rustc_span::edition::Edition; use rustc_span::symbol::sym; declare_lint! { @@ -37,10 +38,7 @@ declare_lint! { "detects calling `into_iter` on arrays", @future_incompatible = FutureIncompatibleInfo { reference: "issue #66145 ", - edition: None, - future_breakage: Some(FutureBreakage { - date: None - }) + reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2021), }; } diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index f6a84966f7a91..5479af1dc3099 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -47,6 +47,7 @@ use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::subst::{GenericArgKind, Subst}; use rustc_middle::ty::Instance; use rustc_middle::ty::{self, layout::LayoutError, Ty, TyCtxt}; +use rustc_session::lint::FutureIncompatibilityReason; use rustc_session::Session; use rustc_span::edition::Edition; use rustc_span::source_map::Spanned; @@ -874,7 +875,7 @@ declare_lint! { "detects anonymous parameters", @future_incompatible = FutureIncompatibleInfo { reference: "issue #41686 ", - edition: Some(Edition::Edition2018), + reason: FutureIncompatibilityReason::EditionError(Edition::Edition2018), }; } @@ -1663,7 +1664,7 @@ declare_lint! { "`...` range patterns are deprecated", @future_incompatible = FutureIncompatibleInfo { reference: "issue #80165 ", - edition: Some(Edition::Edition2021), + reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021), }; } @@ -1891,7 +1892,7 @@ declare_lint! { "detects edition keywords being used as an identifier", @future_incompatible = FutureIncompatibleInfo { reference: "issue #49716 ", - edition: Some(Edition::Edition2018), + reason: FutureIncompatibilityReason::EditionError(Edition::Edition2018), }; } diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index a8df1b0952c18..2dc04d57d1e66 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -209,8 +209,8 @@ impl LintStore { bug!("duplicate specification of lint {}", lint.name_lower()) } - if let Some(FutureIncompatibleInfo { edition, .. }) = lint.future_incompatible { - if let Some(edition) = edition { + if let Some(FutureIncompatibleInfo { reason, .. }) = lint.future_incompatible { + if let Some(edition) = reason.edition() { self.lint_groups .entry(edition.lint_name()) .or_insert(LintGroup { diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index a2f60142ffc75..4136398adb58c 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -6,7 +6,7 @@ //! compiler code, rather than using their own custom pass. Those //! lints are all available in `rustc_lint::builtin`. -use crate::{declare_lint, declare_lint_pass, FutureBreakage}; +use crate::{declare_lint, declare_lint_pass, FutureBreakage, FutureIncompatibilityReason}; use rustc_span::edition::Edition; declare_lint! { @@ -41,7 +41,6 @@ declare_lint! { "applying forbid to lint-groups", @future_incompatible = FutureIncompatibleInfo { reference: "issue #81670 ", - edition: None, }; } @@ -77,7 +76,6 @@ declare_lint! { "ill-formed attribute inputs that were previously accepted and used in practice", @future_incompatible = FutureIncompatibleInfo { reference: "issue #57571 ", - edition: None, }; crate_level_only } @@ -114,7 +112,6 @@ declare_lint! { "conflicts between `#[repr(..)]` hints that were previously accepted and used in practice", @future_incompatible = FutureIncompatibleInfo { reference: "issue #68585 ", - edition: None, }; } @@ -293,7 +290,6 @@ declare_lint! { "constant evaluation encountered erroneous expression", @future_incompatible = FutureIncompatibleInfo { reference: "issue #71800 ", - edition: None, }; report_in_external_macro } @@ -900,7 +896,6 @@ declare_lint! { "detect private items in public interfaces not caught by the old implementation", @future_incompatible = FutureIncompatibleInfo { reference: "issue #34537 ", - edition: None, }; } @@ -980,7 +975,6 @@ declare_lint! { "detect public re-exports of private extern crates", @future_incompatible = FutureIncompatibleInfo { reference: "issue #34537 ", - edition: None, }; } @@ -1010,7 +1004,6 @@ declare_lint! { "type parameter default erroneously allowed in invalid location", @future_incompatible = FutureIncompatibleInfo { reference: "issue #36887 ", - edition: None, }; } @@ -1078,7 +1071,6 @@ declare_lint! { "detects unaligned references to fields of packed structs", @future_incompatible = FutureIncompatibleInfo { reference: "issue #82523 ", - edition: None, }; report_in_external_macro } @@ -1200,7 +1192,6 @@ declare_lint! { "patterns in functions without body were erroneously allowed", @future_incompatible = FutureIncompatibleInfo { reference: "issue #35203 ", - edition: None, }; } @@ -1244,7 +1235,6 @@ declare_lint! { "detects missing fragment specifiers in unused `macro_rules!` patterns", @future_incompatible = FutureIncompatibleInfo { reference: "issue #40107 ", - edition: None, }; } @@ -1286,7 +1276,6 @@ declare_lint! { "detects generic lifetime arguments in path segments with late bound lifetime parameters", @future_incompatible = FutureIncompatibleInfo { reference: "issue #42868 ", - edition: None, }; } @@ -1322,7 +1311,6 @@ declare_lint! { "trait-object types were treated as different depending on marker-trait order", @future_incompatible = FutureIncompatibleInfo { reference: "issue #56484 ", - edition: None, }; } @@ -1362,7 +1350,6 @@ declare_lint! { "distinct impls distinguished only by the leak-check code", @future_incompatible = FutureIncompatibleInfo { reference: "issue #56105 ", - edition: None, }; } @@ -1554,7 +1541,7 @@ declare_lint! { "raw pointer to an inference variable", @future_incompatible = FutureIncompatibleInfo { reference: "issue #46906 ", - edition: Some(Edition::Edition2018), + reason: FutureIncompatibilityReason::EditionError(Edition::Edition2018), }; } @@ -1621,7 +1608,7 @@ declare_lint! { "suggest using `dyn Trait` for trait objects", @future_incompatible = FutureIncompatibleInfo { reference: "issue #80165 ", - edition: Some(Edition::Edition2021), + reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021), }; } @@ -1676,7 +1663,7 @@ declare_lint! { instead of `crate`, `self`, or an extern crate name", @future_incompatible = FutureIncompatibleInfo { reference: "issue #53130 ", - edition: Some(Edition::Edition2018), + reason: FutureIncompatibilityReason::EditionError(Edition::Edition2018), }; } @@ -1725,7 +1712,6 @@ declare_lint! { "floating-point literals cannot be used in patterns", @future_incompatible = FutureIncompatibleInfo { reference: "issue #41620 ", - edition: None, }; } @@ -1769,7 +1755,6 @@ declare_lint! { "detects name collision with an existing but unstable method", @future_incompatible = FutureIncompatibleInfo { reference: "issue #48919 ", - edition: None, // Note: this item represents future incompatibility of all unstable functions in the // standard library, and thus should never be removed or changed to an error. }; @@ -1873,7 +1858,6 @@ declare_lint! { "checks the object safety of where clauses", @future_incompatible = FutureIncompatibleInfo { reference: "issue #51443 ", - edition: None, }; } @@ -1940,7 +1924,6 @@ declare_lint! { "detects proc macro derives using inaccessible names from parent modules", @future_incompatible = FutureIncompatibleInfo { reference: "issue #83583 ", - edition: None, }; } @@ -2043,7 +2026,6 @@ declare_lint! { cannot be referred to by absolute paths", @future_incompatible = FutureIncompatibleInfo { reference: "issue #52234 ", - edition: None, }; crate_level_only } @@ -2134,7 +2116,6 @@ declare_lint! { "constant used in pattern contains value of non-structural-match type in a field or a variant", @future_incompatible = FutureIncompatibleInfo { reference: "issue #62411 ", - edition: None, }; } @@ -2190,7 +2171,6 @@ declare_lint! { "pointers are not structural-match", @future_incompatible = FutureIncompatibleInfo { reference: "issue #62411 ", - edition: None, }; } @@ -2229,7 +2209,6 @@ declare_lint! { expression contains values of non-structural-match types", @future_incompatible = FutureIncompatibleInfo { reference: "issue #73448 ", - edition: None, }; } @@ -2287,7 +2266,6 @@ declare_lint! { "ambiguous associated items", @future_incompatible = FutureIncompatibleInfo { reference: "issue #57644 ", - edition: None, }; } @@ -2318,7 +2296,6 @@ declare_lint! { "reservation of a two-phased borrow conflicts with other shared borrows", @future_incompatible = FutureIncompatibleInfo { reference: "issue #59159 ", - edition: None, }; } @@ -2360,7 +2337,6 @@ declare_lint! { "a feature gate that doesn't break dependent crates", @future_incompatible = FutureIncompatibleInfo { reference: "issue #64266 ", - edition: None, }; } @@ -2589,7 +2565,6 @@ declare_lint! { "a C-like enum implementing Drop is cast", @future_incompatible = FutureIncompatibleInfo { reference: "issue #73333 ", - edition: None, }; } @@ -2629,7 +2604,6 @@ declare_lint! { "detects a generic constant is used in a type without a emitting a warning", @future_incompatible = FutureIncompatibleInfo { reference: "issue #76200 ", - edition: None, }; } @@ -2688,7 +2662,6 @@ declare_lint! { "uninhabited static", @future_incompatible = FutureIncompatibleInfo { reference: "issue #74840 ", - edition: None, }; } @@ -2758,7 +2731,6 @@ declare_lint! { "unsupported naked function definitions", @future_incompatible = FutureIncompatibleInfo { reference: "issue #32408 ", - edition: None, }; } @@ -2831,7 +2803,6 @@ declare_lint! { "trailing semicolon in macro body used as expression", @future_incompatible = FutureIncompatibleInfo { reference: "issue #79813 ", - edition: None, }; } @@ -3154,7 +3125,6 @@ declare_lint! { "detects invalid `#[doc(...)]` attributes", @future_incompatible = FutureIncompatibleInfo { reference: "issue #82730 ", - edition: None, }; } @@ -3201,7 +3171,6 @@ declare_lint! { "detects usage of old versions of certain proc-macro crates", @future_incompatible = FutureIncompatibleInfo { reference: "issue #83125 ", - edition: None, future_breakage: Some(FutureBreakage { date: None }) @@ -3242,7 +3211,7 @@ declare_lint! { "detects usage of old versions of or-patterns", @future_incompatible = FutureIncompatibleInfo { reference: "issue #84869 ", - edition: Some(Edition::Edition2021), + reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021), }; } @@ -3291,6 +3260,6 @@ declare_lint! { prelude in future editions", @future_incompatible = FutureIncompatibleInfo { reference: "issue #85684 ", - edition: Some(Edition::Edition2021), + reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021), }; } diff --git a/compiler/rustc_lint_defs/src/lib.rs b/compiler/rustc_lint_defs/src/lib.rs index f1c4e5fb4a368..b3d98747dcfa2 100644 --- a/compiler/rustc_lint_defs/src/lib.rs +++ b/compiler/rustc_lint_defs/src/lib.rs @@ -142,15 +142,39 @@ pub struct Lint { pub struct FutureIncompatibleInfo { /// e.g., a URL for an issue/PR/RFC or error code pub reference: &'static str, - /// If this is an edition fixing lint, the edition in which - /// this lint becomes obsolete - pub edition: Option, + /// The reason for the lint used by diagnostics to provide + /// the right help message + pub reason: FutureIncompatibilityReason, /// Information about a future breakage, which will /// be emitted in JSON messages to be displayed by Cargo /// for upstream deps pub future_breakage: Option, } +/// The reason for future incompatibility +#[derive(Copy, Clone, Debug)] +pub enum FutureIncompatibilityReason { + /// This will be an error in a future release + /// for all editions + FutureReleaseError, + /// Previously accepted code that will become an + /// error in the provided edition + EditionError(Edition), + /// Code that changes meaning in some way in + /// the provided edition + EditionSemanticsChange(Edition), +} + +impl FutureIncompatibilityReason { + pub fn edition(self) -> Option { + match self { + Self::EditionError(e) => Some(e), + Self::EditionSemanticsChange(e) => Some(e), + _ => None, + } + } +} + #[derive(Copy, Clone, Debug)] pub struct FutureBreakage { pub date: Option<&'static str>, @@ -158,7 +182,11 @@ pub struct FutureBreakage { impl FutureIncompatibleInfo { pub const fn default_fields_for_macro() -> Self { - FutureIncompatibleInfo { reference: "", edition: None, future_breakage: None } + FutureIncompatibleInfo { + reference: "", + reason: FutureIncompatibilityReason::FutureReleaseError, + future_breakage: None, + } } } diff --git a/compiler/rustc_metadata/src/dynamic_lib.rs b/compiler/rustc_metadata/src/dynamic_lib.rs index 1a900ccbf65fa..e8929cd5c0237 100644 --- a/compiler/rustc_metadata/src/dynamic_lib.rs +++ b/compiler/rustc_metadata/src/dynamic_lib.rs @@ -70,13 +70,12 @@ mod dl { use std::sync::{Mutex, MutexGuard}; pub fn lock() -> MutexGuard<'static, Guard> { - static LOCK: SyncLazy> = SyncLazy::new(|| Mutex::new(Guard { _priv: () })); + static LOCK: SyncLazy> = SyncLazy::new(|| Mutex::new(Guard)); LOCK.lock().unwrap() } - pub struct Guard { - _priv: (), - } + #[non_exhaustive] + pub struct Guard; impl Guard { pub fn get(&mut self) -> Result<(), String> { diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index 4c7ea937ceb7d..8180d853f6073 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -7,7 +7,7 @@ use rustc_errors::{DiagnosticBuilder, DiagnosticId}; use rustc_hir::HirId; use rustc_session::lint::{ builtin::{self, FORBIDDEN_LINT_GROUPS}, - Level, Lint, LintId, + FutureIncompatibilityReason, Level, Lint, LintId, }; use rustc_session::{DiagnosticMessageId, Session}; use rustc_span::hygiene::MacroKind; @@ -292,7 +292,7 @@ pub fn struct_lint_level<'s, 'd>( // if this lint occurs in the expansion of a macro from an external crate, // allow individual lints to opt-out from being reported. let not_future_incompatible = - future_incompatible.map(|f| f.edition.is_some()).unwrap_or(true); + future_incompatible.map(|f| f.reason.edition().is_some()).unwrap_or(true); if not_future_incompatible && !lint.report_in_external_macro { err.cancel(); // Don't continue further, since we don't want to have @@ -373,9 +373,6 @@ pub fn struct_lint_level<'s, 'd>( err.code(DiagnosticId::Lint { name, has_future_breakage }); 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 associated item is added to the standard library, the ambiguity may \ cause an error or change in behavior!" @@ -384,10 +381,22 @@ pub fn struct_lint_level<'s, 'd>( "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) + } else if let FutureIncompatibilityReason::EditionError(edition) = + future_incompatible.reason + { + let current_edition = sess.edition(); + format!( + "this is accepted in the current edition (Rust {}) but is a hard error in Rust {}!", + current_edition, edition + ) + } else if let FutureIncompatibilityReason::EditionSemanticsChange(edition) = + future_incompatible.reason + { + format!("this changes meaning in Rust {}", edition) } else { - format!("{} in a future release!", STANDARD_MESSAGE) + "this was previously accepted by the compiler but is being phased out; \ + it will become a hard error in a future release!" + .to_owned() }; let citation = format!("for more information, see {}", future_incompatible.reference); err.warn(&explanation); diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index a74070100f413..77f955e93b9dd 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -43,7 +43,8 @@ use rustc_hir::definitions::Definitions; use rustc_hir::intravisit::Visitor; use rustc_hir::lang_items::LangItem; use rustc_hir::{ - Constness, HirId, ItemKind, ItemLocalId, ItemLocalMap, ItemLocalSet, Node, TraitCandidate, + Constness, ExprKind, HirId, ImplItemKind, ItemKind, ItemLocalId, ItemLocalMap, ItemLocalSet, + Node, TraitCandidate, TraitItemKind, }; use rustc_index::vec::{Idx, IndexVec}; use rustc_macros::HashStable; @@ -1498,18 +1499,14 @@ impl<'tcx> TyCtxt<'tcx> { } pub fn return_type_impl_trait(self, scope_def_id: LocalDefId) -> Option<(Ty<'tcx>, Span)> { - // HACK: `type_of_def_id()` will fail on these (#55796), so return `None`. + // `type_of()` will fail on these (#55796, #86483), so only allow `fn`s or closures. let hir_id = self.hir().local_def_id_to_hir_id(scope_def_id); match self.hir().get(hir_id) { - Node::Item(item) => { - match item.kind { - ItemKind::Fn(..) => { /* `type_of_def_id()` will work */ } - _ => { - return None; - } - } - } - _ => { /* `type_of_def_id()` will work or panic */ } + Node::Item(&hir::Item { kind: ItemKind::Fn(..), .. }) => {} + Node::TraitItem(&hir::TraitItem { kind: TraitItemKind::Fn(..), .. }) => {} + Node::ImplItem(&hir::ImplItem { kind: ImplItemKind::Fn(..), .. }) => {} + Node::Expr(&hir::Expr { kind: ExprKind::Closure(..), .. }) => {} + _ => return None, } let ret_ty = self.type_of(scope_def_id); diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 1d9ff512288db..5dc5080712ec3 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1370,8 +1370,8 @@ pub type Region<'tcx> = &'tcx RegionKind; /// happen, you can use `leak_check`. This is more clearly explained /// by the [rustc dev guide]. /// -/// [1]: http://smallcultfollowing.com/babysteps/blog/2013/10/29/intermingled-parameter-lists/ -/// [2]: http://smallcultfollowing.com/babysteps/blog/2013/11/04/intermingled-parameter-lists/ +/// [1]: https://smallcultfollowing.com/babysteps/blog/2013/10/29/intermingled-parameter-lists/ +/// [2]: https://smallcultfollowing.com/babysteps/blog/2013/11/04/intermingled-parameter-lists/ /// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/hrtb.html #[derive(Clone, PartialEq, Eq, Hash, Copy, TyEncodable, TyDecodable, PartialOrd, Ord)] pub enum RegionKind { diff --git a/compiler/rustc_mir/src/borrow_check/region_infer/mod.rs b/compiler/rustc_mir/src/borrow_check/region_infer/mod.rs index dded7a7e3cf99..0306782bfe442 100644 --- a/compiler/rustc_mir/src/borrow_check/region_infer/mod.rs +++ b/compiler/rustc_mir/src/borrow_check/region_infer/mod.rs @@ -1380,7 +1380,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { /// terms that the "longer free region" `'a` outlived the "shorter free region" `'b`. /// /// More details can be found in this blog post by Niko: - /// + /// /// /// In the canonical example /// diff --git a/compiler/rustc_parse/src/lexer/unicode_chars.rs b/compiler/rustc_parse/src/lexer/unicode_chars.rs index 40e2e34aa0589..3eebc088f3fb7 100644 --- a/compiler/rustc_parse/src/lexer/unicode_chars.rs +++ b/compiler/rustc_parse/src/lexer/unicode_chars.rs @@ -1,5 +1,5 @@ // Characters and their corresponding confusables were collected from -// http://www.unicode.org/Public/security/10.0.0/confusables.txt +// https://www.unicode.org/Public/security/10.0.0/confusables.txt use super::StringReader; use crate::token; diff --git a/compiler/rustc_target/src/abi/call/msp430.rs b/compiler/rustc_target/src/abi/call/msp430.rs index 3004bb9ff5d5b..0ba73657b5b08 100644 --- a/compiler/rustc_target/src/abi/call/msp430.rs +++ b/compiler/rustc_target/src/abi/call/msp430.rs @@ -1,5 +1,5 @@ // Reference: MSP430 Embedded Application Binary Interface -// http://www.ti.com/lit/an/slaa534/slaa534.pdf +// https://www.ti.com/lit/an/slaa534a/slaa534a.pdf use crate::abi::call::{ArgAbi, FnAbi}; diff --git a/compiler/rustc_target/src/abi/call/nvptx.rs b/compiler/rustc_target/src/abi/call/nvptx.rs index 693337f0e52fd..428dd95bbcd65 100644 --- a/compiler/rustc_target/src/abi/call/nvptx.rs +++ b/compiler/rustc_target/src/abi/call/nvptx.rs @@ -1,5 +1,5 @@ // Reference: PTX Writer's Guide to Interoperability -// http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability +// https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability use crate::abi::call::{ArgAbi, FnAbi}; diff --git a/compiler/rustc_target/src/abi/call/nvptx64.rs b/compiler/rustc_target/src/abi/call/nvptx64.rs index b9c9296dbacc7..16f331b16d561 100644 --- a/compiler/rustc_target/src/abi/call/nvptx64.rs +++ b/compiler/rustc_target/src/abi/call/nvptx64.rs @@ -1,5 +1,5 @@ // Reference: PTX Writer's Guide to Interoperability -// http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability +// https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability use crate::abi::call::{ArgAbi, FnAbi}; diff --git a/compiler/rustc_target/src/abi/call/x86.rs b/compiler/rustc_target/src/abi/call/x86.rs index 713b4100a3335..ff8849e1cf83b 100644 --- a/compiler/rustc_target/src/abi/call/x86.rs +++ b/compiler/rustc_target/src/abi/call/x86.rs @@ -38,7 +38,7 @@ where // small structs are returned as integers. // // Some links: - // http://www.angelcode.com/dev/callconv/callconv.html + // https://www.angelcode.com/dev/callconv/callconv.html // Clang's ABI handling is in lib/CodeGen/TargetInfo.cpp let t = cx.target_spec(); if t.abi_return_struct_as_int { diff --git a/compiler/rustc_target/src/abi/mod.rs b/compiler/rustc_target/src/abi/mod.rs index e3a721fc7369e..9a24edf1a42cb 100644 --- a/compiler/rustc_target/src/abi/mod.rs +++ b/compiler/rustc_target/src/abi/mod.rs @@ -16,7 +16,7 @@ use rustc_span::Span; pub mod call; -/// Parsed [Data layout](http://llvm.org/docs/LangRef.html#data-layout) +/// Parsed [Data layout](https://llvm.org/docs/LangRef.html#data-layout) /// for a target, which contains everything needed to compute layouts. pub struct TargetDataLayout { pub endian: Endian, diff --git a/compiler/rustc_target/src/spec/aarch64_linux_android.rs b/compiler/rustc_target/src/spec/aarch64_linux_android.rs index eaf3a2dbcf8c2..d00883ae71ad3 100644 --- a/compiler/rustc_target/src/spec/aarch64_linux_android.rs +++ b/compiler/rustc_target/src/spec/aarch64_linux_android.rs @@ -6,7 +6,7 @@ use crate::spec::{SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { let mut base = super::android_base::opts(); base.max_atomic_width = Some(128); - // As documented in http://developer.android.com/ndk/guides/cpu-features.html + // As documented in https://developer.android.com/ndk/guides/cpu-features.html // the neon (ASIMD) and FP must exist on all android aarch64 targets. base.features = "+neon,+fp-armv8".to_string(); base.supported_sanitizers = SanitizerSet::HWADDRESS; diff --git a/compiler/rustc_target/src/spec/i686_linux_android.rs b/compiler/rustc_target/src/spec/i686_linux_android.rs index 19d7b3c95cf6d..640f9e42f4ab1 100644 --- a/compiler/rustc_target/src/spec/i686_linux_android.rs +++ b/compiler/rustc_target/src/spec/i686_linux_android.rs @@ -8,7 +8,7 @@ pub fn target() -> Target { base.max_atomic_width = Some(64); - // http://developer.android.com/ndk/guides/abis.html#x86 + // https://developer.android.com/ndk/guides/abis.html#x86 base.cpu = "pentiumpro".to_string(); base.features = "+mmx,+sse,+sse2,+sse3,+ssse3".to_string(); // don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 0736ffb52f77a..0bf89c3f93b99 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -25,7 +25,7 @@ //! //! # Defining a new target //! -//! Targets are defined using [JSON](http://json.org/). The `Target` struct in +//! Targets are defined using [JSON](https://json.org/). The `Target` struct in //! this module defines the format the JSON file should take, though each //! underscore in the field names should be replaced with a hyphen (`-`) in the //! JSON file. Some fields are required in every target specification, such as @@ -950,7 +950,7 @@ pub struct Target { /// Architecture to use for ABI considerations. Valid options include: "x86", /// "x86_64", "arm", "aarch64", "mips", "powerpc", "powerpc64", and others. pub arch: String, - /// [Data layout](http://llvm.org/docs/LangRef.html#data-layout) to pass to LLVM. + /// [Data layout](https://llvm.org/docs/LangRef.html#data-layout) to pass to LLVM. pub data_layout: String, /// Optional settings with defaults. pub options: TargetOptions, diff --git a/compiler/rustc_traits/src/chalk/lowering.rs b/compiler/rustc_traits/src/chalk/lowering.rs index 39890fd5b0574..a838172d664c3 100644 --- a/compiler/rustc_traits/src/chalk/lowering.rs +++ b/compiler/rustc_traits/src/chalk/lowering.rs @@ -8,7 +8,7 @@ //! ## `Ty` lowering //! Much of the `Ty` lowering is 1:1 with Chalk. (Or will be eventually). A //! helpful table for what types lower to what can be found in the -//! [Chalk book](http://rust-lang.github.io/chalk/book/types/rust_types.html). +//! [Chalk book](https://rust-lang.github.io/chalk/book/types/rust_types.html). //! The most notable difference lies with `Param`s. To convert from rustc to //! Chalk, we eagerly and deeply convert `Param`s to placeholders (in goals) or //! bound variables (for clause generation through functions in `db`). diff --git a/compiler/rustc_typeck/src/collect/type_of.rs b/compiler/rustc_typeck/src/collect/type_of.rs index 78fa8074a64cf..ee84974cb73c2 100644 --- a/compiler/rustc_typeck/src/collect/type_of.rs +++ b/compiler/rustc_typeck/src/collect/type_of.rs @@ -492,7 +492,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> { x => tcx.ty_error_with_message( DUMMY_SP, - &format!("unexpected const parent in type_of_def_id(): {:?}", x), + &format!("unexpected const parent in type_of(): {:?}", x), ), } } @@ -504,7 +504,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> { }, x => { - bug!("unexpected sort of node in type_of_def_id(): {:?}", x); + bug!("unexpected sort of node in type_of(): {:?}", x); } } } diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index dcd6489920492..4c8ea6902ff14 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -1042,7 +1042,7 @@ where } /// This merge sort borrows some (but not all) ideas from TimSort, which is described in detail -/// [here](http://svn.python.org/projects/python/trunk/Objects/listsort.txt). +/// [here](https://github.com/python/cpython/blob/main/Objects/listsort.txt). /// /// The algorithm identifies strictly descending and non-descending subsequences, which are called /// natural runs. There is a stack of pending runs yet to be merged. Each newly found run is pushed diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs index 57279e81a9578..62ba2e5765507 100644 --- a/library/alloc/src/str.rs +++ b/library/alloc/src/str.rs @@ -396,7 +396,7 @@ impl str { return s; fn map_uppercase_sigma(from: &str, i: usize, to: &mut String) { - // See http://www.unicode.org/versions/Unicode7.0.0/ch03.pdf#G33992 + // See https://www.unicode.org/versions/Unicode7.0.0/ch03.pdf#G33992 // for the definition of `Final_Sigma`. debug_assert!('Σ'.len_utf8() == 2); let is_word_final = case_ignoreable_then_cased(from[..i].chars().rev()) diff --git a/library/core/benches/iter.rs b/library/core/benches/iter.rs index f2169914ac9da..24257ba98785d 100644 --- a/library/core/benches/iter.rs +++ b/library/core/benches/iter.rs @@ -45,7 +45,7 @@ fn bench_max_by_key(b: &mut Bencher) { }) } -// http://www.reddit.com/r/rust/comments/31syce/using_iterators_to_find_the_index_of_the_min_or/ +// https://www.reddit.com/r/rust/comments/31syce/using_iterators_to_find_the_index_of_the_min_or/ #[bench] fn bench_max_by_key2(b: &mut Bencher) { fn max_index_iter(array: &[i32]) -> usize { diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs index 0e7667dd89e64..ccf6e420de7a9 100644 --- a/library/core/src/alloc/layout.rs +++ b/library/core/src/alloc/layout.rs @@ -60,7 +60,7 @@ impl Layout { #[inline] pub const fn from_size_align(size: usize, align: usize) -> Result { if !align.is_power_of_two() { - return Err(LayoutError { private: () }); + return Err(LayoutError); } // (power-of-two implies align != 0.) @@ -78,7 +78,7 @@ impl Layout { // Above implies that checking for summation overflow is both // necessary and sufficient. if size > usize::MAX - (align - 1) { - return Err(LayoutError { private: () }); + return Err(LayoutError); } // SAFETY: the conditions for `from_size_align_unchecked` have been @@ -288,7 +288,7 @@ impl Layout { // > must not overflow (i.e., the rounded value must be less than // > `usize::MAX`) let padded_size = self.size() + self.padding_needed_for(self.align()); - let alloc_size = padded_size.checked_mul(n).ok_or(LayoutError { private: () })?; + let alloc_size = padded_size.checked_mul(n).ok_or(LayoutError)?; // SAFETY: self.align is already known to be valid and alloc_size has been // padded already. @@ -346,8 +346,8 @@ impl Layout { let new_align = cmp::max(self.align(), next.align()); let pad = self.padding_needed_for(next.align()); - let offset = self.size().checked_add(pad).ok_or(LayoutError { private: () })?; - let new_size = offset.checked_add(next.size()).ok_or(LayoutError { private: () })?; + let offset = self.size().checked_add(pad).ok_or(LayoutError)?; + let new_size = offset.checked_add(next.size()).ok_or(LayoutError)?; let layout = Layout::from_size_align(new_size, new_align)?; Ok((layout, offset)) @@ -368,7 +368,7 @@ impl Layout { #[unstable(feature = "alloc_layout_extra", issue = "55724")] #[inline] pub fn repeat_packed(&self, n: usize) -> Result { - let size = self.size().checked_mul(n).ok_or(LayoutError { private: () })?; + let size = self.size().checked_mul(n).ok_or(LayoutError)?; Layout::from_size_align(size, self.align()) } @@ -381,7 +381,7 @@ impl Layout { #[unstable(feature = "alloc_layout_extra", issue = "55724")] #[inline] pub fn extend_packed(&self, next: Self) -> Result { - let new_size = self.size().checked_add(next.size()).ok_or(LayoutError { private: () })?; + let new_size = self.size().checked_add(next.size()).ok_or(LayoutError)?; Layout::from_size_align(new_size, self.align()) } @@ -409,10 +409,9 @@ pub type LayoutErr = LayoutError; /// or some other `Layout` constructor /// do not satisfy its documented constraints. #[stable(feature = "alloc_layout_error", since = "1.50.0")] +#[non_exhaustive] #[derive(Clone, PartialEq, Eq, Debug)] -pub struct LayoutError { - private: (), -} +pub struct LayoutError; // (we need this for downstream impl of trait Error) #[stable(feature = "alloc_layout", since = "1.28.0")] diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index 6af010e796d67..24b0797f93a50 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -593,8 +593,8 @@ pub struct RefCell { /// An error returned by [`RefCell::try_borrow`]. #[stable(feature = "try_borrow", since = "1.13.0")] +#[non_exhaustive] pub struct BorrowError { - _private: (), #[cfg(feature = "debug_refcell")] location: &'static crate::panic::Location<'static>, } @@ -620,8 +620,8 @@ impl Display for BorrowError { /// An error returned by [`RefCell::try_borrow_mut`]. #[stable(feature = "try_borrow", since = "1.13.0")] +#[non_exhaustive] pub struct BorrowMutError { - _private: (), #[cfg(feature = "debug_refcell")] location: &'static crate::panic::Location<'static>, } @@ -872,7 +872,6 @@ impl RefCell { Ok(Ref { value: unsafe { &*self.value.get() }, borrow: b }) } None => Err(BorrowError { - _private: (), // If a borrow occured, then we must already have an outstanding borrow, // so `borrowed_at` will be `Some` #[cfg(feature = "debug_refcell")] @@ -958,7 +957,6 @@ impl RefCell { Ok(RefMut { value: unsafe { &mut *self.value.get() }, borrow: b }) } None => Err(BorrowMutError { - _private: (), // If a borrow occured, then we must already have an outstanding borrow, // so `borrowed_at` will be `Some` #[cfg(feature = "debug_refcell")] @@ -1080,7 +1078,6 @@ impl RefCell { Ok(unsafe { &*self.value.get() }) } else { Err(BorrowError { - _private: (), // If a borrow occured, then we must already have an outstanding borrow, // so `borrowed_at` will be `Some` #[cfg(feature = "debug_refcell")] diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs index 80d0890551fd2..e5af22c8fbbef 100644 --- a/library/core/src/char/methods.rs +++ b/library/core/src/char/methods.rs @@ -15,8 +15,8 @@ impl char { /// Point], but only ones within a certain range. `MAX` is the highest valid /// code point that's a valid [Unicode Scalar Value]. /// - /// [Unicode Scalar Value]: http://www.unicode.org/glossary/#unicode_scalar_value - /// [Code Point]: http://www.unicode.org/glossary/#code_point + /// [Unicode Scalar Value]: https://www.unicode.org/glossary/#unicode_scalar_value + /// [Code Point]: https://www.unicode.org/glossary/#code_point #[stable(feature = "assoc_char_consts", since = "1.52.0")] pub const MAX: char = '\u{10ffff}'; @@ -28,7 +28,7 @@ impl char { #[stable(feature = "assoc_char_consts", since = "1.52.0")] pub const REPLACEMENT_CHARACTER: char = '\u{FFFD}'; - /// The version of [Unicode](http://www.unicode.org/) that the Unicode parts of + /// The version of [Unicode](https://www.unicode.org/) that the Unicode parts of /// `char` and `str` methods are based on. /// /// New versions of Unicode are released regularly and subsequently all methods @@ -1494,8 +1494,8 @@ impl char { /// before using this function. /// /// [infra-aw]: https://infra.spec.whatwg.org/#ascii-whitespace - /// [pct]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01 - /// [bfs]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05 + /// [pct]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01 + /// [bfs]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05 /// /// # Examples /// diff --git a/library/core/src/char/mod.rs b/library/core/src/char/mod.rs index 25a7c1de9de4b..0728523d0a413 100644 --- a/library/core/src/char/mod.rs +++ b/library/core/src/char/mod.rs @@ -5,8 +5,8 @@ //! scalar value]', which is similar to, but not the same as, a '[Unicode code //! point]'. //! -//! [Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value -//! [Unicode code point]: http://www.unicode.org/glossary/#code_point +//! [Unicode scalar value]: https://www.unicode.org/glossary/#unicode_scalar_value +//! [Unicode code point]: https://www.unicode.org/glossary/#code_point //! //! This module exists for technical reasons, the primary documentation for //! `char` is directly on [the `char` primitive type][char] itself. @@ -95,8 +95,8 @@ const MAX_THREE_B: u32 = 0x10000; /// Point], but only ones within a certain range. `MAX` is the highest valid /// code point that's a valid [Unicode Scalar Value]. /// -/// [Unicode Scalar Value]: http://www.unicode.org/glossary/#unicode_scalar_value -/// [Code Point]: http://www.unicode.org/glossary/#code_point +/// [Unicode Scalar Value]: https://www.unicode.org/glossary/#unicode_scalar_value +/// [Code Point]: https://www.unicode.org/glossary/#code_point #[stable(feature = "rust1", since = "1.0.0")] pub const MAX: char = char::MAX; diff --git a/library/core/src/convert/num.rs b/library/core/src/convert/num.rs index a522b7da3bd1c..1d3a12962145e 100644 --- a/library/core/src/convert/num.rs +++ b/library/core/src/convert/num.rs @@ -145,7 +145,7 @@ impl_from! { i16, isize, #[stable(feature = "lossless_iusize_conv", since = "1.2 // CHERI proposes 256-bit “capabilities”. Unclear if this would be relevant to usize/isize. // https://www.cl.cam.ac.uk/research/security/ctsrd/pdfs/20171017a-cheri-poster.pdf -// http://www.csl.sri.com/users/neumann/2012resolve-cheri.pdf +// https://www.csl.sri.com/users/neumann/2012resolve-cheri.pdf // Note: integers can only be represented with full precision in a float if // they fit in the significand, which is 24 bits in f32 and 53 bits in f64. diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 70ab27cbfac57..baa0952c8bb75 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -25,7 +25,7 @@ //! across other volatile intrinsics. See the LLVM documentation on //! [[volatile]]. //! -//! [volatile]: http://llvm.org/docs/LangRef.html#volatile-memory-accesses +//! [volatile]: https://llvm.org/docs/LangRef.html#volatile-memory-accesses //! //! # Atomics //! @@ -33,7 +33,7 @@ //! words, with multiple possible memory orderings. They obey the same //! semantics as C++11. See the LLVM documentation on [[atomics]]. //! -//! [atomics]: http://llvm.org/docs/Atomics.html +//! [atomics]: https://llvm.org/docs/Atomics.html //! //! A quick refresher on memory ordering: //! diff --git a/library/core/src/num/dec2flt/mod.rs b/library/core/src/num/dec2flt/mod.rs index f008a64ffe653..6b4215c20ad66 100644 --- a/library/core/src/num/dec2flt/mod.rs +++ b/library/core/src/num/dec2flt/mod.rs @@ -33,7 +33,7 @@ //! //! Primarily, this module and its children implement the algorithms described in: //! "How to Read Floating Point Numbers Accurately" by William D. Clinger, -//! available online: +//! available online: //! //! In addition, there are numerous helper functions that are used in the paper but not available //! in Rust (or at least in core). Our version is additionally complicated by the need to handle diff --git a/library/core/src/num/flt2dec/mod.rs b/library/core/src/num/flt2dec/mod.rs index 93bdf5040e08b..6232ea3e44c5c 100644 --- a/library/core/src/num/flt2dec/mod.rs +++ b/library/core/src/num/flt2dec/mod.rs @@ -49,7 +49,7 @@ the supplied buffer and let the algorithm to return. # Implementation overview It is easy to get the floating point printing correct but slow (Russ Cox has -[demonstrated](http://research.swtch.com/ftoa) how it's easy), or incorrect but +[demonstrated](https://research.swtch.com/ftoa) how it's easy), or incorrect but fast (naïve division and modulo). But it is surprisingly hard to print floating point numbers correctly *and* efficiently. diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 6351f9564a4ef..02434b781e49a 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -590,8 +590,8 @@ impl u8 { /// before using this function. /// /// [infra-aw]: https://infra.spec.whatwg.org/#ascii-whitespace - /// [pct]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01 - /// [bfs]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05 + /// [pct]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01 + /// [bfs]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05 /// /// # Examples /// diff --git a/library/core/src/slice/sort.rs b/library/core/src/slice/sort.rs index 2a7693d27efa2..36c2c4abdb4c5 100644 --- a/library/core/src/slice/sort.rs +++ b/library/core/src/slice/sort.rs @@ -227,7 +227,7 @@ where /// Partitioning is performed block-by-block in order to minimize the cost of branching operations. /// This idea is presented in the [BlockQuicksort][pdf] paper. /// -/// [pdf]: http://drops.dagstuhl.de/opus/volltexte/2016/6389/pdf/LIPIcs-ESA-2016-38.pdf +/// [pdf]: https://drops.dagstuhl.de/opus/volltexte/2016/6389/pdf/LIPIcs-ESA-2016-38.pdf fn partition_in_blocks(v: &mut [T], pivot: &T, is_less: &mut F) -> usize where F: FnMut(&T, &T) -> bool, diff --git a/library/core/src/str/error.rs b/library/core/src/str/error.rs index ccf7b20285cb3..aa735a14cbd8f 100644 --- a/library/core/src/str/error.rs +++ b/library/core/src/str/error.rs @@ -118,10 +118,9 @@ impl fmt::Display for Utf8Error { /// /// [`from_str`]: super::FromStr::from_str #[derive(Debug, Clone, PartialEq, Eq)] +#[non_exhaustive] #[stable(feature = "rust1", since = "1.0.0")] -pub struct ParseBoolError { - pub(super) _priv: (), -} +pub struct ParseBoolError; #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Display for ParseBoolError { diff --git a/library/core/src/str/traits.rs b/library/core/src/str/traits.rs index 0a2743b1c31e5..12d79a56a527c 100644 --- a/library/core/src/str/traits.rs +++ b/library/core/src/str/traits.rs @@ -585,7 +585,7 @@ impl FromStr for bool { match s { "true" => Ok(true), "false" => Ok(false), - _ => Err(ParseBoolError { _priv: () }), + _ => Err(ParseBoolError), } } } diff --git a/library/core/src/unicode/mod.rs b/library/core/src/unicode/mod.rs index 37ca0a0779b17..72fa059b787df 100644 --- a/library/core/src/unicode/mod.rs +++ b/library/core/src/unicode/mod.rs @@ -4,7 +4,7 @@ pub(crate) mod printable; mod unicode_data; -/// The version of [Unicode](http://www.unicode.org/) that the Unicode parts of +/// The version of [Unicode](https://www.unicode.org/) that the Unicode parts of /// `char` and `str` methods are based on. /// /// New versions of Unicode are released regularly and subsequently all methods diff --git a/library/core/src/unicode/printable.py b/library/core/src/unicode/printable.py index 91db6381c9b66..c42850d232413 100755 --- a/library/core/src/unicode/printable.py +++ b/library/core/src/unicode/printable.py @@ -130,7 +130,7 @@ def print_normal(normal, normalname): print("];") def main(): - file = get_file("http://www.unicode.org/Public/UNIDATA/UnicodeData.txt") + file = get_file("https://www.unicode.org/Public/UNIDATA/UnicodeData.txt") codepoints = get_codepoints(file) diff --git a/library/panic_unwind/src/dwarf/eh.rs b/library/panic_unwind/src/dwarf/eh.rs index 6dbf7c11b4c4e..7394feab82f22 100644 --- a/library/panic_unwind/src/dwarf/eh.rs +++ b/library/panic_unwind/src/dwarf/eh.rs @@ -1,9 +1,9 @@ //! Parsing of GCC-style Language-Specific Data Area (LSDA) //! For details see: -//! * -//! * -//! * -//! * +//! * +//! * +//! * +//! * //! //! A reference implementation may be found in the GCC source tree //! (`/libgcc/unwind-c.c` as of this writing). diff --git a/library/panic_unwind/src/gcc.rs b/library/panic_unwind/src/gcc.rs index 14f49bbf48337..9d6ede73e3db1 100644 --- a/library/panic_unwind/src/gcc.rs +++ b/library/panic_unwind/src/gcc.rs @@ -5,8 +5,8 @@ //! documents linked from it. //! These are also good reads: //! * -//! * -//! * +//! * +//! * //! //! ## A brief summary //! @@ -94,7 +94,7 @@ fn rust_exception_class() -> uw::_Unwind_Exception_Class { // and TargetLowering::getExceptionSelectorRegister() for each architecture, // then mapped to DWARF register numbers via register definition tables // (typically RegisterInfo.td, search for "DwarfRegNum"). -// See also http://llvm.org/docs/WritingAnLLVMBackend.html#defining-a-register. +// See also https://llvm.org/docs/WritingAnLLVMBackend.html#defining-a-register. #[cfg(target_arch = "x86")] const UNWIND_DATA_REG: (i32, i32) = (0, 2); // EAX, EDX @@ -130,7 +130,7 @@ const UNWIND_DATA_REG: (i32, i32) = (10, 11); // x10, x11 cfg_if::cfg_if! { if #[cfg(all(target_arch = "arm", not(target_os = "ios"), not(target_os = "netbsd")))] { // ARM EHABI personality routine. - // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf + // https://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf // // iOS uses the default routine instead since it uses SjLj unwinding. #[lang = "eh_personality"] diff --git a/library/panic_unwind/src/seh.rs b/library/panic_unwind/src/seh.rs index 58028d4057647..754dbb77af6ca 100644 --- a/library/panic_unwind/src/seh.rs +++ b/library/panic_unwind/src/seh.rs @@ -42,7 +42,7 @@ //! of the `try` intrinsic. //! //! [win64]: https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64 -//! [llvm]: http://llvm.org/docs/ExceptionHandling.html#background-on-windows-exceptions +//! [llvm]: https://llvm.org/docs/ExceptionHandling.html#background-on-windows-exceptions #![allow(nonstandard_style)] @@ -100,7 +100,7 @@ struct Exception { // In any case, these structures are all constructed in a similar manner, and // it's just somewhat verbose for us. // -// [1]: http://www.geoffchappell.com/studies/msvc/language/predefined/ +// [1]: https://www.geoffchappell.com/studies/msvc/language/predefined/ #[cfg(target_arch = "x86")] #[macro_use] diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index c9079b1cbadc2..7586229504c22 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -85,14 +85,13 @@ impl !Sync for TokenStream {} /// Error returned from `TokenStream::from_str`. #[stable(feature = "proc_macro_lib", since = "1.15.0")] +#[non_exhaustive] #[derive(Debug)] -pub struct LexError { - _inner: (), -} +pub struct LexError; impl LexError { fn new() -> Self { - LexError { _inner: () } + LexError } } diff --git a/library/std/src/env.rs b/library/std/src/env.rs index 4403280efc11b..64f88c1aba68e 100644 --- a/library/std/src/env.rs +++ b/library/std/src/env.rs @@ -305,7 +305,7 @@ impl Error for VarError { /// /// Discussion of this unsafety on Unix may be found in: /// -/// - [Austin Group Bugzilla](http://austingroupbugs.net/view.php?id=188) +/// - [Austin Group Bugzilla](https://austingroupbugs.net/view.php?id=188) /// - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2) /// /// # Panics @@ -344,7 +344,7 @@ fn _set_var(key: &OsStr, value: &OsStr) { /// /// Discussion of this unsafety on Unix may be found in: /// -/// - [Austin Group Bugzilla](http://austingroupbugs.net/view.php?id=188) +/// - [Austin Group Bugzilla](https://austingroupbugs.net/view.php?id=188) /// - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2) /// /// # Panics diff --git a/library/std/src/ffi/mod.rs b/library/std/src/ffi/mod.rs index 0184495eecf09..0b7dc256db8f4 100644 --- a/library/std/src/ffi/mod.rs +++ b/library/std/src/ffi/mod.rs @@ -124,8 +124,8 @@ //! method is an [`OsString`] which can be round-tripped to a Windows //! string losslessly. //! -//! [Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value -//! [Unicode code point]: http://www.unicode.org/glossary/#code_point +//! [Unicode scalar value]: https://www.unicode.org/glossary/#unicode_scalar_value +//! [Unicode code point]: https://www.unicode.org/glossary/#code_point //! [`env::set_var()`]: crate::env::set_var //! [`env::var_os()`]: crate::env::var_os //! [unix.OsStringExt]: crate::os::unix::ffi::OsStringExt diff --git a/library/std/src/io/util.rs b/library/std/src/io/util.rs index f3bff391fb3ea..fd52de7430a20 100644 --- a/library/std/src/io/util.rs +++ b/library/std/src/io/util.rs @@ -13,9 +13,8 @@ use crate::io::{ /// This struct is generally created by calling [`empty()`]. Please see /// the documentation of [`empty()`] for more details. #[stable(feature = "rust1", since = "1.0.0")] -pub struct Empty { - _priv: (), -} +#[non_exhaustive] +pub struct Empty; /// Constructs a new handle to an empty reader. /// @@ -35,7 +34,7 @@ pub struct Empty { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_io_structs", issue = "78812")] pub const fn empty() -> Empty { - Empty { _priv: () } + Empty } #[stable(feature = "rust1", since = "1.0.0")] @@ -172,9 +171,8 @@ impl fmt::Debug for Repeat { /// This struct is generally created by calling [`sink`]. Please /// see the documentation of [`sink()`] for more details. #[stable(feature = "rust1", since = "1.0.0")] -pub struct Sink { - _priv: (), -} +#[non_exhaustive] +pub struct Sink; /// Creates an instance of a writer which will successfully consume all data. /// @@ -195,7 +193,7 @@ pub struct Sink { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_io_structs", issue = "78812")] pub const fn sink() -> Sink { - Sink { _priv: () } + Sink } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index baf1c5aa2b941..4b6d60d121e13 100644 --- a/library/std/src/net/ip.rs +++ b/library/std/src/net/ip.rs @@ -379,7 +379,7 @@ impl Ipv4Addr { /// This property is defined in _UNIX Network Programming, Second Edition_, /// W. Richard Stevens, p. 891; see also [ip7]. /// - /// [ip7]: http://man7.org/linux/man-pages/man7/ip.7.html + /// [ip7]: https://man7.org/linux/man-pages/man7/ip.7.html /// /// # Examples /// diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs index 8a3e425350a68..7bc1f5e918ec9 100644 --- a/library/std/src/primitive_docs.rs +++ b/library/std/src/primitive_docs.rs @@ -277,8 +277,8 @@ mod prim_never {} /// scalar value]', which is similar to, but not the same as, a '[Unicode code /// point]'. /// -/// [Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value -/// [Unicode code point]: http://www.unicode.org/glossary/#code_point +/// [Unicode scalar value]: https://www.unicode.org/glossary/#unicode_scalar_value +/// [Unicode code point]: https://www.unicode.org/glossary/#code_point /// /// This documentation describes a number of methods and trait implementations on the /// `char` type. For technical reasons, there is additional, separate diff --git a/library/std/src/sync/mpsc/mpsc_queue.rs b/library/std/src/sync/mpsc/mpsc_queue.rs index 42bc639dc2527..b93eb056da4f6 100644 --- a/library/std/src/sync/mpsc/mpsc_queue.rs +++ b/library/std/src/sync/mpsc/mpsc_queue.rs @@ -8,8 +8,8 @@ //! method, and see the method for more information about it. Due to this //! caveat, this queue may not be appropriate for all use-cases. -// http://www.1024cores.net/home/lock-free-algorithms -// /queues/non-intrusive-mpsc-node-based-queue +// https://www.1024cores.net/home/lock-free-algorithms +// /queues/non-intrusive-mpsc-node-based-queue #[cfg(all(test, not(target_os = "emscripten")))] mod tests; diff --git a/library/std/src/sync/mpsc/spsc_queue.rs b/library/std/src/sync/mpsc/spsc_queue.rs index 9bf99f193ca3a..7e745eb31de60 100644 --- a/library/std/src/sync/mpsc/spsc_queue.rs +++ b/library/std/src/sync/mpsc/spsc_queue.rs @@ -4,7 +4,7 @@ //! concurrently between two threads. This data structure is safe to use and //! enforces the semantics that there is one pusher and one popper. -// http://www.1024cores.net/home/lock-free-algorithms/queues/unbounded-spsc-queue +// https://www.1024cores.net/home/lock-free-algorithms/queues/unbounded-spsc-queue #[cfg(all(test, not(target_os = "emscripten")))] mod tests; diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs index ca9cc8ca7ba39..27d44abeb74c5 100644 --- a/library/std/src/sys/unix/mod.rs +++ b/library/std/src/sys/unix/mod.rs @@ -240,7 +240,7 @@ cfg_if::cfg_if! { } else if #[cfg(target_os = "macos")] { #[link(name = "System")] // res_init and friends require -lresolv on macOS/iOS. - // See #41582 and http://blog.achernya.com/2013/03/os-x-has-silly-libsystem.html + // See #41582 and https://blog.achernya.com/2013/03/os-x-has-silly-libsystem.html #[link(name = "resolv")] extern "C" {} } else if #[cfg(target_os = "ios")] { diff --git a/library/std/src/sys/windows/process.rs b/library/std/src/sys/windows/process.rs index 81dbea4a06739..ec8b06a1791dd 100644 --- a/library/std/src/sys/windows/process.rs +++ b/library/std/src/sys/windows/process.rs @@ -207,7 +207,7 @@ impl Command { // the remaining portion of this spawn in a mutex. // // For more information, msdn also has an article about this race: - // http://support.microsoft.com/kb/315939 + // https://support.microsoft.com/kb/315939 static CREATE_PROCESS_LOCK: StaticMutex = StaticMutex::new(); let _guard = unsafe { CREATE_PROCESS_LOCK.lock() }; diff --git a/library/std/src/sys/windows/thread_local_key.rs b/library/std/src/sys/windows/thread_local_key.rs index 065365e5572f2..0bc511146654b 100644 --- a/library/std/src/sys/windows/thread_local_key.rs +++ b/library/std/src/sys/windows/thread_local_key.rs @@ -35,7 +35,7 @@ pub type Dtor = unsafe extern "C" fn(*mut u8); // // For more details and nitty-gritty, see the code sections below! // -// [1]: http://www.codeproject.com/Articles/8113/Thread-Local-Storage-The-C-Way +// [1]: https://www.codeproject.com/Articles/8113/Thread-Local-Storage-The-C-Way // [2]: https://github.com/ChromiumWebApps/chromium/blob/master/base // /threading/thread_local_storage_win.cc#L42 diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs index e62f4440b369c..c53290ec0c7d0 100644 --- a/library/std/src/thread/local.rs +++ b/library/std/src/thread/local.rs @@ -324,10 +324,9 @@ macro_rules! __thread_local_inner { /// An error returned by [`LocalKey::try_with`](struct.LocalKey.html#method.try_with). #[stable(feature = "thread_local_try_with", since = "1.26.0")] +#[non_exhaustive] #[derive(Clone, Copy, Eq, PartialEq)] -pub struct AccessError { - _private: (), -} +pub struct AccessError; #[stable(feature = "thread_local_try_with", since = "1.26.0")] impl fmt::Debug for AccessError { @@ -396,7 +395,7 @@ impl LocalKey { F: FnOnce(&T) -> R, { unsafe { - let thread_local = (self.inner)().ok_or(AccessError { _private: () })?; + let thread_local = (self.inner)().ok_or(AccessError)?; Ok(f(thread_local)) } } diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 899cf6841ee1f..003069b338ef2 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -168,7 +168,7 @@ pub struct Instant(time::Instant); /// /// [`insecure_time` usercall]: https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.insecure_time /// [timekeeping in SGX]: https://edp.fortanix.com/docs/concepts/rust-std/#codestdtimecode -/// [gettimeofday]: http://man7.org/linux/man-pages/man2/gettimeofday.2.html +/// [gettimeofday]: https://man7.org/linux/man-pages/man2/gettimeofday.2.html /// [clock_gettime (Realtime Clock)]: https://linux.die.net/man/3/clock_gettime /// [__wasi_clock_time_get (Realtime Clock)]: https://github.com/WebAssembly/WASI/blob/master/phases/snapshot/docs.md#clock_time_get /// [GetSystemTimePreciseAsFileTime]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime diff --git a/library/test/src/stats.rs b/library/test/src/stats.rs index 53f3889447453..45fae9c76b44d 100644 --- a/library/test/src/stats.rs +++ b/library/test/src/stats.rs @@ -19,7 +19,7 @@ pub trait Stats { /// ["Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric /// Predicates"][paper] /// - /// [paper]: http://www.cs.cmu.edu/~quake-papers/robust-arithmetic.ps + /// [paper]: https://www.cs.cmu.edu/~quake-papers/robust-arithmetic.ps fn sum(&self) -> f64; /// Minimum value of the samples. diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 7c7f162b82c04..7864da46013b0 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -77,7 +77,7 @@ def download(path, url, probably_big, verbose): def _download(path, url, probably_big, verbose, exception): if probably_big or verbose: print("downloading {}".format(url)) - # see http://serverfault.com/questions/301128/how-to-download + # see https://serverfault.com/questions/301128/how-to-download if sys.platform == 'win32': run(["PowerShell.exe", "/nologo", "-Command", "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;", diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 347236c655a02..59dc889f2f7da 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -857,7 +857,7 @@ impl Build { } // Work around an apparently bad MinGW / GCC optimization, - // See: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html + // See: https://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78936 if &*target.triple == "i686-pc-windows-gnu" { base.push("-fno-omit-frame-pointer".into()); diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 449fdb87b0224..ea68df0ebcb4e 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -139,7 +139,7 @@ impl Step for Llvm { let _time = util::timeit(&builder); t!(fs::create_dir_all(&out_dir)); - // http://llvm.org/docs/CMake.html + // https://llvm.org/docs/CMake.html let mut cfg = cmake::Config::new(builder.src.join(root)); let profile = match (builder.config.llvm_optimize, builder.config.llvm_release_debuginfo) { @@ -276,7 +276,7 @@ impl Step for Llvm { } } - // http://llvm.org/docs/HowToCrossCompileLLVM.html + // https://llvm.org/docs/HowToCrossCompileLLVM.html if target != builder.config.build { builder.ensure(Llvm { target: builder.config.build }); // FIXME: if the llvm root for the build triple is overridden then we diff --git a/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile b/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile index 8a91859379b33..e2dbc7cfd7c64 100644 --- a/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile @@ -58,7 +58,7 @@ RUN curl https://www.busybox.net/downloads/busybox-1.32.1.tar.bz2 | tar xjf - && # Download the ubuntu rootfs, which we'll use as a chroot for all our tests. WORKDIR /tmp RUN mkdir rootfs/ubuntu -RUN curl http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04.1-base-armhf.tar.gz | \ +RUN curl https://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04.1-base-armhf.tar.gz | \ tar xzf - -C rootfs/ubuntu && \ cd rootfs && mkdir proc sys dev etc etc/init.d diff --git a/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh index 409bca45c94dd..b305f358c5a76 100755 --- a/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh +++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh @@ -39,7 +39,7 @@ rm -rf binutils # Next, download the DragonFly libc and relevant header files -URL=http://mirror-master.dragonflybsd.org/iso-images/dfly-x86_64-5.0.0_REL.iso.bz2 +URL=https://mirror-master.dragonflybsd.org/iso-images/dfly-x86_64-5.0.0_REL.iso.bz2 mkdir dragonfly curl $URL | bzcat | bsdtar xf - -C dragonfly ./usr/include ./usr/lib ./lib diff --git a/src/ci/docker/host-x86_64/dist-arm-linux/arm-linux-gnueabi.config b/src/ci/docker/host-x86_64/dist-arm-linux/arm-linux-gnueabi.config index 66709a4004caf..acdf9a0e04185 100644 --- a/src/ci/docker/host-x86_64/dist-arm-linux/arm-linux-gnueabi.config +++ b/src/ci/docker/host-x86_64/dist-arm-linux/arm-linux-gnueabi.config @@ -711,7 +711,7 @@ CT_ZLIB_PATCH_ORDER="global" CT_ZLIB_V_1_2_11=y # CT_ZLIB_NO_VERSIONS is not set CT_ZLIB_VERSION="1.2.11" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}" +CT_ZLIB_MIRRORS="https://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/src/ci/docker/host-x86_64/dist-armhf-linux/arm-linux-gnueabihf.config b/src/ci/docker/host-x86_64/dist-armhf-linux/arm-linux-gnueabihf.config index a3dcff1c93635..69f86663ec21b 100644 --- a/src/ci/docker/host-x86_64/dist-armhf-linux/arm-linux-gnueabihf.config +++ b/src/ci/docker/host-x86_64/dist-armhf-linux/arm-linux-gnueabihf.config @@ -725,7 +725,7 @@ CT_ZLIB_PATCH_ORDER="global" CT_ZLIB_V_1_2_11=y # CT_ZLIB_NO_VERSIONS is not set CT_ZLIB_VERSION="1.2.11" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}" +CT_ZLIB_MIRRORS="https://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/src/ci/docker/host-x86_64/dist-armv7-linux/armv7-linux-gnueabihf.config b/src/ci/docker/host-x86_64/dist-armv7-linux/armv7-linux-gnueabihf.config index 81b3d7477ec8d..e3d032fc7e8fc 100644 --- a/src/ci/docker/host-x86_64/dist-armv7-linux/armv7-linux-gnueabihf.config +++ b/src/ci/docker/host-x86_64/dist-armv7-linux/armv7-linux-gnueabihf.config @@ -671,7 +671,7 @@ CT_MPFR_PATCH_ORDER="global" CT_MPFR_V_3_1=y # CT_MPFR_NO_VERSIONS is not set CT_MPFR_VERSION="3.1.6" -CT_MPFR_MIRRORS="http://www.mpfr.org/mpfr-${CT_MPFR_VERSION} $(CT_Mirrors GNU mpfr)" +CT_MPFR_MIRRORS="https://www.mpfr.org/mpfr-${CT_MPFR_VERSION} $(CT_Mirrors GNU mpfr)" CT_MPFR_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_MPFR_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_MPFR_ARCHIVE_FORMATS=".tar.xz .tar.bz2 .tar.gz .zip" @@ -711,7 +711,7 @@ CT_ZLIB_PATCH_ORDER="global" CT_ZLIB_V_1_2_11=y # CT_ZLIB_NO_VERSIONS is not set CT_ZLIB_VERSION="1.2.11" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}" +CT_ZLIB_MIRRORS="https://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/src/ci/docker/host-x86_64/dist-riscv64-linux/riscv64-unknown-linux-gnu.config b/src/ci/docker/host-x86_64/dist-riscv64-linux/riscv64-unknown-linux-gnu.config index ffb2e9195b116..96cc2b47457e1 100644 --- a/src/ci/docker/host-x86_64/dist-riscv64-linux/riscv64-unknown-linux-gnu.config +++ b/src/ci/docker/host-x86_64/dist-riscv64-linux/riscv64-unknown-linux-gnu.config @@ -645,7 +645,8 @@ CT_EXPAT_PATCH_ORDER="global" CT_EXPAT_V_2_2=y # CT_EXPAT_NO_VERSIONS is not set CT_EXPAT_VERSION="2.4.1" -CT_EXPAT_MIRRORS="http://downloads.sourceforge.net/project/expat/expat/${CT_EXPAT_VERSION}" +CT_EXPAT_VERSION_TAG="2_4_1" +CT_EXPAT_MIRRORS="https://github.com/libexpat/libexpat/releases/download/R_${CT_EXPAT_VERSION_TAG}/expat-${CT_EXPAT_VERSION}.tar.bz2" CT_EXPAT_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_EXPAT_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_EXPAT_ARCHIVE_FORMATS=".tar.bz2" @@ -862,7 +863,7 @@ CT_ZLIB_PATCH_ORDER="global" CT_ZLIB_V_1_2_11=y # CT_ZLIB_NO_VERSIONS is not set CT_ZLIB_VERSION="1.2.11" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}" +CT_ZLIB_MIRRORS="https://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile index b7f181adf2a09..e363c4f79f9cf 100644 --- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile @@ -27,7 +27,7 @@ RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no g++-8-arm-linux-gnueabi RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7924C5513486 -RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2 main' +RUN add-apt-repository -y 'deb https://apt.dilos.org/dilos dilos2 main' ENV \ AR_x86_64_fuchsia=x86_64-fuchsia-ar \ diff --git a/src/ci/docker/host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh b/src/ci/docker/host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh index f7acedcfb4758..eabff87284dc1 100755 --- a/src/ci/docker/host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh +++ b/src/ci/docker/host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh @@ -7,7 +7,7 @@ target="x86_64-fortanix-unknown-sgx" install_prereq() { curl https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - - add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' + add-apt-repository -y 'deb https://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' apt-get update apt-get install -y --no-install-recommends \ build-essential \ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh index fcf869b68be71..ab44d04d65df2 100755 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh @@ -22,7 +22,7 @@ cd gcc-$GCC # latter host is presented to `wget`! Therefore, we choose to download from the insecure HTTP server # instead here. # -sed -i'' 's|ftp://gcc\.gnu\.org/|http://gcc.gnu.org/|g' ./contrib/download_prerequisites +sed -i'' 's|ftp://gcc\.gnu\.org/|https://gcc.gnu.org/|g' ./contrib/download_prerequisites ./contrib/download_prerequisites mkdir ../gcc-build diff --git a/src/ci/shared.sh b/src/ci/shared.sh index b095afb542d83..1f218bc834608 100644 --- a/src/ci/shared.sh +++ b/src/ci/shared.sh @@ -7,7 +7,7 @@ export MIRRORS_BASE="https://ci-mirrors.rust-lang.org/rustc" -# See http://unix.stackexchange.com/questions/82598 +# See https://unix.stackexchange.com/questions/82598 # Duplicated in docker/dist-various-2/shared.sh function retry { echo "Attempting with retry:" "$@" diff --git a/src/etc/installer/README.md b/src/etc/installer/README.md index dbefe753beeb7..cded3bbf7fc82 100644 --- a/src/etc/installer/README.md +++ b/src/etc/installer/README.md @@ -18,7 +18,7 @@ prefix. You can display these options by running: $ sudo ./install.sh --help -Read [The Book](http://doc.rust-lang.org/book/index.html) to learn how +Read [The Book](https://doc.rust-lang.org/book/index.html) to learn how to use Rust. Rust is primarily distributed under the terms of both the MIT license diff --git a/src/librustdoc/html/static/search.js b/src/librustdoc/html/static/search.js index 617c79a45795a..67be7b9915502 100644 --- a/src/librustdoc/html/static/search.js +++ b/src/librustdoc/html/static/search.js @@ -73,7 +73,7 @@ function removeEmptyStringsFromArray(x) { * Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported * Full License can be found at http://creativecommons.org/licenses/by-sa/3.0/legalcode * This code is an unmodified version of the code written by Marco de Wit - * and was found at http://stackoverflow.com/a/18514751/745719 + * and was found at https://stackoverflow.com/a/18514751/745719 */ var levenshtein_row2 = []; function levenshtein(s1, s2) { diff --git a/src/test/pretty/block-comment-wchar.pp b/src/test/pretty/block-comment-wchar.pp index 2bfcdd75e15cf..2d0a10d4c27d2 100644 --- a/src/test/pretty/block-comment-wchar.pp +++ b/src/test/pretty/block-comment-wchar.pp @@ -90,7 +90,7 @@ } fn main() { - // Taken from http://www.unicode.org/Public/UNIDATA/PropList.txt + // Taken from https://www.unicode.org/Public/UNIDATA/PropList.txt let chars = ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', '\u{85}', '\u{A0}', '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}', diff --git a/src/test/pretty/block-comment-wchar.rs b/src/test/pretty/block-comment-wchar.rs index 93373c5da6558..075230196e392 100644 --- a/src/test/pretty/block-comment-wchar.rs +++ b/src/test/pretty/block-comment-wchar.rs @@ -86,7 +86,7 @@ fn f() { } fn main() { - // Taken from http://www.unicode.org/Public/UNIDATA/PropList.txt + // Taken from https://www.unicode.org/Public/UNIDATA/PropList.txt let chars = ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', '\u{85}', '\u{A0}', '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}', diff --git a/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c b/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c index 52af3dceb109c..c89f8272b1e83 100644 --- a/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c +++ b/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c @@ -1,4 +1,4 @@ -// Pragma needed cause of gcc bug on windows: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991 +// Pragma needed cause of gcc bug on windows: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991 #include diff --git a/src/test/ui/anon-params/anon-params-deprecated.fixed b/src/test/ui/anon-params/anon-params-deprecated.fixed index d288bba5957a2..c09e20770846e 100644 --- a/src/test/ui/anon-params/anon-params-deprecated.fixed +++ b/src/test/ui/anon-params/anon-params-deprecated.fixed @@ -7,13 +7,13 @@ trait T { fn foo(_: i32); //~ WARNING anonymous parameters are deprecated - //~| WARNING hard error + //~| WARNING this is accepted in the current edition fn bar_with_default_impl(_: String, _: String) {} //~^ WARNING anonymous parameters are deprecated - //~| WARNING hard error + //~| WARNING this is accepted in the current edition //~| WARNING anonymous parameters are deprecated - //~| WARNING hard error + //~| WARNING this is accepted in the current edition } fn main() {} diff --git a/src/test/ui/anon-params/anon-params-deprecated.rs b/src/test/ui/anon-params/anon-params-deprecated.rs index d677e0c32b04a..6f7385da040c5 100644 --- a/src/test/ui/anon-params/anon-params-deprecated.rs +++ b/src/test/ui/anon-params/anon-params-deprecated.rs @@ -7,13 +7,13 @@ trait T { fn foo(i32); //~ WARNING anonymous parameters are deprecated - //~| WARNING hard error + //~| WARNING this is accepted in the current edition fn bar_with_default_impl(String, String) {} //~^ WARNING anonymous parameters are deprecated - //~| WARNING hard error + //~| WARNING this is accepted in the current edition //~| WARNING anonymous parameters are deprecated - //~| WARNING hard error + //~| WARNING this is accepted in the current edition } fn main() {} diff --git a/src/test/ui/anon-params/anon-params-deprecated.stderr b/src/test/ui/anon-params/anon-params-deprecated.stderr index c1bf5f690ecba..98d52d659a9d3 100644 --- a/src/test/ui/anon-params/anon-params-deprecated.stderr +++ b/src/test/ui/anon-params/anon-params-deprecated.stderr @@ -9,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 warning: anonymous parameters are deprecated and will be removed in the next edition. @@ -18,7 +18,7 @@ warning: anonymous parameters are deprecated and will be removed in the next edi LL | fn bar_with_default_impl(String, String) {} | ^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: String` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 warning: anonymous parameters are deprecated and will be removed in the next edition. @@ -27,7 +27,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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 warning: 3 warnings emitted diff --git a/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.rs b/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.rs index a3a20cb97e150..50c1639996ee5 100644 --- a/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.rs +++ b/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.rs @@ -3,36 +3,36 @@ mod outer_mod { pub mod await { //~ ERROR `await` is a keyword in the 2018 edition - //~^ WARN this was previously accepted by the compiler + //~^ WARN this is accepted in the current edition pub struct await; //~ ERROR `await` is a keyword in the 2018 edition - //~^ WARN this was previously accepted by the compiler + //~^ WARN this is accepted in the current edition } } use outer_mod::await::await; //~ ERROR `await` is a keyword in the 2018 edition //~^ ERROR `await` is a keyword in the 2018 edition -//~^^ WARN this was previously accepted by the compiler -//~^^^ WARN this was previously accepted by the compiler +//~^^ WARN this is accepted in the current edition +//~^^^ WARN this is accepted in the current edition struct Foo { await: () } //~^ ERROR `await` is a keyword in the 2018 edition -//~^^ WARN this was previously accepted by the compiler +//~^^ WARN this is accepted in the current edition impl Foo { fn await() {} } //~^ ERROR `await` is a keyword in the 2018 edition -//~^^ WARN this was previously accepted by the compiler +//~^^ WARN this is accepted in the current edition macro_rules! await { //~^ ERROR `await` is a keyword in the 2018 edition -//~^^ WARN this was previously accepted by the compiler +//~^^ WARN this is accepted in the current edition () => {} } fn main() { await!(); //~ ERROR `await` is a keyword in the 2018 edition - //~^ WARN this was previously accepted by the compiler + //~^ WARN this is accepted in the current edition match await { await => {} } //~ ERROR `await` is a keyword in the 2018 edition //~^ ERROR `await` is a keyword in the 2018 edition - //~^^ WARN this was previously accepted by the compiler - //~^^^ WARN this was previously accepted by the compiler + //~^^ WARN this is accepted in the current edition + //~^^^ WARN this is accepted in the current edition } diff --git a/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr b/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr index 474c09d79dfbb..50a82c08c3f85 100644 --- a/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr +++ b/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr @@ -9,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -18,7 +18,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -27,7 +27,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -36,7 +36,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -45,7 +45,7 @@ error: `await` is a keyword in the 2018 edition LL | struct Foo { 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -54,7 +54,7 @@ error: `await` is a keyword in the 2018 edition LL | impl Foo { fn 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -63,7 +63,7 @@ error: `await` is a keyword in the 2018 edition LL | macro_rules! 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -72,7 +72,7 @@ error: `await` is a keyword in the 2018 edition LL | 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -81,7 +81,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -90,7 +90,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: aborting due to 10 previous errors diff --git a/src/test/ui/async-await/await-keyword/2015-edition-warning.fixed b/src/test/ui/async-await/await-keyword/2015-edition-warning.fixed index c58496c91f513..117495e130f92 100644 --- a/src/test/ui/async-await/await-keyword/2015-edition-warning.fixed +++ b/src/test/ui/async-await/await-keyword/2015-edition-warning.fixed @@ -6,22 +6,22 @@ mod outer_mod { pub mod r#await { //~^ ERROR `await` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition pub struct r#await; //~^ ERROR `await` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition } } use outer_mod::r#await::r#await; //~^ ERROR `await` is a keyword //~| ERROR `await` is a keyword -//~| WARN was previously accepted -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition +//~| WARN this is accepted in the current edition fn main() { match r#await { r#await => {} } //~^ ERROR `await` is a keyword //~| ERROR `await` is a keyword -//~| WARN was previously accepted -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition +//~| WARN this is accepted in the current edition } diff --git a/src/test/ui/async-await/await-keyword/2015-edition-warning.rs b/src/test/ui/async-await/await-keyword/2015-edition-warning.rs index a7543a14325fb..b3c64895c6dd6 100644 --- a/src/test/ui/async-await/await-keyword/2015-edition-warning.rs +++ b/src/test/ui/async-await/await-keyword/2015-edition-warning.rs @@ -6,22 +6,22 @@ mod outer_mod { pub mod await { //~^ ERROR `await` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition pub struct await; //~^ ERROR `await` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition } } use outer_mod::await::await; //~^ ERROR `await` is a keyword //~| ERROR `await` is a keyword -//~| WARN was previously accepted -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition +//~| WARN this is accepted in the current edition fn main() { match await { await => {} } //~^ ERROR `await` is a keyword //~| ERROR `await` is a keyword -//~| WARN was previously accepted -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition +//~| WARN this is accepted in the current edition } diff --git a/src/test/ui/async-await/await-keyword/2015-edition-warning.stderr b/src/test/ui/async-await/await-keyword/2015-edition-warning.stderr index 0c558eb12f089..1c4c19ea45f72 100644 --- a/src/test/ui/async-await/await-keyword/2015-edition-warning.stderr +++ b/src/test/ui/async-await/await-keyword/2015-edition-warning.stderr @@ -9,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -18,7 +18,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -27,7 +27,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -36,7 +36,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -45,7 +45,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition @@ -54,7 +54,7 @@ error: `await` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: aborting due to 6 previous errors diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs index d845e00694a2d..ae8863c567d0f 100644 --- a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs @@ -13,7 +13,7 @@ fn b() { //~| ERROR expected trait, found constant `BAR` //~| ERROR type provided when a constant was expected //~| WARN trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition } fn c() { foo::<3 + 3>(); //~ ERROR expressions must be enclosed in braces diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr index 857498a1111f5..b93bd6c6fa064 100644 --- a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr @@ -138,7 +138,7 @@ LL | foo::(); | ^^^^^^^^^ help: use `dyn`: `dyn BAR + BAR` | = note: `#[warn(bare_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 the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error[E0747]: type provided when a constant was expected 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 4bbec203c4e64..c815080fc4ab6 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,27 +13,27 @@ mod outer_mod { pub mod r#dyn { //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition pub struct r#dyn; //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition } } use outer_mod::r#dyn::r#dyn; //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition fn main() { match r#dyn { r#dyn => {} } //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition macro_defn::r#dyn(); //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition macro_defn::boxed(); } @@ -43,7 +43,7 @@ mod macro_defn { macro_rules! r#dyn { //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition // Note that we do not lint nor fix occurrences under macros ($dyn:tt) => { (Box, Box<$dyn Trait>) } @@ -51,23 +51,23 @@ mod macro_defn { pub fn r#dyn() -> ::outer_mod::r#dyn::r#dyn { //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition ::outer_mod::r#dyn::r#dyn //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition } pub fn boxed() -> r#dyn!( //~^ ERROR `dyn` is a keyword - //~| WARN was previously accepted + //~| WARN this is accepted in the current edition // 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.rs b/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs index bc1dd4d1d08f7..6cdc707149425 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,27 +13,27 @@ mod outer_mod { pub mod dyn { //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition pub struct dyn; //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition } } use outer_mod::dyn::dyn; //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition fn main() { match dyn { dyn => {} } //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition macro_defn::dyn(); //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition macro_defn::boxed(); } @@ -43,7 +43,7 @@ mod macro_defn { macro_rules! dyn { //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition // Note that we do not lint nor fix occurrences under macros ($dyn:tt) => { (Box, Box<$dyn Trait>) } @@ -51,23 +51,23 @@ mod macro_defn { pub fn dyn() -> ::outer_mod::dyn::dyn { //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition ::outer_mod::dyn::dyn //~^ ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition //~| ERROR `dyn` is a keyword -//~| WARN was previously accepted +//~| WARN this is accepted in the current edition } pub fn boxed() -> dyn!( //~^ ERROR `dyn` is a keyword - //~| WARN was previously accepted + //~| WARN this is accepted in the current edition // 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 32d690fa56341..3eb5bb7b26d42 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,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -18,7 +18,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -27,7 +27,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -36,7 +36,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -45,7 +45,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -54,7 +54,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -63,7 +63,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -72,7 +72,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -81,7 +81,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -90,7 +90,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -99,7 +99,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -108,7 +108,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -117,7 +117,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `dyn` is a keyword in the 2018 edition @@ -126,7 +126,7 @@ error: `dyn` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: aborting due to 14 previous errors diff --git a/src/test/ui/dyn-keyword/dyn-2018-edition-lint.rs b/src/test/ui/dyn-keyword/dyn-2018-edition-lint.rs index 7c2babaf7abaa..23ca36b71e00f 100644 --- a/src/test/ui/dyn-keyword/dyn-2018-edition-lint.rs +++ b/src/test/ui/dyn-keyword/dyn-2018-edition-lint.rs @@ -3,12 +3,12 @@ fn function(x: &SomeTrait, y: Box) { //~^ ERROR trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition //~| ERROR trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition let _x: &SomeTrait = todo!(); //~^ ERROR trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition } trait SomeTrait {} diff --git a/src/test/ui/dyn-keyword/dyn-2018-edition-lint.stderr b/src/test/ui/dyn-keyword/dyn-2018-edition-lint.stderr index ea73e56d8433d..30f09e2279216 100644 --- a/src/test/ui/dyn-keyword/dyn-2018-edition-lint.stderr +++ b/src/test/ui/dyn-keyword/dyn-2018-edition-lint.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #[deny(bare_trait_objects)] | ^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: trait objects without an explicit `dyn` are deprecated @@ -18,7 +18,7 @@ error: trait objects without an explicit `dyn` are deprecated LL | fn function(x: &SomeTrait, y: Box) { | ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: trait objects without an explicit `dyn` are deprecated @@ -27,7 +27,7 @@ error: trait objects without an explicit `dyn` are deprecated LL | let _x: &SomeTrait = todo!(); | ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: aborting due to 3 previous errors 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 3631415fc5f98..fcfe493c1a228 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2015.rs +++ b/src/test/ui/editions/edition-raw-pointer-method-2015.rs @@ -8,5 +8,5 @@ fn main() { let y = &x as *const _; let _ = y.is_null(); //~^ error: type annotations needed [tyvar_behind_raw_pointer] - //~^^ warning: this was previously accepted + //~^^ warning: this is accepted in the current edition } 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 1df582ee06c42..417daf36fca7d 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,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #46906 error: aborting due to previous error diff --git a/src/test/ui/future-incompatible-lint-group.rs b/src/test/ui/future-incompatible-lint-group.rs index 3630f08c93778..ce158043e54d5 100644 --- a/src/test/ui/future-incompatible-lint-group.rs +++ b/src/test/ui/future-incompatible-lint-group.rs @@ -2,7 +2,7 @@ trait Tr { fn f(u8) {} //~ ERROR anonymous parameters are deprecated - //~^ WARN this was previously accepted + //~^ WARN this is accepted in the current edition } fn main() {} diff --git a/src/test/ui/future-incompatible-lint-group.stderr b/src/test/ui/future-incompatible-lint-group.stderr index a19051e8bc0b2..16028261eb1d1 100644 --- a/src/test/ui/future-incompatible-lint-group.stderr +++ b/src/test/ui/future-incompatible-lint-group.stderr @@ -10,7 +10,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/collections-project-default.rs b/src/test/ui/generic-associated-types/collections-project-default.rs index 5fbae02573c62..65541fc3ae632 100644 --- a/src/test/ui/generic-associated-types/collections-project-default.rs +++ b/src/test/ui/generic-associated-types/collections-project-default.rs @@ -3,7 +3,7 @@ #![feature(associated_type_defaults)] // A Collection trait and collection families. Based on -// http://smallcultfollowing.com/babysteps/blog/2016/11/03/ +// https://smallcultfollowing.com/babysteps/blog/2016/11/03/ // associated-type-constructors-part-2-family-traits/ // check that we don't normalize with trait defaults. diff --git a/src/test/ui/generic-associated-types/collections.rs b/src/test/ui/generic-associated-types/collections.rs index 1b5b9c181fb61..4e8f593c1fd26 100644 --- a/src/test/ui/generic-associated-types/collections.rs +++ b/src/test/ui/generic-associated-types/collections.rs @@ -3,7 +3,7 @@ #![feature(associated_type_defaults)] // A Collection trait and collection families. Based on -// http://smallcultfollowing.com/babysteps/blog/2016/11/03/ +// https://smallcultfollowing.com/babysteps/blog/2016/11/03/ // associated-type-constructors-part-2-family-traits/ // run-pass diff --git a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs index f1af6860284cb..b656382bced34 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs +++ b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs @@ -11,6 +11,6 @@ fn foo<'a>(arg: Box>) {} //~| ERROR this associated type takes 0 generic arguments but 1 generic argument //~| ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments //~| WARNING: trait objects without an explicit `dyn` are deprecated - //~| WARNING: this was previously accepted by the compiler + //~| WARNING: this is accepted in the current edition fn main() {} diff --git a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr index 400600a086c0c..34554d38520cf 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr +++ b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr @@ -26,7 +26,7 @@ LL | fn foo<'a>(arg: Box>) {} | ^^ help: use `dyn`: `dyn 'a` | = note: `#[warn(bare_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 the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied diff --git a/src/test/ui/generic-associated-types/issue-86483.rs b/src/test/ui/generic-associated-types/issue-86483.rs new file mode 100644 index 0000000000000..9d03c9dab8d90 --- /dev/null +++ b/src/test/ui/generic-associated-types/issue-86483.rs @@ -0,0 +1,15 @@ +// Regression test of #86483. + +#![feature(generic_associated_types)] +#![allow(incomplete_features)] + +pub trait IceIce //~ ERROR: the parameter type `T` may not live long enough +where + for<'a> T: 'a, +{ + type Ice<'v>: IntoIterator; + //~^ ERROR: the parameter type `T` may not live long enough + //~| ERROR: the parameter type `T` may not live long enough +} + +fn main() {} diff --git a/src/test/ui/generic-associated-types/issue-86483.stderr b/src/test/ui/generic-associated-types/issue-86483.stderr new file mode 100644 index 0000000000000..c8efc2ed88264 --- /dev/null +++ b/src/test/ui/generic-associated-types/issue-86483.stderr @@ -0,0 +1,36 @@ +error[E0311]: the parameter type `T` may not live long enough + --> $DIR/issue-86483.rs:6:1 + | +LL | pub trait IceIce + | ^ - help: consider adding an explicit lifetime bound...: `T: 'a` + | _| + | | +LL | | where +LL | | for<'a> T: 'a, +LL | | { +... | +LL | | +LL | | } + | |_^ ...so that the type `T` will meet its required lifetime bounds + +error[E0311]: the parameter type `T` may not live long enough + --> $DIR/issue-86483.rs:10:5 + | +LL | pub trait IceIce + | - help: consider adding an explicit lifetime bound...: `T: 'a` +... +LL | type Ice<'v>: IntoIterator; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds + +error[E0309]: the parameter type `T` may not live long enough + --> $DIR/issue-86483.rs:10:32 + | +LL | pub trait IceIce + | - help: consider adding an explicit lifetime bound...: `T: 'v` +... +LL | type Ice<'v>: IntoIterator; + | ^^^^^^^^^^^^ ...so that the reference type `&'v T` does not outlive the data it points at + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0309`. diff --git a/src/test/ui/inference/inference-variable-behind-raw-pointer.rs b/src/test/ui/inference/inference-variable-behind-raw-pointer.rs index 1d508e8e820ce..6662e46b1c7e2 100644 --- a/src/test/ui/inference/inference-variable-behind-raw-pointer.rs +++ b/src/test/ui/inference/inference-variable-behind-raw-pointer.rs @@ -7,5 +7,5 @@ fn main() { let _ = &data as *const *const (); if data.is_null() {} //~^ WARNING type annotations needed - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this is accepted in the current edition } 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 12848982b8d28..c38f57912adff 100644 --- a/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr +++ b/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr @@ -5,7 +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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #46906 warning: 1 warning emitted diff --git a/src/test/ui/iterators/into-iter-on-arrays-2018.rs b/src/test/ui/iterators/into-iter-on-arrays-2018.rs index 5661397b3c17b..546052817d242 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-2018.rs +++ b/src/test/ui/iterators/into-iter-on-arrays-2018.rs @@ -13,11 +13,11 @@ fn main() { // which we continue to support for compatibility. let _: Iter<'_, i32> = array.into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning let _: Iter<'_, i32> = Box::new(array).into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning // The `array_into_iter` lint doesn't cover other wrappers that deref to an array. let _: Iter<'_, i32> = Rc::new(array).into_iter(); diff --git a/src/test/ui/iterators/into-iter-on-arrays-2018.stderr b/src/test/ui/iterators/into-iter-on-arrays-2018.stderr index b43338382f20c..82596c6f022e0 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-2018.stderr +++ b/src/test/ui/iterators/into-iter-on-arrays-2018.stderr @@ -5,7 +5,7 @@ LL | let _: Iter<'_, i32> = array.into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | = note: `#[warn(array_into_iter)]` 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -14,29 +14,8 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | let _: Iter<'_, i32> = Box::new(array).into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: 2 warnings emitted -Future incompatibility report: Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-2018.rs:14:34 - | -LL | let _: Iter<'_, i32> = array.into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = note: `#[warn(array_into_iter)]` 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! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-2018.rs:18:44 - | -LL | let _: Iter<'_, i32> = Box::new(array).into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - diff --git a/src/test/ui/iterators/into-iter-on-arrays-lint.fixed b/src/test/ui/iterators/into-iter-on-arrays-lint.fixed index 7f511bde3cbfc..ede96d7cea16c 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-lint.fixed +++ b/src/test/ui/iterators/into-iter-on-arrays-lint.fixed @@ -8,42 +8,42 @@ fn main() { // Expressions that should trigger the lint small.iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning [1, 2].iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning big.iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning [0u8; 33].iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(small).iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new([1, 2]).iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(big).iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new([0u8; 33]).iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(Box::new(small)).iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(Box::new([1, 2])).iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(Box::new(big)).iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(Box::new([0u8; 33])).iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning // Expressions that should not (&[1, 2]).into_iter(); diff --git a/src/test/ui/iterators/into-iter-on-arrays-lint.rs b/src/test/ui/iterators/into-iter-on-arrays-lint.rs index d5fe83a7834b6..3a0cb75ed152d 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-lint.rs +++ b/src/test/ui/iterators/into-iter-on-arrays-lint.rs @@ -8,42 +8,42 @@ fn main() { // Expressions that should trigger the lint small.into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning [1, 2].into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning big.into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning [0u8; 33].into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(small).into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new([1, 2]).into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(big).into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new([0u8; 33]).into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(Box::new(small)).into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(Box::new([1, 2])).into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(Box::new(big)).into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning Box::new(Box::new([0u8; 33])).into_iter(); //~^ WARNING this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` - //~| WARNING this was previously accepted by the compiler but is being phased out + //~| WARNING this changes meaning // Expressions that should not (&[1, 2]).into_iter(); diff --git a/src/test/ui/iterators/into-iter-on-arrays-lint.stderr b/src/test/ui/iterators/into-iter-on-arrays-lint.stderr index 211315c3fcf05..1f33a5c659b5d 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-lint.stderr +++ b/src/test/ui/iterators/into-iter-on-arrays-lint.stderr @@ -5,7 +5,7 @@ LL | small.into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | = note: `#[warn(array_into_iter)]` 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -14,7 +14,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | [1, 2].into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -23,7 +23,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | big.into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -32,7 +32,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | [0u8; 33].into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -41,7 +41,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | Box::new(small).into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -50,7 +50,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | Box::new([1, 2]).into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -59,7 +59,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | Box::new(big).into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -68,7 +68,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | Box::new([0u8; 33]).into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -77,7 +77,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | Box::new(Box::new(small)).into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -86,7 +86,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | Box::new(Box::new([1, 2])).into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -95,7 +95,7 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | Box::new(Box::new(big)).into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. @@ -104,144 +104,8 @@ warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into LL | Box::new(Box::new([0u8; 33])).into_iter(); | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | - = 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 changes meaning in Rust 2021 = note: for more information, see issue #66145 warning: 12 warnings emitted -Future incompatibility report: Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:9:11 - | -LL | small.into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = note: `#[warn(array_into_iter)]` 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! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:12:12 - | -LL | [1, 2].into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:15:9 - | -LL | big.into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:18:15 - | -LL | [0u8; 33].into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:22:21 - | -LL | Box::new(small).into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:25:22 - | -LL | Box::new([1, 2]).into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:28:19 - | -LL | Box::new(big).into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:31:25 - | -LL | Box::new([0u8; 33]).into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:35:31 - | -LL | Box::new(Box::new(small)).into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:38:32 - | -LL | Box::new(Box::new([1, 2])).into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:41:29 - | -LL | Box::new(Box::new(big)).into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:44:35 - | -LL | Box::new(Box::new([0u8; 33])).into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - -Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/into-iter-on-arrays-lint.rs:60:12 - | -LL | [0, 1].into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | -note: the lint level is defined here - --> $DIR/into-iter-on-arrays-lint.rs:59:13 - | -LL | #[allow(array_into_iter)] - | ^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - diff --git a/src/test/ui/lint/bare-trait-objects-path.rs b/src/test/ui/lint/bare-trait-objects-path.rs index 74f838e9ed18d..0a7c5a8dbd10b 100644 --- a/src/test/ui/lint/bare-trait-objects-path.rs +++ b/src/test/ui/lint/bare-trait-objects-path.rs @@ -13,12 +13,12 @@ impl Assoc for dyn Dyn {} fn main() { Dyn::func(); //~^ WARN trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition ::Dyn::func(); //~^ WARN trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition Dyn::CONST; //~^ WARN trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition let _: Dyn::Ty; //~ ERROR ambiguous associated type } diff --git a/src/test/ui/lint/bare-trait-objects-path.stderr b/src/test/ui/lint/bare-trait-objects-path.stderr index 55c9ea234de29..40fafc4b3b59b 100644 --- a/src/test/ui/lint/bare-trait-objects-path.stderr +++ b/src/test/ui/lint/bare-trait-objects-path.stderr @@ -11,7 +11,7 @@ LL | Dyn::func(); | ^^^ help: use `dyn`: `` | = note: `#[warn(bare_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 the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: trait objects without an explicit `dyn` are deprecated @@ -20,7 +20,7 @@ warning: trait objects without an explicit `dyn` are deprecated LL | ::Dyn::func(); | ^^^^^ help: use `dyn`: `` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: trait objects without an explicit `dyn` are deprecated @@ -29,7 +29,7 @@ warning: trait objects without an explicit `dyn` are deprecated LL | Dyn::CONST; | ^^^ help: use `dyn`: `` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: aborting due to previous error; 3 warnings emitted diff --git a/src/test/ui/lint/force-warn/force-lint-in-allowed-group.rs b/src/test/ui/lint/force-warn/force-lint-in-allowed-group.rs index bb2f394aef3e6..b4c2c505aa560 100644 --- a/src/test/ui/lint/force-warn/force-lint-in-allowed-group.rs +++ b/src/test/ui/lint/force-warn/force-lint-in-allowed-group.rs @@ -7,6 +7,6 @@ pub trait SomeTrait {} pub fn function(_x: Box) {} //~^ WARN trait objects without an explicit `dyn` are deprecated -//~| WARN this was previously accepted by the compiler +//~| WARN this is accepted in the current edition fn main() {} diff --git a/src/test/ui/lint/force-warn/force-lint-in-allowed-group.stderr b/src/test/ui/lint/force-warn/force-lint-in-allowed-group.stderr index 40750ffea8c87..8ecfe3a15b8f6 100644 --- a/src/test/ui/lint/force-warn/force-lint-in-allowed-group.stderr +++ b/src/test/ui/lint/force-warn/force-lint-in-allowed-group.stderr @@ -5,7 +5,7 @@ LL | pub fn function(_x: Box) {} | ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait` | = note: warning forced by `force-warns` commandline option - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: 1 warning emitted diff --git a/src/test/ui/lint/force-warn/force-warn-group-allow-warning.rs b/src/test/ui/lint/force-warn/force-warn-group-allow-warning.rs index d8a81d73afbb8..83a1c078f062f 100644 --- a/src/test/ui/lint/force-warn/force-warn-group-allow-warning.rs +++ b/src/test/ui/lint/force-warn/force-warn-group-allow-warning.rs @@ -7,6 +7,6 @@ pub trait SomeTrait {} pub fn function(_x: Box) {} //~^ WARN trait objects without an explicit `dyn` are deprecated -//~| WARN this was previously accepted by the compiler +//~| WARN this is accepted in the current edition fn main() {} diff --git a/src/test/ui/lint/force-warn/force-warn-group-allow-warning.stderr b/src/test/ui/lint/force-warn/force-warn-group-allow-warning.stderr index 88ae846caa0a9..232edf4f1ef25 100644 --- a/src/test/ui/lint/force-warn/force-warn-group-allow-warning.stderr +++ b/src/test/ui/lint/force-warn/force-warn-group-allow-warning.stderr @@ -5,7 +5,7 @@ LL | pub fn function(_x: Box) {} | ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait` | = note: warning forced by `force-warns` commandline option - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: 1 warning emitted diff --git a/src/test/ui/lint/force-warn/force-warn-group.rs b/src/test/ui/lint/force-warn/force-warn-group.rs index c97eeabbd4e04..5e5fda973d54e 100644 --- a/src/test/ui/lint/force-warn/force-warn-group.rs +++ b/src/test/ui/lint/force-warn/force-warn-group.rs @@ -7,6 +7,6 @@ pub trait SomeTrait {} pub fn function(_x: Box) {} //~^ WARN trait objects without an explicit `dyn` are deprecated -//~| WARN this was previously accepted by the compiler +//~| WARN this is accepted in the current edition fn main() {} diff --git a/src/test/ui/lint/force-warn/force-warn-group.stderr b/src/test/ui/lint/force-warn/force-warn-group.stderr index f808727991ed4..82781984f0cea 100644 --- a/src/test/ui/lint/force-warn/force-warn-group.stderr +++ b/src/test/ui/lint/force-warn/force-warn-group.stderr @@ -5,7 +5,7 @@ LL | pub fn function(_x: Box) {} | ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait` | = note: warning forced by `force-warns` commandline option - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: 1 warning emitted diff --git a/src/test/ui/lint/inclusive-range-pattern-syntax.fixed b/src/test/ui/lint/inclusive-range-pattern-syntax.fixed index a1b738e33fa9b..bee5d4ae4b1b3 100644 --- a/src/test/ui/lint/inclusive-range-pattern-syntax.fixed +++ b/src/test/ui/lint/inclusive-range-pattern-syntax.fixed @@ -8,14 +8,14 @@ fn main() { match despondency { 1..=2 => {} //~^ WARN `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition _ => {} } match &despondency { &(1..=2) => {} //~^ WARN `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition _ => {} } } diff --git a/src/test/ui/lint/inclusive-range-pattern-syntax.rs b/src/test/ui/lint/inclusive-range-pattern-syntax.rs index d3ebbf38e1cba..d98c10c26c7cf 100644 --- a/src/test/ui/lint/inclusive-range-pattern-syntax.rs +++ b/src/test/ui/lint/inclusive-range-pattern-syntax.rs @@ -8,14 +8,14 @@ fn main() { match despondency { 1...2 => {} //~^ WARN `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition _ => {} } match &despondency { &1...2 => {} //~^ WARN `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition _ => {} } } diff --git a/src/test/ui/lint/inclusive-range-pattern-syntax.stderr b/src/test/ui/lint/inclusive-range-pattern-syntax.stderr index ba4ae208e39cb..efa684a24e3d3 100644 --- a/src/test/ui/lint/inclusive-range-pattern-syntax.stderr +++ b/src/test/ui/lint/inclusive-range-pattern-syntax.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![warn(ellipsis_inclusive_range_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: `...` range patterns are deprecated @@ -18,7 +18,7 @@ warning: `...` range patterns are deprecated LL | &1...2 => {} | ^^^^^^ help: use `..=` for an inclusive range: `&(1..=2)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: 2 warnings emitted diff --git a/src/test/ui/lint/issue-78660-cap-lints-future-compat.stderr b/src/test/ui/lint/issue-78660-cap-lints-future-compat.stderr deleted file mode 100644 index 79958ba90d409..0000000000000 --- a/src/test/ui/lint/issue-78660-cap-lints-future-compat.stderr +++ /dev/null @@ -1,11 +0,0 @@ -Future incompatibility report: Future breakage date: None, diagnostic: -warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. - --> $DIR/issue-78660-cap-lints-future-compat.rs:9:12 - | -LL | ["hi"].into_iter(); - | ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` - | - = note: `-D array-into-iter` implied by `-D warnings` - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #66145 - diff --git a/src/test/ui/lint/lint-pre-expansion-extern-module.stderr b/src/test/ui/lint/lint-pre-expansion-extern-module.stderr index 6efd03f14a1dc..3355bb4e4ff40 100644 --- a/src/test/ui/lint/lint-pre-expansion-extern-module.stderr +++ b/src/test/ui/lint/lint-pre-expansion-extern-module.stderr @@ -5,7 +5,7 @@ LL | pub fn try() {} | ^^^ help: you can use a raw identifier to stay compatible: `r#try` | = note: `-W keyword-idents` implied by `-W 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 warning: 1 warning emitted diff --git a/src/test/ui/macros/macro-or-patterns-back-compat.fixed b/src/test/ui/macros/macro-or-patterns-back-compat.fixed index f4e81a6be2a89..e18fbecf032cd 100644 --- a/src/test/ui/macros/macro-or-patterns-back-compat.fixed +++ b/src/test/ui/macros/macro-or-patterns-back-compat.fixed @@ -5,19 +5,19 @@ macro_rules! foo { ($x:pat_param | $y:pat) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! bar { ($($x:pat_param)+ | $($y:pat)+) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! baz { ($x:pat_param | $y:pat_param) => {} } // should be ok macro_rules! qux { ($x:pat_param | $y:pat) => {} } // should be ok macro_rules! ogg { ($x:pat_param | $y:pat_param) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! match_any { ( $expr:expr , $( $( $pat:pat_param )|+ => $expr_arm:expr ),+ ) => { //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition match $expr { $( $( $pat => $expr_arm, )+ diff --git a/src/test/ui/macros/macro-or-patterns-back-compat.rs b/src/test/ui/macros/macro-or-patterns-back-compat.rs index 49affdd38da9d..4b3aeb62043fb 100644 --- a/src/test/ui/macros/macro-or-patterns-back-compat.rs +++ b/src/test/ui/macros/macro-or-patterns-back-compat.rs @@ -5,19 +5,19 @@ macro_rules! foo { ($x:pat | $y:pat) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! baz { ($x:pat_param | $y:pat_param) => {} } // should be ok macro_rules! qux { ($x:pat_param | $y:pat) => {} } // should be ok macro_rules! ogg { ($x:pat | $y:pat_param) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! match_any { ( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => { //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition match $expr { $( $( $pat => $expr_arm, )+ diff --git a/src/test/ui/macros/macro-or-patterns-back-compat.stderr b/src/test/ui/macros/macro-or-patterns-back-compat.stderr index 62687eb36b89e..857ff8313d96a 100644 --- a/src/test/ui/macros/macro-or-patterns-back-compat.stderr +++ b/src/test/ui/macros/macro-or-patterns-back-compat.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(or_patterns_back_compat)] | ^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #84869 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro @@ -18,7 +18,7 @@ error: the meaning of the `pat` fragment specifier is changing in Rust 2021, whi LL | macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } | ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #84869 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro @@ -27,7 +27,7 @@ error: the meaning of the `pat` fragment specifier is changing in Rust 2021, whi LL | macro_rules! ogg { ($x:pat | $y:pat_param) => {} } | ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #84869 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro @@ -36,7 +36,7 @@ error: the meaning of the `pat` fragment specifier is changing in Rust 2021, whi LL | ( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => { | ^^^^^^^^ help: use pat_param to preserve semantics: `$pat:pat_param` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #84869 error: aborting due to 4 previous errors diff --git a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs index 0385a120ce213..86fd37e78142c 100644 --- a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs +++ b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs @@ -1,6 +1,6 @@ // Tests correct kind-checking of the reason stack closures without the :Copy // bound must be noncopyable. For details see -// http://smallcultfollowing.com/babysteps/blog/2013/04/30/the-case-of-the-recurring-closure/ +// https://smallcultfollowing.com/babysteps/blog/2013/04/30/the-case-of-the-recurring-closure/ struct R<'a> { // This struct is needed to create the diff --git a/src/test/ui/nullable-pointer-iotareduction.rs b/src/test/ui/nullable-pointer-iotareduction.rs index 4c6964f294b5e..568c3e144be2c 100644 --- a/src/test/ui/nullable-pointer-iotareduction.rs +++ b/src/test/ui/nullable-pointer-iotareduction.rs @@ -4,7 +4,7 @@ // Iota-reduction is a rule in the Calculus of (Co-)Inductive Constructions, // which "says that a destructor applied to an object built from a constructor -// behaves as expected". -- http://coq.inria.fr/doc/Reference-Manual006.html +// behaves as expected". -- https://coq.inria.fr/doc/language/core/conversion.html#iota-reduction // // It's a little more complicated here, because of pointers and regions and // trying to get assert failure messages that at least identify which case diff --git a/src/test/ui/parser/issue-68890-2.rs b/src/test/ui/parser/issue-68890-2.rs index 88527cc8783c8..0a6e26acfc77f 100644 --- a/src/test/ui/parser/issue-68890-2.rs +++ b/src/test/ui/parser/issue-68890-2.rs @@ -4,4 +4,4 @@ type X<'a> = (?'a) +; //~^ ERROR `?` may only modify trait bounds, not lifetime bounds //~| ERROR at least one trait is required for an object type //~| WARN trait objects without an explicit `dyn` are deprecated -//~| WARN this was previously accepted by the compiler +//~| WARN this is accepted in the current edition diff --git a/src/test/ui/parser/issue-68890-2.stderr b/src/test/ui/parser/issue-68890-2.stderr index 37f38365b016f..dce03e1a9635c 100644 --- a/src/test/ui/parser/issue-68890-2.stderr +++ b/src/test/ui/parser/issue-68890-2.stderr @@ -11,7 +11,7 @@ LL | type X<'a> = (?'a) +; | ^^^^^^^ help: use `dyn`: `dyn (?'a) +` | = note: `#[warn(bare_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 the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error[E0224]: at least one trait is required for an object type diff --git a/src/test/ui/parser/issue-73568-lifetime-after-mut.rs b/src/test/ui/parser/issue-73568-lifetime-after-mut.rs index 0733b2d2df781..e68ee747cfdb5 100644 --- a/src/test/ui/parser/issue-73568-lifetime-after-mut.rs +++ b/src/test/ui/parser/issue-73568-lifetime-after-mut.rs @@ -14,10 +14,10 @@ mac!('a); fn y<'a>(y: &mut 'a + Send) { //~^ ERROR expected a path on the left-hand side of `+`, not `&mut 'a` //~| WARNING trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition //~| ERROR at least one trait is required for an object type let z = y as &mut 'a + Send; //~^ ERROR expected value, found trait `Send` //~| WARNING trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition } diff --git a/src/test/ui/parser/issue-73568-lifetime-after-mut.stderr b/src/test/ui/parser/issue-73568-lifetime-after-mut.stderr index f83b7944b1ba1..c10037d44e30d 100644 --- a/src/test/ui/parser/issue-73568-lifetime-after-mut.stderr +++ b/src/test/ui/parser/issue-73568-lifetime-after-mut.stderr @@ -34,7 +34,7 @@ LL | fn y<'a>(y: &mut 'a + Send) { | ^^ help: use `dyn`: `dyn 'a` | = note: `#[warn(bare_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 the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: trait objects without an explicit `dyn` are deprecated @@ -43,7 +43,7 @@ warning: trait objects without an explicit `dyn` are deprecated LL | let z = y as &mut 'a + Send; | ^^ help: use `dyn`: `dyn 'a` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error[E0224]: at least one trait is required for an object type diff --git a/src/test/ui/parser/macro/trait-object-macro-matcher.rs b/src/test/ui/parser/macro/trait-object-macro-matcher.rs index 0428ea0e2c1b1..663739f235a43 100644 --- a/src/test/ui/parser/macro/trait-object-macro-matcher.rs +++ b/src/test/ui/parser/macro/trait-object-macro-matcher.rs @@ -12,5 +12,5 @@ fn main() { //~^ ERROR lifetime in trait object type must be followed by `+` //~| ERROR at least one trait is required for an object type //~| WARN trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition } diff --git a/src/test/ui/parser/macro/trait-object-macro-matcher.stderr b/src/test/ui/parser/macro/trait-object-macro-matcher.stderr index 8ae5611d89d19..caca84f695d76 100644 --- a/src/test/ui/parser/macro/trait-object-macro-matcher.stderr +++ b/src/test/ui/parser/macro/trait-object-macro-matcher.stderr @@ -11,7 +11,7 @@ LL | m!('static); | ^^^^^^^ help: use `dyn`: `dyn 'static` | = note: `#[warn(bare_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 the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error[E0224]: at least one trait is required for an object type diff --git a/src/test/ui/parser/parser-unicode-whitespace.rs b/src/test/ui/parser/parser-unicode-whitespace.rs index 2d1fa7dc42e0c..555cd68c3a76f 100644 --- a/src/test/ui/parser/parser-unicode-whitespace.rs +++ b/src/test/ui/parser/parser-unicode-whitespace.rs @@ -1,7 +1,7 @@ // run-pass // Beware editing: it has numerous whitespace characters which are important. // It contains one ranges from the 'PATTERN_WHITE_SPACE' property outlined in -// http://unicode.org/Public/UNIDATA/PropList.txt +// https://unicode.org/Public/UNIDATA/PropList.txt // // The characters in the first expression of the assertion can be generated // from: "4\u{0C}+\n\t\r7\t*\u{20}2\u{85}/\u{200E}3\u{200F}*\u{2028}2\u{2029}" diff --git a/src/test/ui/parser/recover-range-pats.rs b/src/test/ui/parser/recover-range-pats.rs index a10add6d9e523..2e5a991543ff9 100644 --- a/src/test/ui/parser/recover-range-pats.rs +++ b/src/test/ui/parser/recover-range-pats.rs @@ -41,30 +41,30 @@ fn inclusive_from_to() { fn inclusive2_from_to() { if let 0...3 = 0 {} //~^ ERROR `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition if let 0...Y = 0 {} //~^ ERROR `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition if let X...3 = 0 {} //~^ ERROR `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition if let X...Y = 0 {} //~^ ERROR `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition if let true...Y = 0 {} //~ ERROR only `char` and numeric types //~^ ERROR `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition if let X...true = 0 {} //~ ERROR only `char` and numeric types //~^ ERROR `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition if let .0...Y = 0 {} //~ ERROR mismatched types //~^ ERROR float literals must have an integer part - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition //~| ERROR `...` range patterns are deprecated if let X... .0 = 0 {} //~ ERROR mismatched types //~^ ERROR float literals must have an integer part //~| ERROR `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition } fn exclusive_from() { @@ -137,7 +137,7 @@ fn with_macro_expr_var() { let $e1..$e2; let $e1...$e2; //~^ ERROR `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition let $e1..=$e2; } } diff --git a/src/test/ui/parser/recover-range-pats.stderr b/src/test/ui/parser/recover-range-pats.stderr index 3236ef0db2837..2d8088432a257 100644 --- a/src/test/ui/parser/recover-range-pats.stderr +++ b/src/test/ui/parser/recover-range-pats.stderr @@ -204,7 +204,7 @@ note: the lint level is defined here | LL | #![deny(ellipsis_inclusive_range_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: `...` range patterns are deprecated @@ -213,7 +213,7 @@ error: `...` range patterns are deprecated LL | if let 0...Y = 0 {} | ^^^ help: use `..=` for an inclusive range | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: `...` range patterns are deprecated @@ -222,7 +222,7 @@ error: `...` range patterns are deprecated LL | if let X...3 = 0 {} | ^^^ help: use `..=` for an inclusive range | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: `...` range patterns are deprecated @@ -231,7 +231,7 @@ error: `...` range patterns are deprecated LL | if let X...Y = 0 {} | ^^^ help: use `..=` for an inclusive range | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: `...` range patterns are deprecated @@ -240,7 +240,7 @@ error: `...` range patterns are deprecated LL | if let true...Y = 0 {} | ^^^ help: use `..=` for an inclusive range | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: `...` range patterns are deprecated @@ -249,7 +249,7 @@ error: `...` range patterns are deprecated LL | if let X...true = 0 {} | ^^^ help: use `..=` for an inclusive range | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: `...` range patterns are deprecated @@ -258,7 +258,7 @@ error: `...` range patterns are deprecated LL | if let .0...Y = 0 {} | ^^^ help: use `..=` for an inclusive range | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: `...` range patterns are deprecated @@ -267,7 +267,7 @@ error: `...` range patterns are deprecated LL | if let X... .0 = 0 {} | ^^^ help: use `..=` for an inclusive range | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: `...` range patterns are deprecated @@ -279,7 +279,7 @@ LL | let $e1...$e2; LL | mac2!(0, 1); | ------------ in this macro invocation | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 = note: this error originates in the macro `mac2` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/parser/trait-object-trait-parens.rs b/src/test/ui/parser/trait-object-trait-parens.rs index 7d55da7d09721..438034bc38aa4 100644 --- a/src/test/ui/parser/trait-object-trait-parens.rs +++ b/src/test/ui/parser/trait-object-trait-parens.rs @@ -9,15 +9,15 @@ fn main() { //~^ ERROR `?Trait` is not permitted in trait object types //~| ERROR only auto traits can be used as additional traits //~| WARN trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition let _: Box Trait<'a>) + (Obj)>; //~^ ERROR `?Trait` is not permitted in trait object types //~| ERROR only auto traits can be used as additional traits //~| WARN trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition let _: Box Trait<'a> + (Obj) + (?Sized)>; //~^ ERROR `?Trait` is not permitted in trait object types //~| ERROR only auto traits can be used as additional traits //~| WARN trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition } diff --git a/src/test/ui/parser/trait-object-trait-parens.stderr b/src/test/ui/parser/trait-object-trait-parens.stderr index 79b6892dc079a..9bfc4943fe941 100644 --- a/src/test/ui/parser/trait-object-trait-parens.stderr +++ b/src/test/ui/parser/trait-object-trait-parens.stderr @@ -23,7 +23,7 @@ LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (Obj) + (?Sized) + (for<'a> Trait<'a>)` | = note: `#[warn(bare_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 the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: trait objects without an explicit `dyn` are deprecated @@ -32,7 +32,7 @@ warning: trait objects without an explicit `dyn` are deprecated LL | let _: Box Trait<'a>) + (Obj)>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ?Sized + (for<'a> Trait<'a>) + (Obj)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 warning: trait objects without an explicit `dyn` are deprecated @@ -41,7 +41,7 @@ warning: trait objects without an explicit `dyn` are deprecated LL | let _: Box Trait<'a> + (Obj) + (?Sized)>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn for<'a> Trait<'a> + (Obj) + (?Sized)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error[E0225]: only auto traits can be used as additional traits in a trait object diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.fixed b/src/test/ui/range/range-inclusive-pattern-precedence.fixed index 6c01209967605..8a4b8fc38e37a 100644 --- a/src/test/ui/range/range-inclusive-pattern-precedence.fixed +++ b/src/test/ui/range/range-inclusive-pattern-precedence.fixed @@ -10,7 +10,7 @@ pub fn main() { match &12 { &(0..=9) => {} //~^ WARN `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition //~| HELP use `..=` for an inclusive range &(10 ..=15) => {} //~^ ERROR the range pattern here has ambiguous interpretation diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.rs b/src/test/ui/range/range-inclusive-pattern-precedence.rs index ce763ba267798..b294e436fa654 100644 --- a/src/test/ui/range/range-inclusive-pattern-precedence.rs +++ b/src/test/ui/range/range-inclusive-pattern-precedence.rs @@ -10,7 +10,7 @@ pub fn main() { match &12 { &0...9 => {} //~^ WARN `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition //~| HELP use `..=` for an inclusive range &10..=15 => {} //~^ ERROR the range pattern here has ambiguous interpretation diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.stderr b/src/test/ui/range/range-inclusive-pattern-precedence.stderr index ffb833535c2f0..3330ced1ebf34 100644 --- a/src/test/ui/range/range-inclusive-pattern-precedence.stderr +++ b/src/test/ui/range/range-inclusive-pattern-precedence.stderr @@ -15,7 +15,7 @@ note: the lint level is defined here | LL | #![warn(ellipsis_inclusive_range_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/range/range-inclusive-pattern-precedence2.rs b/src/test/ui/range/range-inclusive-pattern-precedence2.rs index 7fa2698a49603..bede9c579766f 100644 --- a/src/test/ui/range/range-inclusive-pattern-precedence2.rs +++ b/src/test/ui/range/range-inclusive-pattern-precedence2.rs @@ -9,7 +9,7 @@ fn main() { // FIXME: can we add suggestions like `&(0..=9)`? box 0...9 => {} //~^ WARN `...` range patterns are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition //~| HELP use `..=` for an inclusive range box 10..=15 => {} //~^ ERROR the range pattern here has ambiguous interpretation diff --git a/src/test/ui/range/range-inclusive-pattern-precedence2.stderr b/src/test/ui/range/range-inclusive-pattern-precedence2.stderr index e8e62b485cc1d..90a4aa68222f6 100644 --- a/src/test/ui/range/range-inclusive-pattern-precedence2.stderr +++ b/src/test/ui/range/range-inclusive-pattern-precedence2.stderr @@ -15,7 +15,7 @@ note: the lint level is defined here | LL | #![warn(ellipsis_inclusive_range_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/rust-2018/async-ident-allowed.rs b/src/test/ui/rust-2018/async-ident-allowed.rs index 9d961214afc07..8efcfbb707424 100644 --- a/src/test/ui/rust-2018/async-ident-allowed.rs +++ b/src/test/ui/rust-2018/async-ident-allowed.rs @@ -7,5 +7,5 @@ fn main() { let async = 3; //~ ERROR: is a keyword - //~^ WARN previously accepted + //~^ WARN this is accepted in the current edition } diff --git a/src/test/ui/rust-2018/async-ident-allowed.stderr b/src/test/ui/rust-2018/async-ident-allowed.stderr index 43fc3f5e334ec..5b63eab8e466d 100644 --- a/src/test/ui/rust-2018/async-ident-allowed.stderr +++ b/src/test/ui/rust-2018/async-ident-allowed.stderr @@ -10,7 +10,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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..f4ae518c71d27 100644 --- a/src/test/ui/rust-2018/async-ident.fixed +++ b/src/test/ui/rust-2018/async-ident.fixed @@ -5,20 +5,20 @@ // run-rustfix fn r#async() {} //~ ERROR async -//~^ WARN hard error in the 2018 edition +//~^ WARN this is accepted in the current edition macro_rules! foo { ($foo:ident) => {}; ($r#async:expr, r#async) => {}; //~^ ERROR async //~| ERROR async - //~| WARN hard error in the 2018 edition - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition + //~| WARN this is accepted in the current edition } foo!(r#async); //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition mod dont_lint_raw { fn r#async() {} @@ -27,53 +27,53 @@ mod dont_lint_raw { mod async_trait { trait r#async {} //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition struct MyStruct; impl r#async for MyStruct {} //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } mod async_static { static r#async: u32 = 0; //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } mod async_const { const r#async: u32 = 0; //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } struct Foo; impl Foo { fn r#async() {} } //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition fn main() { struct r#async {} //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition let r#async: r#async = r#async {}; //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition //~| ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition //~| ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } #[macro_export] macro_rules! produces_async { () => (pub fn r#async() {}) //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } #[macro_export] macro_rules! consumes_async { (r#async) => (1) //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } diff --git a/src/test/ui/rust-2018/async-ident.rs b/src/test/ui/rust-2018/async-ident.rs index 6e8d33d237d52..79c73dafac7a3 100644 --- a/src/test/ui/rust-2018/async-ident.rs +++ b/src/test/ui/rust-2018/async-ident.rs @@ -5,20 +5,20 @@ // run-rustfix fn async() {} //~ ERROR async -//~^ WARN hard error in the 2018 edition +//~^ WARN this is accepted in the current edition macro_rules! foo { ($foo:ident) => {}; ($async:expr, async) => {}; //~^ ERROR async //~| ERROR async - //~| WARN hard error in the 2018 edition - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition + //~| WARN this is accepted in the current edition } foo!(async); //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition mod dont_lint_raw { fn r#async() {} @@ -27,53 +27,53 @@ mod dont_lint_raw { mod async_trait { trait async {} //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition struct MyStruct; impl async for MyStruct {} //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } mod async_static { static async: u32 = 0; //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } mod async_const { const async: u32 = 0; //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } struct Foo; impl Foo { fn async() {} } //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition fn main() { struct async {} //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition let async: async = async {}; //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition //~| ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition //~| ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } #[macro_export] macro_rules! produces_async { () => (pub fn async() {}) //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } #[macro_export] macro_rules! consumes_async { (async) => (1) //~^ ERROR async - //~| WARN hard error in the 2018 edition + //~| WARN this is accepted in the current edition } diff --git a/src/test/ui/rust-2018/async-ident.stderr b/src/test/ui/rust-2018/async-ident.stderr index 6051c81f77c90..6396e9deee228 100644 --- a/src/test/ui/rust-2018/async-ident.stderr +++ b/src/test/ui/rust-2018/async-ident.stderr @@ -9,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -18,7 +18,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -27,7 +27,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -36,7 +36,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -45,7 +45,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -54,7 +54,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -63,7 +63,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -72,7 +72,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -81,7 +81,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -90,7 +90,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -99,7 +99,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -108,7 +108,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -117,7 +117,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -126,7 +126,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 error: `async` is a keyword in the 2018 edition @@ -135,7 +135,7 @@ error: `async` is a keyword in the 2018 edition 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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..044824cbbd367 100644 --- a/src/test/ui/rust-2018/dyn-keyword.fixed +++ b/src/test/ui/rust-2018/dyn-keyword.fixed @@ -6,5 +6,5 @@ fn main() { let r#dyn = (); //~ ERROR dyn - //~^ WARN hard error in the 2018 edition + //~^ WARN this is accepted in the current edition } diff --git a/src/test/ui/rust-2018/dyn-keyword.rs b/src/test/ui/rust-2018/dyn-keyword.rs index bdd3a90cab9ec..5989cfa1c799a 100644 --- a/src/test/ui/rust-2018/dyn-keyword.rs +++ b/src/test/ui/rust-2018/dyn-keyword.rs @@ -6,5 +6,5 @@ fn main() { let dyn = (); //~ ERROR dyn - //~^ WARN hard error in the 2018 edition + //~^ WARN this is accepted in the current edition } diff --git a/src/test/ui/rust-2018/dyn-keyword.stderr b/src/test/ui/rust-2018/dyn-keyword.stderr index 0fe11168c440f..699242f2dcb01 100644 --- a/src/test/ui/rust-2018/dyn-keyword.stderr +++ b/src/test/ui/rust-2018/dyn-keyword.stderr @@ -9,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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..37847a98ac782 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 @@ -8,20 +8,19 @@ mod foo { type Bar; } - crate struct Baz { } + crate struct Baz {} impl Foo for Baz { type Bar = (); } } - fn main() { let _: ::Bar = (); //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| this is accepted in the current edition let _: ::Bar = (); //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| this is accepted in the current 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..36efa14601d18 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 @@ -8,20 +8,19 @@ mod foo { type Bar; } - crate struct Baz { } + crate struct Baz {} impl Foo for Baz { type Bar = (); } } - fn main() { let _: ::Bar = (); //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| this is accepted in the current edition let _: <::foo::Baz as foo::Foo>::Bar = (); //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| this is accepted in the current edition } 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 0b400786d3507..6f529fa9114bc 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 @@ -1,5 +1,5 @@ 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:20:25 + --> $DIR/edition-lint-fully-qualified-paths.rs:19:25 | LL | let _: ::Bar = (); | ^^^^^^^^^^ help: use `crate`: `crate::foo::Foo` @@ -9,16 +9,16 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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:23: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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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..03d15cea280f6 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 @@ -16,15 +16,15 @@ crate mod foo { use crate::foo::{bar::{baz::{}}}; //~^ ERROR absolute paths must start with -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition use crate::foo::{bar::{XX, baz::{}}}; //~^ ERROR absolute paths must start with -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition use crate::foo::{bar::{baz::{}, baz1::{}}}; //~^ ERROR absolute paths must start with -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition fn main() { } 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..d898daaba59ca 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 @@ -16,15 +16,15 @@ crate mod foo { use foo::{bar::{baz::{}}}; //~^ ERROR absolute paths must start with -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition use foo::{bar::{XX, baz::{}}}; //~^ ERROR absolute paths must start with -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition use foo::{bar::{baz::{}, baz1::{}}}; //~^ ERROR absolute paths must start with -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition 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 d554cc28621c2..54a4fed5cf9b8 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,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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 @@ -18,7 +18,7 @@ error: absolute paths must start with `self`, `super`, `crate`, or an external c 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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 @@ -27,7 +27,7 @@ error: absolute paths must start with `self`, `super`, `crate`, or an external c 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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..7c6e4a71a37e3 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,7 @@ use crate::foo::{a, b}; //~^ ERROR absolute paths must start with -//~| this was previously accepted +//~| this is accepted in the current edition mod foo { crate fn a() {} @@ -20,7 +20,7 @@ fn main() { { use crate::foo::{self as x, c}; //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| this is accepted in the current edition x::a(); c(); } 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..3925f76391ab8 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,7 @@ use foo::{a, b}; //~^ ERROR absolute paths must start with -//~| this was previously accepted +//~| this is accepted in the current edition mod foo { crate fn a() {} @@ -20,7 +20,7 @@ fn main() { { use foo::{self as x, c}; //~^ ERROR absolute paths must start with - //~| this was previously accepted + //~| this is accepted in the current edition 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 040aa4a54806a..c2f91e342f56a 100644 --- a/src/test/ui/rust-2018/edition-lint-nested-paths.stderr +++ b/src/test/ui/rust-2018/edition-lint-nested-paths.stderr @@ -9,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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 @@ -18,7 +18,7 @@ error: absolute paths must start with `self`, `super`, `crate`, or an external c 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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..f91405929ee11 100644 --- a/src/test/ui/rust-2018/edition-lint-paths.fixed +++ b/src/test/ui/rust-2018/edition-lint-paths.fixed @@ -11,30 +11,29 @@ pub mod foo { use edition_lint_paths; use crate::bar::Bar; //~^ ERROR absolute - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition use super::bar::Bar2; use crate::bar::Bar3; use crate::bar; //~^ ERROR absolute - //~| WARN this was previously accepted - use crate::{bar as something_else}; + //~| WARN this is accepted in the current edition + use crate::bar as something_else; - use crate::{Bar as SomethingElse, main}; + use crate::{main, Bar as SomethingElse}; //~^ ERROR absolute - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition - use crate::{Bar as SomethingElse2, main as another_main}; + use crate::{main as another_main, Bar as SomethingElse2}; - pub fn test() { - } + pub fn test() {} - pub trait SomeTrait { } + pub trait SomeTrait {} } use crate::bar::Bar; //~^ ERROR absolute -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition pub mod bar { use edition_lint_paths as foo; @@ -46,17 +45,17 @@ pub mod bar { mod baz { use crate::*; //~^ ERROR absolute - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition } -impl crate::foo::SomeTrait for u32 { } +impl crate::foo::SomeTrait for u32 {} //~^ ERROR absolute -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition fn main() { let x = crate::bar::Bar; //~^ ERROR absolute - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition 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.rs b/src/test/ui/rust-2018/edition-lint-paths.rs index c5b4be5a3acf9..52c97c7a25393 100644 --- a/src/test/ui/rust-2018/edition-lint-paths.rs +++ b/src/test/ui/rust-2018/edition-lint-paths.rs @@ -9,32 +9,31 @@ extern crate edition_lint_paths; pub mod foo { use edition_lint_paths; - use ::bar::Bar; + use bar::Bar; //~^ ERROR absolute - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition use super::bar::Bar2; use crate::bar::Bar3; use bar; //~^ ERROR absolute - //~| WARN this was previously accepted - use crate::{bar as something_else}; + //~| WARN this is accepted in the current edition + use crate::bar as something_else; - use {Bar as SomethingElse, main}; + use {main, Bar as SomethingElse}; //~^ ERROR absolute - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition - use crate::{Bar as SomethingElse2, main as another_main}; + use crate::{main as another_main, Bar as SomethingElse2}; - pub fn test() { - } + pub fn test() {} - pub trait SomeTrait { } + pub trait SomeTrait {} } use bar::Bar; //~^ ERROR absolute -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition pub mod bar { use edition_lint_paths as foo; @@ -46,17 +45,17 @@ pub mod bar { mod baz { use *; //~^ ERROR absolute - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition } -impl ::foo::SomeTrait for u32 { } +impl ::foo::SomeTrait for u32 {} //~^ ERROR absolute -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition fn main() { let x = ::bar::Bar; //~^ ERROR absolute - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition 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 dd36d07da56ed..23deeda14a4d0 100644 --- a/src/test/ui/rust-2018/edition-lint-paths.stderr +++ b/src/test/ui/rust-2018/edition-lint-paths.stderr @@ -1,15 +1,15 @@ error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition --> $DIR/edition-lint-paths.rs:12:9 | -LL | use ::bar::Bar; - | ^^^^^^^^^^ help: use `crate`: `crate::bar::Bar` +LL | use bar::Bar; + | ^^^^^^^^ help: use `crate`: `crate::bar::Bar` | note: the lint level is defined here --> $DIR/edition-lint-paths.rs:5:9 | 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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 @@ -18,52 +18,52 @@ error: absolute paths must start with `self`, `super`, `crate`, or an external c 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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 | -LL | use {Bar as SomethingElse, main}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{Bar as SomethingElse, main}` +LL | use {main, Bar as SomethingElse}; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}` | - = 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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:34: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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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:46: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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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:51:6 | -LL | impl ::foo::SomeTrait for u32 { } +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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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:56: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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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 c4c9bdf58c3d8..ea832ef3e7d70 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.fixed +++ b/src/test/ui/rust-2018/extern-crate-rename.fixed @@ -11,7 +11,7 @@ extern crate edition_lint_paths as my_crate; use crate::my_crate::foo; //~^ ERROR absolute paths must start -//~| WARNING this was previously accepted +//~| WARNING this is accepted in the current edition fn main() { foo(); diff --git a/src/test/ui/rust-2018/extern-crate-rename.rs b/src/test/ui/rust-2018/extern-crate-rename.rs index 8f14f2f1fec87..b1f617dd88478 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.rs +++ b/src/test/ui/rust-2018/extern-crate-rename.rs @@ -11,7 +11,7 @@ extern crate edition_lint_paths as my_crate; use my_crate::foo; //~^ ERROR absolute paths must start -//~| WARNING this was previously accepted +//~| WARNING this is accepted in the current edition 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 6ea762ed999a0..4bccbc51223f3 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.stderr +++ b/src/test/ui/rust-2018/extern-crate-rename.stderr @@ -9,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = 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 2a8e24db0bdc5..9b0b0dd8ee1d4 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.fixed +++ b/src/test/ui/rust-2018/extern-crate-submod.fixed @@ -18,7 +18,7 @@ mod m { // *could* rewrite it to `use edition_lint_paths::foo` use crate::m::edition_lint_paths::foo; //~^ ERROR absolute paths must start -//~| WARNING this was previously accepted +//~| WARNING this is accepted in the current edition 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 f3a357917cc7f..dfce9128c5114 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.rs +++ b/src/test/ui/rust-2018/extern-crate-submod.rs @@ -18,7 +18,7 @@ mod m { // *could* rewrite it to `use edition_lint_paths::foo` use m::edition_lint_paths::foo; //~^ ERROR absolute paths must start -//~| WARNING this was previously accepted +//~| WARNING this is accepted in the current edition 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 87a0d492675c7..3c75319aedaed 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.stderr +++ b/src/test/ui/rust-2018/extern-crate-submod.stderr @@ -9,7 +9,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #53130 error: aborting due to previous error diff --git a/src/test/ui/rust-2018/try-ident.fixed b/src/test/ui/rust-2018/try-ident.fixed index 13f6f8e28291d..985348665c908 100644 --- a/src/test/ui/rust-2018/try-ident.fixed +++ b/src/test/ui/rust-2018/try-ident.fixed @@ -6,10 +6,10 @@ fn main() { r#try(); //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING it will become a hard error in the 2018 edition! + //~| WARNING this is accepted in the current edition } fn r#try() { //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING it will become a hard error in the 2018 edition! + //~| WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2018/try-ident.rs b/src/test/ui/rust-2018/try-ident.rs index bed7118011e9a..2c02b75960ec7 100644 --- a/src/test/ui/rust-2018/try-ident.rs +++ b/src/test/ui/rust-2018/try-ident.rs @@ -6,10 +6,10 @@ fn main() { try(); //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING it will become a hard error in the 2018 edition! + //~| WARNING this is accepted in the current edition } fn try() { //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING it will become a hard error in the 2018 edition! + //~| WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2018/try-ident.stderr b/src/test/ui/rust-2018/try-ident.stderr index 2939dc1df705a..3d93b433cf280 100644 --- a/src/test/ui/rust-2018/try-ident.stderr +++ b/src/test/ui/rust-2018/try-ident.stderr @@ -10,7 +10,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 warning: `try` is a keyword in the 2018 edition @@ -19,7 +19,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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 warning: 2 warnings emitted diff --git a/src/test/ui/rust-2018/try-macro.fixed b/src/test/ui/rust-2018/try-macro.fixed index 5c899378b943f..3308870f654c9 100644 --- a/src/test/ui/rust-2018/try-macro.fixed +++ b/src/test/ui/rust-2018/try-macro.fixed @@ -11,8 +11,8 @@ fn foo() -> Result { let x: Result = Ok(22); r#try!(x); //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING this was previously accepted + //~| WARNING this is accepted in the current edition Ok(44) } -fn main() { } +fn main() {} diff --git a/src/test/ui/rust-2018/try-macro.rs b/src/test/ui/rust-2018/try-macro.rs index db8a198d282cc..69e87a1ff621c 100644 --- a/src/test/ui/rust-2018/try-macro.rs +++ b/src/test/ui/rust-2018/try-macro.rs @@ -11,8 +11,8 @@ fn foo() -> Result { let x: Result = Ok(22); try!(x); //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING this was previously accepted + //~| WARNING this is accepted in the current edition Ok(44) } -fn main() { } +fn main() {} diff --git a/src/test/ui/rust-2018/try-macro.stderr b/src/test/ui/rust-2018/try-macro.stderr index cdbb215605e71..f315b4d4a9eb9 100644 --- a/src/test/ui/rust-2018/try-macro.stderr +++ b/src/test/ui/rust-2018/try-macro.stderr @@ -10,7 +10,7 @@ note: the lint level is 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 is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #49716 warning: 1 warning emitted diff --git a/src/test/ui/rust-2021/future-prelude-collision-imported.fixed b/src/test/ui/rust-2021/future-prelude-collision-imported.fixed index 4f8fd9b345b28..725d5aa234eee 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-imported.fixed +++ b/src/test/ui/rust-2021/future-prelude-collision-imported.fixed @@ -26,7 +26,7 @@ mod a { // In this case, we can just use `TryIntoU32` let _: u32 = TryIntoU32::try_into(3u8).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } @@ -39,7 +39,7 @@ mod b { // the path `crate::m::TryIntoU32` (with which it was imported). let _: u32 = crate::m::TryIntoU32::try_into(3u8).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } @@ -52,7 +52,7 @@ mod c { // the path `super::m::TryIntoU32` (with which it was imported). let _: u32 = super::m::TryIntoU32::try_into(3u8).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } diff --git a/src/test/ui/rust-2021/future-prelude-collision-imported.rs b/src/test/ui/rust-2021/future-prelude-collision-imported.rs index 2ce1be6151b11..6ca9a919f3cd7 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-imported.rs +++ b/src/test/ui/rust-2021/future-prelude-collision-imported.rs @@ -26,7 +26,7 @@ mod a { // In this case, we can just use `TryIntoU32` let _: u32 = 3u8.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } @@ -39,7 +39,7 @@ mod b { // the path `crate::m::TryIntoU32` (with which it was imported). let _: u32 = 3u8.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } @@ -52,7 +52,7 @@ mod c { // the path `super::m::TryIntoU32` (with which it was imported). let _: u32 = 3u8.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } diff --git a/src/test/ui/rust-2021/future-prelude-collision-imported.stderr b/src/test/ui/rust-2021/future-prelude-collision-imported.stderr index 3903cbfe82490..8889485c91729 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-imported.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision-imported.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![warn(future_prelude_collision)] | ^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 @@ -18,7 +18,7 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 LL | let _: u32 = 3u8.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `crate::m::TryIntoU32::try_into(3u8)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 @@ -27,7 +27,7 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 LL | let _: u32 = 3u8.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `super::m::TryIntoU32::try_into(3u8)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: 3 warnings emitted diff --git a/src/test/ui/rust-2021/future-prelude-collision.fixed b/src/test/ui/rust-2021/future-prelude-collision.fixed index 9ede9f3a2fb45..4bcbe6b094afd 100644 --- a/src/test/ui/rust-2021/future-prelude-collision.fixed +++ b/src/test/ui/rust-2021/future-prelude-collision.fixed @@ -38,12 +38,14 @@ impl TryIntoU32 for *const u16 { trait FromByteIterator { fn from_iter(iter: T) -> Self - where T: Iterator; + where + T: Iterator; } impl FromByteIterator for Vec { fn from_iter(iter: T) -> Self - where T: Iterator + where + T: Iterator, { iter.collect() } @@ -53,17 +55,17 @@ fn main() { // test dot-call that will break in 2021 edition let _: u32 = TryIntoU32::try_into(3u8).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test associated function call that will break in 2021 edition let _ = ::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test reverse turbofish too let _ = as FromByteIterator>::from_iter(vec![1u8, 2, 3, 4, 5, 6].into_iter()); //~^ WARNING trait-associated function `from_iter` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // negative testing lint (this line should *not* emit a warning) let _: u32 = TryFromU8::try_from(3u8).unwrap(); @@ -71,26 +73,26 @@ fn main() { // test type omission let _: u32 = <_ as TryFromU8>::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test autoderef let _: u32 = TryIntoU32::try_into(*(&3u8)).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test autoref let _: u32 = TryIntoU32::try_into(&3.0).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition let mut data = 3u16; let mut_ptr = std::ptr::addr_of_mut!(data); let _: u32 = TryIntoU32::try_into(mut_ptr as *const _).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition type U32Alias = u32; let _ = ::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2021/future-prelude-collision.rs b/src/test/ui/rust-2021/future-prelude-collision.rs index 914e910396a66..bc23a8a92a6b5 100644 --- a/src/test/ui/rust-2021/future-prelude-collision.rs +++ b/src/test/ui/rust-2021/future-prelude-collision.rs @@ -38,12 +38,14 @@ impl TryIntoU32 for *const u16 { trait FromByteIterator { fn from_iter(iter: T) -> Self - where T: Iterator; + where + T: Iterator; } impl FromByteIterator for Vec { fn from_iter(iter: T) -> Self - where T: Iterator + where + T: Iterator, { iter.collect() } @@ -53,17 +55,17 @@ fn main() { // test dot-call that will break in 2021 edition let _: u32 = 3u8.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test associated function call that will break in 2021 edition let _ = u32::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test reverse turbofish too let _ = >::from_iter(vec![1u8, 2, 3, 4, 5, 6].into_iter()); //~^ WARNING trait-associated function `from_iter` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // negative testing lint (this line should *not* emit a warning) let _: u32 = TryFromU8::try_from(3u8).unwrap(); @@ -71,26 +73,26 @@ fn main() { // test type omission let _: u32 = <_>::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test autoderef let _: u32 = (&3u8).try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test autoref let _: u32 = 3.0.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition let mut data = 3u16; let mut_ptr = std::ptr::addr_of_mut!(data); let _: u32 = mut_ptr.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition type U32Alias = u32; let _ = U32Alias::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2021/future-prelude-collision.stderr b/src/test/ui/rust-2021/future-prelude-collision.stderr index 190145ef4dbfc..e167468ab1971 100644 --- a/src/test/ui/rust-2021/future-prelude-collision.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision.stderr @@ -1,5 +1,5 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:54:18 + --> $DIR/future-prelude-collision.rs:56:18 | LL | let _: u32 = 3u8.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(3u8)` @@ -9,70 +9,70 @@ note: the lint level is defined here | LL | #![warn(future_prelude_collision)] | ^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait-associated function `try_from` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:59:13 + --> $DIR/future-prelude-collision.rs:61:13 | LL | let _ = u32::try_from(3u8).unwrap(); | ^^^^^^^^^^^^^ help: disambiguate the associated function: `::try_from` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait-associated function `from_iter` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:64:13 + --> $DIR/future-prelude-collision.rs:66:13 | LL | let _ = >::from_iter(vec![1u8, 2, 3, 4, 5, 6].into_iter()); | ^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: ` as FromByteIterator>::from_iter` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait-associated function `try_from` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:72:18 + --> $DIR/future-prelude-collision.rs:74:18 | LL | let _: u32 = <_>::try_from(3u8).unwrap(); | ^^^^^^^^^^^^^ help: disambiguate the associated function: `<_ as TryFromU8>::try_from` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:77:18 + --> $DIR/future-prelude-collision.rs:79:18 | LL | let _: u32 = (&3u8).try_into().unwrap(); | ^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(*(&3u8))` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:82:18 + --> $DIR/future-prelude-collision.rs:84:18 | LL | let _: u32 = 3.0.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(&3.0)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:88:18 + --> $DIR/future-prelude-collision.rs:90:18 | LL | let _: u32 = mut_ptr.try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(mut_ptr as *const _)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait-associated function `try_from` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:93:13 + --> $DIR/future-prelude-collision.rs:95:13 | LL | let _ = U32Alias::try_from(3u8).unwrap(); | ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `::try_from` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: 8 warnings emitted diff --git a/src/test/ui/rust-2021/generic-type-collision.fixed b/src/test/ui/rust-2021/generic-type-collision.fixed index 00fb128a981e1..d1a085f23a01c 100644 --- a/src/test/ui/rust-2021/generic-type-collision.fixed +++ b/src/test/ui/rust-2021/generic-type-collision.fixed @@ -14,5 +14,5 @@ impl MyTrait<()> for Vec { fn main() { as MyTrait<_>>::from_iter(None); //~^ WARNING trait-associated function `from_iter` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2021/generic-type-collision.rs b/src/test/ui/rust-2021/generic-type-collision.rs index 406fba4d2479b..5069fba396ec6 100644 --- a/src/test/ui/rust-2021/generic-type-collision.rs +++ b/src/test/ui/rust-2021/generic-type-collision.rs @@ -14,5 +14,5 @@ impl MyTrait<()> for Vec { fn main() { >::from_iter(None); //~^ WARNING trait-associated function `from_iter` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2021/generic-type-collision.stderr b/src/test/ui/rust-2021/generic-type-collision.stderr index 9374379d24763..05591c3d4487d 100644 --- a/src/test/ui/rust-2021/generic-type-collision.stderr +++ b/src/test/ui/rust-2021/generic-type-collision.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![warn(future_prelude_collision)] | ^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: 1 warning emitted diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.fixed b/src/test/ui/rust-2021/inherent-dyn-collision.fixed index cbb6e9659dff3..cf6287a758f91 100644 --- a/src/test/ui/rust-2021/inherent-dyn-collision.fixed +++ b/src/test/ui/rust-2021/inherent-dyn-collision.fixed @@ -40,7 +40,7 @@ mod inner { pub fn test() -> u32 { (&*get_dyn_trait()).try_into().unwrap() //~^ WARNING trait method `try_into` will become ambiguous - //~| WARNING this was previously accepted + //~| WARNING this is accepted in the current edition } } diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.rs b/src/test/ui/rust-2021/inherent-dyn-collision.rs index 1c9929eff91de..0349ad5b6415a 100644 --- a/src/test/ui/rust-2021/inherent-dyn-collision.rs +++ b/src/test/ui/rust-2021/inherent-dyn-collision.rs @@ -40,7 +40,7 @@ mod inner { pub fn test() -> u32 { get_dyn_trait().try_into().unwrap() //~^ WARNING trait method `try_into` will become ambiguous - //~| WARNING this was previously accepted + //~| WARNING this is accepted in the current edition } } diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.stderr b/src/test/ui/rust-2021/inherent-dyn-collision.stderr index 3d7637100c2c9..9e95419715e31 100644 --- a/src/test/ui/rust-2021/inherent-dyn-collision.stderr +++ b/src/test/ui/rust-2021/inherent-dyn-collision.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![warn(future_prelude_collision)] | ^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: 1 warning emitted diff --git a/src/test/ui/suggestions/issue-61963.rs b/src/test/ui/suggestions/issue-61963.rs index b5c379ebc6eb9..d31ed01b1916b 100644 --- a/src/test/ui/suggestions/issue-61963.rs +++ b/src/test/ui/suggestions/issue-61963.rs @@ -17,11 +17,11 @@ pub struct Qux(T); #[dom_struct] pub struct Foo { //~^ ERROR trait objects without an explicit `dyn` are deprecated [bare_trait_objects] - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition qux: Qux>, bar: Box, //~^ ERROR trait objects without an explicit `dyn` are deprecated [bare_trait_objects] - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition } fn main() {} diff --git a/src/test/ui/suggestions/issue-61963.stderr b/src/test/ui/suggestions/issue-61963.stderr index f8c58b6173477..6282a693855af 100644 --- a/src/test/ui/suggestions/issue-61963.stderr +++ b/src/test/ui/suggestions/issue-61963.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(bare_trait_objects)] | ^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: trait objects without an explicit `dyn` are deprecated @@ -18,7 +18,7 @@ error: trait objects without an explicit `dyn` are deprecated LL | pub struct Foo { | ^^^ help: use `dyn`: `dyn pub` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error: aborting due to 2 previous errors diff --git a/src/test/ui/traits/bound/not-on-bare-trait.rs b/src/test/ui/traits/bound/not-on-bare-trait.rs index 08355a55630f6..daf18c6702e46 100644 --- a/src/test/ui/traits/bound/not-on-bare-trait.rs +++ b/src/test/ui/traits/bound/not-on-bare-trait.rs @@ -7,7 +7,7 @@ trait Foo { fn foo(_x: Foo + Send) { //~^ ERROR the size for values of type //~| WARN trait objects without an explicit `dyn` are deprecated - //~| WARN this was previously accepted by the compiler + //~| WARN this is accepted in the current edition } fn main() {} diff --git a/src/test/ui/traits/bound/not-on-bare-trait.stderr b/src/test/ui/traits/bound/not-on-bare-trait.stderr index 418e67d56ea1d..e65b8989e0b1e 100644 --- a/src/test/ui/traits/bound/not-on-bare-trait.stderr +++ b/src/test/ui/traits/bound/not-on-bare-trait.stderr @@ -5,7 +5,7 @@ LL | fn foo(_x: Foo + Send) { | ^^^^^^^^^^ help: use `dyn`: `dyn Foo + Send` | = note: `#[warn(bare_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 the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #80165 error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time diff --git a/src/test/ui/traits/reservation-impl/non-lattice-ok.rs b/src/test/ui/traits/reservation-impl/non-lattice-ok.rs index f14589ccf846d..b894577c1f7da 100644 --- a/src/test/ui/traits/reservation-impl/non-lattice-ok.rs +++ b/src/test/ui/traits/reservation-impl/non-lattice-ok.rs @@ -28,7 +28,7 @@ // go with a known approach, we should go with a "marker trait overlap"-style // approach. // -// [ii]: http://smallcultfollowing.com/babysteps/blog/2016/09/24/intersection-impls/ +// [ii]: https://smallcultfollowing.com/babysteps/blog/2016/09/24/intersection-impls/ #![feature(rustc_attrs, never_type)] diff --git a/src/test/ui/wait-forked-but-failed-child.rs b/src/test/ui/wait-forked-but-failed-child.rs index 2683590775904..0eb0fe071f50d 100644 --- a/src/test/ui/wait-forked-but-failed-child.rs +++ b/src/test/ui/wait-forked-but-failed-child.rs @@ -28,7 +28,7 @@ use std::process::Command; fn find_zombies() { let my_pid = unsafe { libc::getpid() }; - // http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html + // https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html let ps_cmd_output = Command::new("ps").args(&["-A", "-o", "pid,ppid,args"]).output().unwrap(); let ps_output = String::from_utf8_lossy(&ps_cmd_output.stdout);