Change how edition based future compatibility warnings are handled
This commit is contained in:
parent
117799b73c
commit
23176f60e7
98 changed files with 380 additions and 540 deletions
|
@ -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,8 @@ declare_lint! {
|
|||
"detects calling `into_iter` on arrays",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #66145 <https://github.com/rust-lang/rust/issues/66145>",
|
||||
edition: None,
|
||||
future_breakage: Some(FutureBreakage {
|
||||
date: None
|
||||
})
|
||||
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2021),
|
||||
custom_explanation: Some("This will continue to compile in Rust 2021 but it will behave slightly differently!")
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/49716>",
|
||||
edition: Some(Edition::Edition2018),
|
||||
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2018),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/68585>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -293,7 +290,6 @@ declare_lint! {
|
|||
"constant evaluation encountered erroneous expression",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #71800 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/34537>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -980,7 +975,6 @@ declare_lint! {
|
|||
"detect public re-exports of private extern crates",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #34537 <https://github.com/rust-lang/rust/issues/34537>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1010,7 +1004,6 @@ declare_lint! {
|
|||
"type parameter default erroneously allowed in invalid location",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #36887 <https://github.com/rust-lang/rust/issues/36887>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1078,7 +1071,6 @@ declare_lint! {
|
|||
"detects unaligned references to fields of packed structs",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #82523 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/35203>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1244,7 +1235,6 @@ declare_lint! {
|
|||
"detects missing fragment specifiers in unused `macro_rules!` patterns",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #40107 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/56484>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1362,7 +1350,6 @@ declare_lint! {
|
|||
"distinct impls distinguished only by the leak-check code",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #56105 <https://github.com/rust-lang/rust/issues/56105>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1554,7 +1541,7 @@ declare_lint! {
|
|||
"raw pointer to an inference variable",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #46906 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/41620>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1769,7 +1755,6 @@ declare_lint! {
|
|||
"detects name collision with an existing but unstable method",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #48919 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/83583>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1983,7 +1966,6 @@ declare_lint! {
|
|||
/// macros in that external crate to be brought into the prelude of the
|
||||
/// crate, making the macros in scope everywhere. As part of the efforts
|
||||
/// to simplify handling of dependencies in the [2018 edition], the use of
|
||||
/// `extern crate` is being phased out. To bring macros from extern crates
|
||||
/// into scope, it is recommended to use a [`use` import].
|
||||
///
|
||||
/// This lint is "allow" by default because this is a stylistic choice
|
||||
|
@ -2043,7 +2025,6 @@ declare_lint! {
|
|||
cannot be referred to by absolute paths",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #52234 <https://github.com/rust-lang/rust/issues/52234>",
|
||||
edition: None,
|
||||
};
|
||||
crate_level_only
|
||||
}
|
||||
|
@ -2134,7 +2115,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 <https://github.com/rust-lang/rust/issues/62411>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2190,7 +2170,6 @@ declare_lint! {
|
|||
"pointers are not structural-match",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #62411 <https://github.com/rust-lang/rust/issues/70861>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2229,7 +2208,6 @@ declare_lint! {
|
|||
expression contains values of non-structural-match types",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #73448 <https://github.com/rust-lang/rust/issues/73448>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2287,7 +2265,6 @@ declare_lint! {
|
|||
"ambiguous associated items",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #57644 <https://github.com/rust-lang/rust/issues/57644>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2318,7 +2295,6 @@ declare_lint! {
|
|||
"reservation of a two-phased borrow conflicts with other shared borrows",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #59159 <https://github.com/rust-lang/rust/issues/59159>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2360,7 +2336,6 @@ declare_lint! {
|
|||
"a feature gate that doesn't break dependent crates",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #64266 <https://github.com/rust-lang/rust/issues/64266>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2589,7 +2564,6 @@ declare_lint! {
|
|||
"a C-like enum implementing Drop is cast",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #73333 <https://github.com/rust-lang/rust/issues/73333>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2629,7 +2603,6 @@ declare_lint! {
|
|||
"detects a generic constant is used in a type without a emitting a warning",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #76200 <https://github.com/rust-lang/rust/issues/76200>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2688,7 +2661,6 @@ declare_lint! {
|
|||
"uninhabited static",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #74840 <https://github.com/rust-lang/rust/issues/74840>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2758,7 +2730,6 @@ declare_lint! {
|
|||
"unsupported naked function definitions",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #32408 <https://github.com/rust-lang/rust/issues/32408>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2831,7 +2802,6 @@ declare_lint! {
|
|||
"trailing semicolon in macro body used as expression",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #79813 <https://github.com/rust-lang/rust/issues/79813>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -3154,7 +3124,6 @@ declare_lint! {
|
|||
"detects invalid `#[doc(...)]` attributes",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #82730 <https://github.com/rust-lang/rust/issues/82730>",
|
||||
edition: None,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -3201,7 +3170,6 @@ declare_lint! {
|
|||
"detects usage of old versions of certain proc-macro crates",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #83125 <https://github.com/rust-lang/rust/issues/83125>",
|
||||
edition: None,
|
||||
future_breakage: Some(FutureBreakage {
|
||||
date: None
|
||||
})
|
||||
|
|
|
@ -142,13 +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<Edition>,
|
||||
/// 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<FutureBreakage>,
|
||||
/// Provide a custom explanation message for diagnostics
|
||||
/// if the default explanation message is not appropriate
|
||||
pub custom_explanation: Option<&'static str>,
|
||||
}
|
||||
|
||||
/// The reason for future incompatibility
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum FutureIncompatibilityReason {
|
||||
/// We're fixing a bug which will impact all editions
|
||||
BugFix,
|
||||
/// 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<Edition> {
|
||||
match self {
|
||||
Self::EditionError(e) => Some(e),
|
||||
Self::EditionSemanticsChange(e) => Some(e),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
@ -158,7 +184,12 @@ pub struct FutureBreakage {
|
|||
|
||||
impl FutureIncompatibleInfo {
|
||||
pub const fn default_fields_for_macro() -> Self {
|
||||
FutureIncompatibleInfo { reference: "", edition: None, future_breakage: None }
|
||||
FutureIncompatibleInfo {
|
||||
reference: "",
|
||||
reason: FutureIncompatibilityReason::BugFix,
|
||||
future_breakage: None,
|
||||
custom_explanation: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 valid in the current edition (Rust {}) but is not accepted in the Rust {} edition!",
|
||||
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);
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
trait T {
|
||||
fn foo(_: i32); //~ WARNING anonymous parameters are deprecated
|
||||
//~| WARNING hard error
|
||||
//~| WARNING this is valid in the current edition
|
||||
|
||||
fn bar_with_default_impl(_: String, _: String) {}
|
||||
//~^ WARNING anonymous parameters are deprecated
|
||||
//~| WARNING hard error
|
||||
//~| WARNING this is valid in the current edition
|
||||
//~| WARNING anonymous parameters are deprecated
|
||||
//~| WARNING hard error
|
||||
//~| WARNING this is valid in the current edition
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
trait T {
|
||||
fn foo(i32); //~ WARNING anonymous parameters are deprecated
|
||||
//~| WARNING hard error
|
||||
//~| WARNING this is valid in the current edition
|
||||
|
||||
fn bar_with_default_impl(String, String) {}
|
||||
//~^ WARNING anonymous parameters are deprecated
|
||||
//~| WARNING hard error
|
||||
//~| WARNING this is valid in the current edition
|
||||
//~| WARNING anonymous parameters are deprecated
|
||||
//~| WARNING hard error
|
||||
//~| WARNING this is valid in the current edition
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
|
||||
|
||||
warning: 3 warnings emitted
|
||||
|
|
|
@ -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 valid 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 valid 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 valid in the current edition
|
||||
//~^^^ WARN this is valid 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 valid 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 valid 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 valid 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 valid 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 valid in the current edition
|
||||
//~^^^ WARN this is valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
|
|
@ -6,22 +6,22 @@
|
|||
mod outer_mod {
|
||||
pub mod r#await {
|
||||
//~^ ERROR `await` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
pub struct r#await;
|
||||
//~^ ERROR `await` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
|
|
@ -6,22 +6,22 @@
|
|||
mod outer_mod {
|
||||
pub mod await {
|
||||
//~^ ERROR `await` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
pub struct await;
|
||||
//~^ ERROR `await` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
}
|
||||
fn c() {
|
||||
foo::<3 + 3>(); //~ ERROR expressions must be enclosed in braces
|
||||
|
|
|
@ -138,7 +138,7 @@ LL | foo::<BAR + BAR>();
|
|||
| ^^^^^^^^^ 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error[E0747]: type provided when a constant was expected
|
||||
|
|
|
@ -13,27 +13,27 @@
|
|||
mod outer_mod {
|
||||
pub mod r#dyn {
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
pub struct r#dyn;
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
}
|
||||
use outer_mod::r#dyn::r#dyn;
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {
|
||||
match r#dyn { r#dyn => {} }
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
macro_defn::r#dyn();
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
|
||||
// Note that we do not lint nor fix occurrences under macros
|
||||
($dyn:tt) => { (Box<dyn Trait>, 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 valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
::outer_mod::r#dyn::r#dyn
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
|
||||
|
||||
pub fn boxed() -> r#dyn!(
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
// Note that we do not lint nor fix occurrences under macros
|
||||
dyn
|
||||
|
|
|
@ -13,27 +13,27 @@
|
|||
mod outer_mod {
|
||||
pub mod dyn {
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
pub struct dyn;
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
}
|
||||
use outer_mod::dyn::dyn;
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {
|
||||
match dyn { dyn => {} }
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
macro_defn::dyn();
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
|
||||
// Note that we do not lint nor fix occurrences under macros
|
||||
($dyn:tt) => { (Box<dyn Trait>, 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 valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
::outer_mod::dyn::dyn
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
|
||||
|
||||
pub fn boxed() -> dyn!(
|
||||
//~^ ERROR `dyn` is a keyword
|
||||
//~| WARN was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
// Note that we do not lint nor fix occurrences under macros
|
||||
dyn
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
|
||||
|
||||
error: aborting due to 14 previous errors
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
fn function(x: &SomeTrait, y: Box<SomeTrait>) {
|
||||
//~^ ERROR trait objects without an explicit `dyn` are deprecated
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR trait objects without an explicit `dyn` are deprecated
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
}
|
||||
|
||||
trait SomeTrait {}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2018) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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<SomeTrait>) {
|
||||
| ^^^^^^^^^ 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 valid in the current edition (Rust 2018) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2018) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
trait Tr {
|
||||
fn f(u8) {} //~ ERROR anonymous parameters are deprecated
|
||||
//~^ WARN this was previously accepted
|
||||
//~^ WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -11,6 +11,6 @@ fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
|||
//~| 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 valid in the current edition
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -26,7 +26,7 @@ LL | fn foo<'a>(arg: Box<dyn X<Y('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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/66145>
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/66145>
|
||||
|
||||
|
|
|
@ -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 valid 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 valid 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 valid in the current edition
|
||||
let _: Dyn::Ty; //~ ERROR ambiguous associated type
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ LL | Dyn::func();
|
|||
| ^^^ help: use `dyn`: `<dyn 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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`: `<dyn (::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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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`: `<dyn 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error: aborting due to previous error; 3 warnings emitted
|
||||
|
|
|
@ -7,6 +7,6 @@ pub trait SomeTrait {}
|
|||
|
||||
pub fn function(_x: Box<SomeTrait>) {}
|
||||
//~^ WARN trait objects without an explicit `dyn` are deprecated
|
||||
//~| WARN this was previously accepted by the compiler
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -5,7 +5,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
|
|||
| ^^^^^^^^^ 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
|
|
@ -7,6 +7,6 @@ pub trait SomeTrait {}
|
|||
|
||||
pub fn function(_x: Box<SomeTrait>) {}
|
||||
//~^ WARN trait objects without an explicit `dyn` are deprecated
|
||||
//~| WARN this was previously accepted by the compiler
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -5,7 +5,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
|
|||
| ^^^^^^^^^ 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
|
|
@ -7,6 +7,6 @@ pub trait SomeTrait {}
|
|||
|
||||
pub fn function(_x: Box<SomeTrait>) {}
|
||||
//~^ WARN trait objects without an explicit `dyn` are deprecated
|
||||
//~| WARN this was previously accepted by the compiler
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -5,7 +5,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
|
|||
| ^^^^^^^^^ 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
_ => {}
|
||||
}
|
||||
|
||||
match &despondency {
|
||||
&(1..=2) => {}
|
||||
//~^ WARN `...` range patterns are deprecated
|
||||
//~| WARN this was previously accepted by the compiler
|
||||
//~| WARN this is valid in the current edition
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
_ => {}
|
||||
}
|
||||
|
||||
match &despondency {
|
||||
&1...2 => {}
|
||||
//~^ WARN `...` range patterns are deprecated
|
||||
//~| WARN this was previously accepted by the compiler
|
||||
//~| WARN this is valid in the current edition
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
warning: 2 warnings emitted
|
||||
|
|
|
@ -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 <https://github.com/rust-lang/rust/issues/66145>
|
||||
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error[E0224]: at least one trait is required for an object type
|
||||
|
|
|
@ -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 valid 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 valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error[E0224]: at least one trait is required for an object type
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error[E0224]: at least one trait is required for an object type
|
||||
|
|
|
@ -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 valid 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 valid 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 valid 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 valid 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 valid 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 valid 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 valid 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 valid 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 valid in the current edition
|
||||
let $e1..=$e2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: this error originates in the macro `mac2` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
let _: Box<?Sized + (for<'a> 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 valid in the current edition
|
||||
let _: Box<for<'a> 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 valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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<?Sized + (for<'a> 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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<for<'a> 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error[E0225]: only auto traits can be used as additional traits in a trait object
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
//~| HELP use `..=` for an inclusive range
|
||||
&(10 ..=15) => {}
|
||||
//~^ ERROR the range pattern here has ambiguous interpretation
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
//~| HELP use `..=` for an inclusive range
|
||||
&10..=15 => {}
|
||||
//~^ ERROR the range pattern here has ambiguous interpretation
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
//~| HELP use `..=` for an inclusive range
|
||||
box 10..=15 => {}
|
||||
//~^ ERROR the range pattern here has ambiguous interpretation
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
|
||||
fn main() {
|
||||
let async = 3; //~ ERROR: is a keyword
|
||||
//~^ WARN previously accepted
|
||||
//~^ WARN this is valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
// run-rustfix
|
||||
|
||||
fn r#async() {} //~ ERROR async
|
||||
//~^ WARN hard error in the 2018 edition
|
||||
//~^ WARN this is valid 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 valid in the current edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
foo!(r#async);
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
struct MyStruct;
|
||||
impl r#async for MyStruct {}
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
mod async_static {
|
||||
static r#async: u32 = 0;
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
mod async_const {
|
||||
const r#async: u32 = 0;
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
struct Foo;
|
||||
impl Foo { fn r#async() {} }
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {
|
||||
struct r#async {}
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
let r#async: r#async = r#async {};
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid 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 valid 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 valid in the current edition
|
||||
}
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
// run-rustfix
|
||||
|
||||
fn async() {} //~ ERROR async
|
||||
//~^ WARN hard error in the 2018 edition
|
||||
//~^ WARN this is valid 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 valid in the current edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
foo!(async);
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
struct MyStruct;
|
||||
impl async for MyStruct {}
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
mod async_static {
|
||||
static async: u32 = 0;
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
mod async_const {
|
||||
const async: u32 = 0;
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
struct Foo;
|
||||
impl Foo { fn async() {} }
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {
|
||||
struct async {}
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
let async: async = async {};
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
//~| ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid 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 valid in the current edition
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! consumes_async {
|
||||
(async) => (1)
|
||||
//~^ ERROR async
|
||||
//~| WARN hard error in the 2018 edition
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
|
||||
|
||||
error: aborting due to 15 previous errors
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
fn main() {
|
||||
let r#dyn = (); //~ ERROR dyn
|
||||
//~^ WARN hard error in the 2018 edition
|
||||
//~^ WARN this is valid in the current edition
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
fn main() {
|
||||
let dyn = (); //~ ERROR dyn
|
||||
//~^ WARN hard error in the 2018 edition
|
||||
//~^ WARN this is valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -19,9 +19,9 @@ mod foo {
|
|||
fn main() {
|
||||
let _: <foo::Baz as crate::foo::Foo>::Bar = ();
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| this was previously accepted
|
||||
//~| this is valid in the current edition
|
||||
|
||||
let _: <crate::foo::Baz as foo::Foo>::Bar = ();
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| this was previously accepted
|
||||
//~| this is valid in the current edition
|
||||
}
|
||||
|
|
|
@ -19,9 +19,9 @@ mod foo {
|
|||
fn main() {
|
||||
let _: <foo::Baz as ::foo::Foo>::Bar = ();
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| this was previously accepted
|
||||
//~| this is valid in the current edition
|
||||
|
||||
let _: <::foo::Baz as foo::Foo>::Bar = ();
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| this was previously accepted
|
||||
//~| this is valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/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 | 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
|
||||
use crate::foo::{bar::{XX, baz::{}}};
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
use crate::foo::{bar::{baz::{}, baz1::{}}};
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
|
||||
use foo::{bar::{XX, baz::{}}};
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
use foo::{bar::{baz::{}, baz1::{}}};
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
use crate::foo::{a, b};
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| this was previously accepted
|
||||
//~| this is valid 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 valid in the current edition
|
||||
x::a();
|
||||
c();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
use foo::{a, b};
|
||||
//~^ ERROR absolute paths must start with
|
||||
//~| this was previously accepted
|
||||
//~| this is valid 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 valid in the current edition
|
||||
x::a();
|
||||
c();
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
@ -11,18 +11,18 @@ pub mod foo {
|
|||
use edition_lint_paths;
|
||||
use crate::bar::Bar;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
use super::bar::Bar2;
|
||||
use crate::bar::Bar3;
|
||||
|
||||
use crate::bar;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
use crate::{bar as something_else};
|
||||
|
||||
use crate::{Bar as SomethingElse, main};
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
use crate::{Bar as SomethingElse2, main as another_main};
|
||||
|
||||
|
@ -34,7 +34,7 @@ pub mod foo {
|
|||
|
||||
use crate::bar::Bar;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
pub mod bar {
|
||||
use edition_lint_paths as foo;
|
||||
|
@ -46,17 +46,17 @@ pub mod bar {
|
|||
mod baz {
|
||||
use crate::*;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
impl crate::foo::SomeTrait for u32 { }
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {
|
||||
let x = crate::bar::Bar;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
let x = bar::Bar;
|
||||
let x = crate::bar::Bar;
|
||||
let x = self::bar::Bar;
|
||||
|
|
|
@ -11,18 +11,18 @@ pub mod foo {
|
|||
use edition_lint_paths;
|
||||
use ::bar::Bar;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
use super::bar::Bar2;
|
||||
use crate::bar::Bar3;
|
||||
|
||||
use bar;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
use crate::{bar as something_else};
|
||||
|
||||
use {Bar as SomethingElse, main};
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
use crate::{Bar as SomethingElse2, main as another_main};
|
||||
|
||||
|
@ -34,7 +34,7 @@ pub mod foo {
|
|||
|
||||
use bar::Bar;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
pub mod bar {
|
||||
use edition_lint_paths as foo;
|
||||
|
@ -46,17 +46,17 @@ pub mod bar {
|
|||
mod baz {
|
||||
use *;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
impl ::foo::SomeTrait for u32 { }
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
|
||||
fn main() {
|
||||
let x = ::bar::Bar;
|
||||
//~^ ERROR absolute
|
||||
//~| WARN this was previously accepted
|
||||
//~| WARN this is valid in the current edition
|
||||
let x = bar::Bar;
|
||||
let x = crate::bar::Bar;
|
||||
let x = self::bar::Bar;
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/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 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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/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 {Bar as SomethingElse, main};
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{Bar as SomethingElse, main}`
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
|
||||
= warning: this is valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
|
||||
|
@ -36,7 +36,7 @@ error: absolute paths must start with `self`, `super`, `crate`, or an external c
|
|||
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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
|
||||
|
@ -45,7 +45,7 @@ error: absolute paths must start with `self`, `super`, `crate`, or an external c
|
|||
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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
|
||||
|
@ -54,7 +54,7 @@ error: absolute paths must start with `self`, `super`, `crate`, or an external c
|
|||
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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
|
||||
|
@ -63,7 +63,7 @@ error: absolute paths must start with `self`, `super`, `crate`, or an external c
|
|||
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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
|
||||
fn main() {
|
||||
foo();
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
|
||||
fn main() {
|
||||
foo();
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
|
||||
fn main() {
|
||||
foo();
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
|
||||
fn main() {
|
||||
foo();
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -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 valid 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 valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid 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 valid in the current edition
|
||||
}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
|
||||
|
||||
warning: 2 warnings emitted
|
||||
|
|
|
@ -11,7 +11,7 @@ fn foo() -> Result<usize, ()> {
|
|||
let x: Result<usize, ()> = Ok(22);
|
||||
r#try!(x);
|
||||
//~^ WARNING `try` is a keyword in the 2018 edition
|
||||
//~| WARNING this was previously accepted
|
||||
//~| WARNING this is valid in the current edition
|
||||
Ok(44)
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ fn foo() -> Result<usize, ()> {
|
|||
let x: Result<usize, ()> = Ok(22);
|
||||
try!(x);
|
||||
//~^ WARNING `try` is a keyword in the 2018 edition
|
||||
//~| WARNING this was previously accepted
|
||||
//~| WARNING this is valid in the current edition
|
||||
Ok(44)
|
||||
}
|
||||
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2018 edition!
|
||||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
|
|
@ -17,11 +17,11 @@ pub struct Qux<T>(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 valid in the current edition
|
||||
qux: Qux<Qux<Baz>>,
|
||||
bar: Box<Bar>,
|
||||
//~^ ERROR trait objects without an explicit `dyn` are deprecated [bare_trait_objects]
|
||||
//~| WARN this was previously accepted by the compiler
|
||||
//~| WARN this is valid in the current edition
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
@ -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 valid in the current edition
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -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 valid in the current edition (Rust 2015) but is not accepted in the Rust 2021 edition!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue