mirror of https://github.com/rust-lang/rust.git
Auto merge of #87963 - GuillaumeGomez:rollup-e54sbez, r=GuillaumeGomez
Rollup of 4 pull requests Successful merges: - #87819 (Use a more accurate span on assoc types WF checks) - #87863 (Fix Windows Command::env("PATH")) - #87885 (Link to edition guide instead of issues for 2021 lints.) - #87941 (Fix/improve rustdoc-js tool) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
4498e300e4
|
@ -32,7 +32,7 @@ declare_lint! {
|
|||
Warn,
|
||||
"detects calling `into_iter` on arrays in Rust 2015 and 2018",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #66145 <https://github.com/rust-lang/rust/issues/66145>",
|
||||
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>",
|
||||
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2021),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1680,7 +1680,7 @@ declare_lint! {
|
|||
Warn,
|
||||
"`...` range patterns are deprecated",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #80165 <https://github.com/rust-lang/rust/issues/80165>",
|
||||
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
|
||||
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1605,7 +1605,7 @@ declare_lint! {
|
|||
Warn,
|
||||
"suggest using `dyn Trait` for trait objects",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #80165 <https://github.com/rust-lang/rust/issues/80165>",
|
||||
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
|
||||
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
|
||||
};
|
||||
}
|
||||
|
@ -3247,7 +3247,7 @@ declare_lint! {
|
|||
Allow,
|
||||
"detects usage of old versions of or-patterns",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #84869 <https://github.com/rust-lang/rust/issues/84869>",
|
||||
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>",
|
||||
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
|
||||
};
|
||||
}
|
||||
|
@ -3296,7 +3296,7 @@ declare_lint! {
|
|||
"detects the usage of trait methods which are ambiguous with traits added to the \
|
||||
prelude in future editions",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #85684 <https://github.com/rust-lang/rust/issues/85684>",
|
||||
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>",
|
||||
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
|
||||
};
|
||||
}
|
||||
|
@ -3331,7 +3331,7 @@ declare_lint! {
|
|||
Allow,
|
||||
"identifiers that will be parsed as a prefix in Rust 2021",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #84978 <https://github.com/rust-lang/rust/issues/84978>",
|
||||
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>",
|
||||
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
|
||||
};
|
||||
crate_level_only
|
||||
|
|
|
@ -194,12 +194,13 @@ pub fn check_trait_item(tcx: TyCtxt<'_>, def_id: LocalDefId) {
|
|||
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
|
||||
let trait_item = tcx.hir().expect_trait_item(hir_id);
|
||||
|
||||
let method_sig = match trait_item.kind {
|
||||
hir::TraitItemKind::Fn(ref sig, _) => Some(sig),
|
||||
_ => None,
|
||||
let (method_sig, span) = match trait_item.kind {
|
||||
hir::TraitItemKind::Fn(ref sig, _) => (Some(sig), trait_item.span),
|
||||
hir::TraitItemKind::Type(_bounds, Some(ty)) => (None, ty.span),
|
||||
_ => (None, trait_item.span),
|
||||
};
|
||||
check_object_unsafe_self_trait_by_name(tcx, &trait_item);
|
||||
check_associated_item(tcx, trait_item.hir_id(), trait_item.span, method_sig);
|
||||
check_associated_item(tcx, trait_item.hir_id(), span, method_sig);
|
||||
}
|
||||
|
||||
fn could_be_self(trait_def_id: LocalDefId, ty: &hir::Ty<'_>) -> bool {
|
||||
|
@ -268,12 +269,13 @@ pub fn check_impl_item(tcx: TyCtxt<'_>, def_id: LocalDefId) {
|
|||
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
|
||||
let impl_item = tcx.hir().expect_impl_item(hir_id);
|
||||
|
||||
let method_sig = match impl_item.kind {
|
||||
hir::ImplItemKind::Fn(ref sig, _) => Some(sig),
|
||||
_ => None,
|
||||
let (method_sig, span) = match impl_item.kind {
|
||||
hir::ImplItemKind::Fn(ref sig, _) => (Some(sig), impl_item.span),
|
||||
hir::ImplItemKind::TyAlias(ty) => (None, ty.span),
|
||||
_ => (None, impl_item.span),
|
||||
};
|
||||
|
||||
check_associated_item(tcx, impl_item.hir_id(), impl_item.span, method_sig);
|
||||
check_associated_item(tcx, impl_item.hir_id(), span, method_sig);
|
||||
}
|
||||
|
||||
fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) {
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
use crate::borrow::Borrow;
|
||||
use crate::cmp;
|
||||
use crate::collections::BTreeMap;
|
||||
use crate::convert::{TryFrom, TryInto};
|
||||
|
@ -46,6 +45,12 @@ pub struct EnvKey {
|
|||
utf16: Vec<u16>,
|
||||
}
|
||||
|
||||
impl EnvKey {
|
||||
fn new<T: Into<OsString>>(key: T) -> Self {
|
||||
EnvKey::from(key.into())
|
||||
}
|
||||
}
|
||||
|
||||
// Comparing Windows environment variable keys[1] are behaviourally the
|
||||
// composition of two operations[2]:
|
||||
//
|
||||
|
@ -100,6 +105,20 @@ impl PartialEq for EnvKey {
|
|||
}
|
||||
}
|
||||
}
|
||||
impl PartialOrd<str> for EnvKey {
|
||||
fn partial_cmp(&self, other: &str) -> Option<cmp::Ordering> {
|
||||
Some(self.cmp(&EnvKey::new(other)))
|
||||
}
|
||||
}
|
||||
impl PartialEq<str> for EnvKey {
|
||||
fn eq(&self, other: &str) -> bool {
|
||||
if self.os_string.len() != other.len() {
|
||||
false
|
||||
} else {
|
||||
self.cmp(&EnvKey::new(other)) == cmp::Ordering::Equal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Environment variable keys should preserve their original case even though
|
||||
// they are compared using a caseless string mapping.
|
||||
|
@ -115,9 +134,9 @@ impl From<EnvKey> for OsString {
|
|||
}
|
||||
}
|
||||
|
||||
impl Borrow<OsStr> for EnvKey {
|
||||
fn borrow(&self) -> &OsStr {
|
||||
&self.os_string
|
||||
impl From<&OsStr> for EnvKey {
|
||||
fn from(k: &OsStr) -> Self {
|
||||
Self::from(k.to_os_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,7 +261,7 @@ impl Command {
|
|||
// to read the *child's* PATH if one is provided. See #15149 for more
|
||||
// details.
|
||||
let program = maybe_env.as_ref().and_then(|env| {
|
||||
if let Some(v) = env.get(OsStr::new("PATH")) {
|
||||
if let Some(v) = env.get(&EnvKey::new("PATH")) {
|
||||
// Split the value and test each path to see if the
|
||||
// program exists.
|
||||
for path in split_paths(&v) {
|
||||
|
|
|
@ -65,16 +65,18 @@ impl CommandEnv {
|
|||
|
||||
// The following functions build up changes
|
||||
pub fn set(&mut self, key: &OsStr, value: &OsStr) {
|
||||
let key = EnvKey::from(key);
|
||||
self.maybe_saw_path(&key);
|
||||
self.vars.insert(key.to_owned().into(), Some(value.to_owned()));
|
||||
self.vars.insert(key, Some(value.to_owned()));
|
||||
}
|
||||
|
||||
pub fn remove(&mut self, key: &OsStr) {
|
||||
let key = EnvKey::from(key);
|
||||
self.maybe_saw_path(&key);
|
||||
if self.clear {
|
||||
self.vars.remove(key);
|
||||
self.vars.remove(&key);
|
||||
} else {
|
||||
self.vars.insert(key.to_owned().into(), None);
|
||||
self.vars.insert(key, None);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,7 +89,7 @@ impl CommandEnv {
|
|||
self.saw_path || self.clear
|
||||
}
|
||||
|
||||
fn maybe_saw_path(&mut self, key: &OsStr) {
|
||||
fn maybe_saw_path(&mut self, key: &EnvKey) {
|
||||
if !self.saw_path && key == "PATH" {
|
||||
self.saw_path = true;
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
|
||||
--> $DIR/defaults-cyclic-fail-1.rs:26:5
|
||||
--> $DIR/defaults-cyclic-fail-1.rs:26:14
|
||||
|
|
||||
LL | type A = Box<Self::B>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
|
||||
--> $DIR/defaults-cyclic-fail-1.rs:32:5
|
||||
--> $DIR/defaults-cyclic-fail-1.rs:32:14
|
||||
|
|
||||
LL | type B = &'static Self::A;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
|
||||
--> $DIR/defaults-cyclic-fail-2.rs:27:5
|
||||
--> $DIR/defaults-cyclic-fail-2.rs:27:14
|
||||
|
|
||||
LL | type A = Box<Self::B>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
|
||||
--> $DIR/defaults-cyclic-fail-2.rs:33:5
|
||||
--> $DIR/defaults-cyclic-fail-2.rs:33:14
|
||||
|
|
||||
LL | type B = &'static Self::A;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ LL | foo::<BAR + BAR>();
|
|||
|
|
||||
= note: `#[warn(bare_trait_objects)]` on by default
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error[E0747]: type provided when a constant was expected
|
||||
--> $DIR/const-expression-suggest-missing-braces.rs:11:11
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #[deny(bare_trait_objects)]
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/dyn-2018-edition-lint.rs:4:35
|
||||
|
@ -19,7 +19,7 @@ LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
|
|||
| ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/dyn-2018-edition-lint.rs:9:14
|
||||
|
@ -28,7 +28,7 @@ LL | let _x: &SomeTrait = todo!();
|
|||
| ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
|||
|
|
||||
= note: `#[warn(bare_trait_objects)]` on by default
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:7:27
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
|
||||
--> $DIR/projection-bound-cycle-generic.rs:44:5
|
||||
--> $DIR/projection-bound-cycle-generic.rs:44:18
|
||||
|
|
||||
LL | struct OnlySized<T> where T: Sized { f: T }
|
||||
| - required by this bound in `OnlySized`
|
||||
...
|
||||
LL | type Assoc = OnlySized<<T as Foo>::Item>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
|
||||
--> $DIR/projection-bound-cycle.rs:46:5
|
||||
--> $DIR/projection-bound-cycle.rs:46:18
|
||||
|
|
||||
LL | struct OnlySized<T> where T: Sized { f: T }
|
||||
| - required by this bound in `OnlySized`
|
||||
...
|
||||
LL | type Assoc = OnlySized<<T as Foo>::Item>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A == _`
|
||||
--> $DIR/issue-21946.rs:8:5
|
||||
--> $DIR/issue-21946.rs:8:14
|
||||
|
|
||||
LL | type A = <FooStruct as Foo>::A;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0275]: overflow evaluating the requirement `<GetNext<T> as Next>::Next == _`
|
||||
--> $DIR/issue-23122-1.rs:10:5
|
||||
--> $DIR/issue-23122-1.rs:10:17
|
||||
|
|
||||
LL | type Next = <GetNext<T> as Next>::Next;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized`
|
||||
--> $DIR/issue-23122-2.rs:9:5
|
||||
--> $DIR/issue-23122-2.rs:9:17
|
||||
|
|
||||
LL | type Next = <GetNext<T::Next> as Next>::Next;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_23122_2`)
|
||||
note: required because of the requirements on the impl of `Next` for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>`
|
||||
|
|
|
@ -22,7 +22,7 @@ LL | eq::<dyn, Foo>
|
|||
|
|
||||
= note: `#[warn(bare_trait_objects)]` on by default
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error[E0107]: missing generics for trait `Foo`
|
||||
--> $DIR/issue-86756.rs:5:15
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | let _: Iter<'_, i32> = array.into_iter();
|
|||
|
|
||||
= note: `#[warn(array_into_iter)]` on by default
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | let _: Iter<'_, i32> = array.iter();
|
||||
|
@ -23,7 +23,7 @@ LL | let _: Iter<'_, i32> = Box::new(array).into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | let _: Iter<'_, i32> = Box::new(array).iter();
|
||||
|
@ -40,7 +40,7 @@ LL | for _ in [1, 2, 3].into_iter() {}
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | for _ in [1, 2, 3].iter() {}
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | small.into_iter();
|
|||
|
|
||||
= note: `#[warn(array_into_iter)]` on by default
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | small.iter();
|
||||
|
@ -23,7 +23,7 @@ LL | [1, 2].into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | [1, 2].iter();
|
||||
|
@ -40,7 +40,7 @@ LL | big.into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | big.iter();
|
||||
|
@ -57,7 +57,7 @@ LL | [0u8; 33].into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | [0u8; 33].iter();
|
||||
|
@ -74,7 +74,7 @@ LL | Box::new(small).into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | Box::new(small).iter();
|
||||
|
@ -91,7 +91,7 @@ LL | Box::new([1, 2]).into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | Box::new([1, 2]).iter();
|
||||
|
@ -108,7 +108,7 @@ LL | Box::new(big).into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | Box::new(big).iter();
|
||||
|
@ -125,7 +125,7 @@ LL | Box::new([0u8; 33]).into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | Box::new([0u8; 33]).iter();
|
||||
|
@ -142,7 +142,7 @@ LL | Box::new(Box::new(small)).into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | Box::new(Box::new(small)).iter();
|
||||
|
@ -159,7 +159,7 @@ LL | Box::new(Box::new([1, 2])).into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | Box::new(Box::new([1, 2])).iter();
|
||||
|
@ -176,7 +176,7 @@ LL | Box::new(Box::new(big)).into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | Box::new(Box::new(big)).iter();
|
||||
|
@ -193,7 +193,7 @@ LL | Box::new(Box::new([0u8; 33])).into_iter();
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= warning: this changes meaning in Rust 2021
|
||||
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
|
||||
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
||||
|
|
||||
LL | Box::new(Box::new([0u8; 33])).iter();
|
||||
|
|
|
@ -12,7 +12,7 @@ LL | Dyn::func();
|
|||
|
|
||||
= note: `#[warn(bare_trait_objects)]` on by default
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/bare-trait-objects-path.rs:17:5
|
||||
|
@ -21,7 +21,7 @@ LL | ::Dyn::func();
|
|||
| ^^^^^ help: use `dyn`: `<dyn (::Dyn)>`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/bare-trait-objects-path.rs:20:5
|
||||
|
@ -30,7 +30,7 @@ LL | Dyn::CONST;
|
|||
| ^^^ help: use `dyn`: `<dyn Dyn>`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: aborting due to previous error; 3 warnings emitted
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
|
|||
|
|
||||
= note: requested on the command line with `--force-warn bare-trait-objects`
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
|
|||
|
|
||||
= note: requested on the command line with `--force-warn bare-trait-objects`
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | 0...100 => true,
|
|||
|
|
||||
= note: `--force-warn ellipsis-inclusive-range-patterns` implied by `--force-warn rust-2021-compatibility`
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
|
|||
|
|
||||
= note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms`
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
|
|||
|
|
||||
= note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms`
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #![warn(ellipsis_inclusive_range_patterns)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: `...` range patterns are deprecated
|
||||
--> $DIR/inclusive-range-pattern-syntax.rs:16:9
|
||||
|
@ -19,7 +19,7 @@ LL | &1...2 => {}
|
|||
| ^^^^^^ help: use `..=` for an inclusive range: `&(1..=2)`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: 2 warnings emitted
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #![deny(rust_2021_incompatible_or_patterns)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #84869 <https://github.com/rust-lang/rust/issues/84869>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>
|
||||
|
||||
error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
|
||||
--> $DIR/macro-or-patterns-back-compat.rs:13:23
|
||||
|
@ -19,7 +19,7 @@ LL | macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} }
|
|||
| ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #84869 <https://github.com/rust-lang/rust/issues/84869>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>
|
||||
|
||||
error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
|
||||
--> $DIR/macro-or-patterns-back-compat.rs:19:21
|
||||
|
@ -28,7 +28,7 @@ LL | macro_rules! ogg { ($x:pat | $y:pat_param) => {} }
|
|||
| ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #84869 <https://github.com/rust-lang/rust/issues/84869>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>
|
||||
|
||||
error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
|
||||
--> $DIR/macro-or-patterns-back-compat.rs:23:26
|
||||
|
@ -37,7 +37,7 @@ LL | ( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => {
|
|||
| ^^^^^^^^ help: use pat_param to preserve semantics: `$pat:pat_param`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #84869 <https://github.com/rust-lang/rust/issues/84869>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ LL | type X<'a> = (?'a) +;
|
|||
|
|
||||
= note: `#[warn(bare_trait_objects)]` on by default
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error[E0224]: at least one trait is required for an object type
|
||||
--> $DIR/issue-68890-2.rs:3:14
|
||||
|
|
|
@ -35,7 +35,7 @@ LL | fn y<'a>(y: &mut 'a + Send) {
|
|||
|
|
||||
= note: `#[warn(bare_trait_objects)]` on by default
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/issue-73568-lifetime-after-mut.rs:19:23
|
||||
|
@ -44,7 +44,7 @@ LL | let z = y as &mut 'a + Send;
|
|||
| ^^ help: use `dyn`: `dyn 'a`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error[E0224]: at least one trait is required for an object type
|
||||
--> $DIR/issue-73568-lifetime-after-mut.rs:14:18
|
||||
|
|
|
@ -12,7 +12,7 @@ LL | m!('static);
|
|||
|
|
||||
= note: `#[warn(bare_trait_objects)]` on by default
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error[E0224]: at least one trait is required for an object type
|
||||
--> $DIR/trait-object-macro-matcher.rs:11:8
|
||||
|
|
|
@ -205,7 +205,7 @@ note: the lint level is defined here
|
|||
LL | #![deny(ellipsis_inclusive_range_patterns)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: `...` range patterns are deprecated
|
||||
--> $DIR/recover-range-pats.rs:45:13
|
||||
|
@ -214,7 +214,7 @@ LL | if let 0...Y = 0 {}
|
|||
| ^^^ help: use `..=` for an inclusive range
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: `...` range patterns are deprecated
|
||||
--> $DIR/recover-range-pats.rs:48:13
|
||||
|
@ -223,7 +223,7 @@ LL | if let X...3 = 0 {}
|
|||
| ^^^ help: use `..=` for an inclusive range
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: `...` range patterns are deprecated
|
||||
--> $DIR/recover-range-pats.rs:51:13
|
||||
|
@ -232,7 +232,7 @@ LL | if let X...Y = 0 {}
|
|||
| ^^^ help: use `..=` for an inclusive range
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: `...` range patterns are deprecated
|
||||
--> $DIR/recover-range-pats.rs:54:16
|
||||
|
@ -241,7 +241,7 @@ LL | if let true...Y = 0 {}
|
|||
| ^^^ help: use `..=` for an inclusive range
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: `...` range patterns are deprecated
|
||||
--> $DIR/recover-range-pats.rs:57:13
|
||||
|
@ -250,7 +250,7 @@ LL | if let X...true = 0 {}
|
|||
| ^^^ help: use `..=` for an inclusive range
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: `...` range patterns are deprecated
|
||||
--> $DIR/recover-range-pats.rs:60:14
|
||||
|
@ -259,7 +259,7 @@ LL | if let .0...Y = 0 {}
|
|||
| ^^^ help: use `..=` for an inclusive range
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: `...` range patterns are deprecated
|
||||
--> $DIR/recover-range-pats.rs:64:13
|
||||
|
@ -268,7 +268,7 @@ LL | if let X... .0 = 0 {}
|
|||
| ^^^ help: use `..=` for an inclusive range
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: `...` range patterns are deprecated
|
||||
--> $DIR/recover-range-pats.rs:138:20
|
||||
|
@ -280,7 +280,7 @@ LL | mac2!(0, 1);
|
|||
| ------------ in this macro invocation
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
= note: this error originates in the macro `mac2` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0029]: only `char` and numeric types are allowed in range patterns
|
||||
|
|
|
@ -24,7 +24,7 @@ LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
|
|||
|
|
||||
= note: `#[warn(bare_trait_objects)]` on by default
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/trait-object-trait-parens.rs:13:16
|
||||
|
@ -33,7 +33,7 @@ LL | let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ?Sized + (for<'a> Trait<'a>) + (Obj)`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/trait-object-trait-parens.rs:18:16
|
||||
|
@ -42,7 +42,7 @@ LL | let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn for<'a> Trait<'a> + (Obj) + (?Sized)`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error[E0225]: only auto traits can be used as additional traits in a trait object
|
||||
--> $DIR/trait-object-trait-parens.rs:8:35
|
||||
|
|
|
@ -16,7 +16,7 @@ note: the lint level is defined here
|
|||
LL | #![warn(ellipsis_inclusive_range_patterns)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ note: the lint level is defined here
|
|||
LL | #![warn(ellipsis_inclusive_range_patterns)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0491]: in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references
|
||||
--> $DIR/regions-outlives-nominal-type-region-rev.rs:17:9
|
||||
--> $DIR/regions-outlives-nominal-type-region-rev.rs:17:20
|
||||
|
|
||||
LL | type Out = &'a Foo<'b>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
|
||||
--> $DIR/regions-outlives-nominal-type-region-rev.rs:16:10
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0491]: in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references
|
||||
--> $DIR/regions-outlives-nominal-type-region.rs:17:9
|
||||
--> $DIR/regions-outlives-nominal-type-region.rs:17:20
|
||||
|
|
||||
LL | type Out = &'a Foo<'b>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
|
||||
--> $DIR/regions-outlives-nominal-type-region.rs:16:10
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0491]: in type `&'a Foo<&'b i32>`, reference has a longer lifetime than the data it references
|
||||
--> $DIR/regions-outlives-nominal-type-type-rev.rs:17:9
|
||||
--> $DIR/regions-outlives-nominal-type-type-rev.rs:17:20
|
||||
|
|
||||
LL | type Out = &'a Foo<&'b i32>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
|
||||
--> $DIR/regions-outlives-nominal-type-type-rev.rs:16:10
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0491]: in type `&'a Foo<&'b i32>`, reference has a longer lifetime than the data it references
|
||||
--> $DIR/regions-outlives-nominal-type-type.rs:17:9
|
||||
--> $DIR/regions-outlives-nominal-type-type.rs:17:20
|
||||
|
|
||||
LL | type Out = &'a Foo<&'b i32>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
|
||||
--> $DIR/regions-outlives-nominal-type-type.rs:16:10
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
error[E0309]: the parameter type `T` may not live long enough
|
||||
--> $DIR/regions-struct-not-wf.rs:13:5
|
||||
--> $DIR/regions-struct-not-wf.rs:13:16
|
||||
|
|
||||
LL | impl<'a, T> Trait<'a, T> for usize {
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'a`
|
||||
LL | type Out = &'a T;
|
||||
| ^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
|
||||
| ^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
|
||||
|
||||
error[E0309]: the parameter type `T` may not live long enough
|
||||
--> $DIR/regions-struct-not-wf.rs:21:5
|
||||
--> $DIR/regions-struct-not-wf.rs:21:16
|
||||
|
|
||||
LL | impl<'a, T> Trait<'a, T> for u32 {
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'a`
|
||||
LL | type Out = RefOk<'a, T>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
|
||||
| ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
|
||||
|
|
||||
note: ...that is required by this bound
|
||||
--> $DIR/regions-struct-not-wf.rs:16:20
|
||||
|
@ -21,10 +21,10 @@ LL | struct RefOk<'a, T:'a> {
|
|||
| ^^
|
||||
|
||||
error[E0491]: in type `&'a &'b T`, reference has a longer lifetime than the data it references
|
||||
--> $DIR/regions-struct-not-wf.rs:25:5
|
||||
--> $DIR/regions-struct-not-wf.rs:25:16
|
||||
|
|
||||
LL | type Out = &'a &'b T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
note: the pointer is valid for the lifetime `'a` as defined on the impl at 24:6
|
||||
--> $DIR/regions-struct-not-wf.rs:24:6
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #![warn(rust_2021_prelude_collisions)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait-associated function `from_iter` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision-generic.rs:31:5
|
||||
|
@ -19,7 +19,7 @@ LL | Generic::<i32, i32>::from_iter(1);
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<Generic::<i32, i32> as MyFromIter>::from_iter`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait-associated function `from_iter` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision-generic.rs:34:5
|
||||
|
@ -28,7 +28,7 @@ LL | Generic::<_, _>::from_iter(1);
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<Generic::<_, _> as MyFromIter>::from_iter`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: 3 warnings emitted
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #![warn(rust_2021_prelude_collisions)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait method `try_into` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision-imported.rs:40:22
|
||||
|
@ -19,7 +19,7 @@ LL | let _: u32 = 3u8.try_into().unwrap();
|
|||
| ^^^^^^^^^^^^^^ help: disambiguate the associated function: `crate::m::TryIntoU32::try_into(3u8)`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait method `try_into` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision-imported.rs:53:22
|
||||
|
@ -28,7 +28,7 @@ LL | let _: u32 = 3u8.try_into().unwrap();
|
|||
| ^^^^^^^^^^^^^^ help: disambiguate the associated function: `super::m::TryIntoU32::try_into(3u8)`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: 3 warnings emitted
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #![warn(rust_2021_prelude_collisions)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait-associated function `try_from` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision.rs:61:13
|
||||
|
@ -19,7 +19,7 @@ LL | let _ = u32::try_from(3u8).unwrap();
|
|||
| ^^^^^^^^^^^^^ help: disambiguate the associated function: `<u32 as TryFromU8>::try_from`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait-associated function `from_iter` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision.rs:66:13
|
||||
|
@ -28,7 +28,7 @@ LL | let _ = <Vec<u8>>::from_iter(vec![1u8, 2, 3, 4, 5, 6].into_iter());
|
|||
| ^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<Vec<u8> as FromByteIterator>::from_iter`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait-associated function `try_from` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision.rs:74:18
|
||||
|
@ -37,7 +37,7 @@ LL | let _: u32 = <_>::try_from(3u8).unwrap();
|
|||
| ^^^^^^^^^^^^^ help: disambiguate the associated function: `<_ as TryFromU8>::try_from`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait method `try_into` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision.rs:79:18
|
||||
|
@ -46,7 +46,7 @@ LL | let _: u32 = (&3u8).try_into().unwrap();
|
|||
| ^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(*(&3u8))`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait method `try_into` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision.rs:84:18
|
||||
|
@ -55,7 +55,7 @@ LL | let _: u32 = 3.0.try_into().unwrap();
|
|||
| ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(&3.0)`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait method `try_into` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision.rs:90:18
|
||||
|
@ -64,7 +64,7 @@ LL | let _: u32 = mut_ptr.try_into().unwrap();
|
|||
| ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(mut_ptr as *const _)`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: trait-associated function `try_from` will become ambiguous in Rust 2021
|
||||
--> $DIR/future-prelude-collision.rs:95:13
|
||||
|
@ -73,7 +73,7 @@ LL | let _ = U32Alias::try_from(3u8).unwrap();
|
|||
| ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<U32Alias as TryFromU8>::try_from`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: 8 warnings emitted
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #![warn(rust_2021_prelude_collisions)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #![warn(rust_2021_prelude_collisions)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #![warn(rust_2021_prefixes_incompatible_syntax)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
|
||||
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|
||||
|
|
||||
LL - m2!(z"hey");
|
||||
|
@ -24,7 +24,7 @@ LL | m2!(prefix"hey");
|
|||
| ^^^^^^ unknown prefix
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
|
||||
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|
||||
|
|
||||
LL - m2!(prefix"hey");
|
||||
|
@ -38,7 +38,7 @@ LL | m3!(hey#123);
|
|||
| ^^^ unknown prefix
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
|
||||
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|
||||
|
|
||||
LL - m3!(hey#123);
|
||||
|
@ -52,7 +52,7 @@ LL | m3!(hey#hey);
|
|||
| ^^^ unknown prefix
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
|
||||
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|
||||
|
|
||||
LL - m3!(hey#hey);
|
||||
|
@ -66,7 +66,7 @@ LL | #name = #kind#value
|
|||
| ^^^^ unknown prefix
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
|
||||
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|
||||
|
|
||||
LL - #name = #kind#value
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error: unconstrained generic constant
|
||||
--> $DIR/issue-51892.rs:15:5
|
||||
--> $DIR/issue-51892.rs:15:17
|
||||
|
|
||||
LL | type Type = [u8; std::mem::size_of::<<T as Trait>::Type>()];
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<<T as Trait>::Type>()]:`
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ note: the lint level is defined here
|
|||
LL | #![deny(bare_trait_objects)]
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/issue-61963.rs:18:1
|
||||
|
@ -19,7 +19,7 @@ LL | pub struct Foo {
|
|||
| ^^^ help: use `dyn`: `dyn pub`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | fn foo(_x: Foo + Send) {
|
|||
|
|
||||
= note: `#[warn(bare_trait_objects)]` on by default
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
|
||||
--> $DIR/not-on-bare-trait.rs:7:8
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0277]: `&T` is not an iterator
|
||||
--> $DIR/hir-wf-check-erase-regions.rs:7:5
|
||||
--> $DIR/hir-wf-check-erase-regions.rs:7:21
|
||||
|
|
||||
LL | type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&T` is not an iterator
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&T` is not an iterator
|
||||
|
|
||||
::: $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
|
||||
|
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
error[E0309]: the parameter type `T` may not live long enough
|
||||
--> $DIR/wf-impl-associated-type-region.rs:10:5
|
||||
--> $DIR/wf-impl-associated-type-region.rs:10:16
|
||||
|
|
||||
LL | impl<'a, T> Foo<'a> for T {
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'a`
|
||||
LL | type Bar = &'a T;
|
||||
| ^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
|
||||
| ^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
error[E0309]: the parameter type `T` may not live long enough
|
||||
--> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9:5
|
||||
--> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9:16
|
||||
|
|
||||
LL | impl<'a, T> Trait<'a, T> for usize {
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'a`
|
||||
LL | type Out = &'a fn(T);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a fn(T)` does not outlive the data it points at
|
||||
| ^^^^^^^^^ ...so that the reference type `&'a fn(T)` does not outlive the data it points at
|
||||
|
||||
error[E0309]: the parameter type `T` may not live long enough
|
||||
--> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:5
|
||||
--> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:16
|
||||
|
|
||||
LL | impl<'a, T> Trait<'a, T> for u32 {
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'a`
|
||||
LL | type Out = &'a dyn Baz<T>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at
|
||||
| ^^^^^^^^^^^^^^ ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0309]: the associated type `<Self as SomeTrait<'a>>::Type1` may not live long enough
|
||||
--> $DIR/wf-trait-associated-type-region.rs:9:5
|
||||
--> $DIR/wf-trait-associated-type-region.rs:9:18
|
||||
|
|
||||
LL | type Type2 = &'a Self::Type1;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: consider adding an explicit lifetime bound `<Self as SomeTrait<'a>>::Type1: 'a`...
|
||||
= note: ...so that the reference type `&'a <Self as SomeTrait<'a>>::Type1` does not outlive the data it points at
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | for<'a> Dst<A + 'a>: Sized,
|
|||
|
|
||||
= note: `-D bare-trait-objects` implied by `-D warnings`
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/ice-3969.rs:27:16
|
||||
|
@ -15,7 +15,7 @@ LL | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
|
|||
| ^ help: use `dyn`: `dyn A`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/ice-3969.rs:27:57
|
||||
|
@ -24,7 +24,7 @@ LL | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
|
|||
| ^ help: use `dyn`: `dyn A`
|
||||
|
|
||||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -20,15 +20,17 @@ function getNextStep(content, pos, stop) {
|
|||
// will blow up. Template strings are not tested and might also be
|
||||
// broken.
|
||||
function extractFunction(content, functionName) {
|
||||
var indent = 0;
|
||||
var level = 0;
|
||||
var splitter = "function " + functionName + "(";
|
||||
var stop;
|
||||
var pos, start;
|
||||
|
||||
while (true) {
|
||||
var start = content.indexOf(splitter);
|
||||
start = content.indexOf(splitter);
|
||||
if (start === -1) {
|
||||
break;
|
||||
}
|
||||
var pos = start;
|
||||
pos = start;
|
||||
while (pos < content.length && content[pos] !== ')') {
|
||||
pos += 1;
|
||||
}
|
||||
|
@ -44,30 +46,33 @@ function extractFunction(content, functionName) {
|
|||
}
|
||||
while (pos < content.length) {
|
||||
// Eat single-line comments
|
||||
if (content[pos] === '/' && pos > 0 && content[pos-1] === '/') {
|
||||
if (content[pos] === '/' && pos > 0 && content[pos - 1] === '/') {
|
||||
do {
|
||||
pos += 1;
|
||||
} while (pos < content.length && content[pos] !== '\n');
|
||||
|
||||
// Eat multiline comment.
|
||||
} else if (content[pos] === '*' && pos > 0 && content[pos - 1] === '/') {
|
||||
do {
|
||||
pos += 1;
|
||||
} while (pos < content.length && content[pos] !== '/' && content[pos - 1] !== '*');
|
||||
|
||||
// Eat quoted strings
|
||||
} else if (content[pos] === '"' || content[pos] === "'" || content[pos] === "`") {
|
||||
var stop = content[pos];
|
||||
var is_escaped = false;
|
||||
stop = content[pos];
|
||||
do {
|
||||
if (content[pos] === '\\') {
|
||||
pos += 2;
|
||||
} else {
|
||||
pos += 1;
|
||||
}
|
||||
} while (pos < content.length &&
|
||||
(content[pos] !== stop || content[pos - 1] === '\\'));
|
||||
pos += 1;
|
||||
} while (pos < content.length && content[pos] !== stop);
|
||||
|
||||
// Otherwise, check for indent
|
||||
// Otherwise, check for block level.
|
||||
} else if (content[pos] === '{') {
|
||||
indent += 1;
|
||||
level += 1;
|
||||
} else if (content[pos] === '}') {
|
||||
indent -= 1;
|
||||
if (indent === 0) {
|
||||
level -= 1;
|
||||
if (level === 0) {
|
||||
return content.slice(start, pos + 1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue