When more than a single impl and less than 4 could apply, point at them

```
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
  --> $DIR/issue-67185-2.rs:21:6
   |
LL | impl Foo for FooImpl {}
   |      ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
   |
help: the following other types implement trait `Bar`
  --> $DIR/issue-67185-2.rs:9:1
   |
LL | impl Bar for [u16; 4] {}
   | ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
note: required by a bound in `Foo`
  --> $DIR/issue-67185-2.rs:14:30
   |
LL | trait Foo
   |       --- required by a bound in this trait
LL | where
LL |     [<u8 as Baz>::Quaks; 2]: Bar,
   |                              ^^^ required by this bound in `Foo`
```
This commit is contained in:
Esteban Küber 2025-08-20 17:50:46 +00:00
parent 1d860902f6
commit eeadffd926
133 changed files with 1567 additions and 551 deletions

View file

@ -1906,13 +1906,13 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
// ignore `do_not_recommend` items
.filter(|def_id| !self.tcx.do_not_recommend_impl(*def_id))
// Ignore automatically derived impls and `!Trait` impls.
.map(|def_id| self.tcx.impl_trait_header(def_id))
.filter_map(|header| {
.map(|def_id| (self.tcx.impl_trait_header(def_id), def_id))
.filter_map(|(header, def_id)| {
(header.polarity != ty::ImplPolarity::Negative
|| self.tcx.is_automatically_derived(def_id))
.then(|| header.trait_ref.instantiate_identity())
.then(|| (header.trait_ref.instantiate_identity(), def_id))
})
.filter(|trait_ref| {
.filter(|(trait_ref, _)| {
let self_ty = trait_ref.self_ty();
// Avoid mentioning type parameters.
if let ty::Param(_) = self_ty.kind() {
@ -1944,7 +1944,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
})
.collect();
impl_candidates.sort_by_key(|tr| tr.to_string());
impl_candidates.sort_by_key(|(tr, _)| tr.to_string());
impl_candidates.dedup();
impl_candidates
};
@ -1972,7 +1972,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
let candidates = if impl_candidates.is_empty() {
alternative_candidates(trait_def_id)
} else {
impl_candidates.into_iter().map(|cand| cand.trait_ref).collect()
impl_candidates.into_iter().map(|cand| (cand.trait_ref, cand.impl_def_id)).collect()
};
let mut span: MultiSpan = self.tcx.def_span(trait_def_id).into();
span.push_span_label(self.tcx.def_span(trait_def_id), "this is the required trait");
@ -2004,7 +2004,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
self.tcx.def_span(found_type),
"this type doesn't implement the required trait",
);
for trait_ref in candidates {
for (trait_ref, _) in candidates {
if let ty::Adt(def, _) = trait_ref.self_ty().peel_refs().kind()
&& let candidate_def_id = def.did()
&& let Some(name) = self.tcx.opt_item_name(candidate_def_id)
@ -2217,12 +2217,12 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
}
let other = if other { "other " } else { "" };
let report = |mut candidates: Vec<TraitRef<'tcx>>, err: &mut Diag<'_>| {
candidates.retain(|tr| !tr.references_error());
let report = |mut candidates: Vec<(TraitRef<'tcx>, DefId)>, err: &mut Diag<'_>| {
candidates.retain(|(tr, _)| !tr.references_error());
if candidates.is_empty() {
return false;
}
if let &[cand] = &candidates[..] {
if let &[(cand, def_id)] = &candidates[..] {
if self.tcx.is_diagnostic_item(sym::FromResidual, cand.def_id)
&& !self.tcx.features().enabled(sym::try_trait_v2)
{
@ -2238,56 +2238,87 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
};
let trait_ = self.tcx.short_string(cand.print_trait_sugared(), err.long_ty_path());
let self_ty = self.tcx.short_string(cand.self_ty(), err.long_ty_path());
err.highlighted_help(vec![
StringPart::normal(format!("the trait `{trait_}` ",)),
StringPart::highlighted("is"),
StringPart::normal(desc),
StringPart::highlighted(self_ty),
StringPart::normal("`"),
StringPart::normal(mention_castable),
]);
err.highlighted_span_help(
self.tcx.def_span(def_id),
vec![
StringPart::normal(format!("the trait `{trait_}` ",)),
StringPart::highlighted("is"),
StringPart::normal(desc),
StringPart::highlighted(self_ty),
StringPart::normal("`"),
StringPart::normal(mention_castable),
],
);
return true;
}
let trait_ref = TraitRef::identity(self.tcx, candidates[0].def_id);
let trait_ref = TraitRef::identity(self.tcx, candidates[0].0.def_id);
// Check if the trait is the same in all cases. If so, we'll only show the type.
let mut traits: Vec<_> =
candidates.iter().map(|c| c.print_only_trait_path().to_string()).collect();
candidates.iter().map(|(c, _)| c.print_only_trait_path().to_string()).collect();
traits.sort();
traits.dedup();
// FIXME: this could use a better heuristic, like just checking
// that args[1..] is the same.
let all_traits_equal = traits.len() == 1;
let candidates: Vec<String> = candidates
.into_iter()
.map(|c| {
if all_traits_equal {
format!("\n {}", self.tcx.short_string(c.self_ty(), err.long_ty_path()))
} else {
format!(
"\n `{}` implements `{}`",
self.tcx.short_string(c.self_ty(), err.long_ty_path()),
self.tcx.short_string(c.print_only_trait_path(), err.long_ty_path()),
)
}
})
.collect();
let end = if candidates.len() <= 9 || self.tcx.sess.opts.verbose {
candidates.len()
} else {
8
};
err.help(format!(
"the following {other}types implement trait `{}`:{}{}",
trait_ref.print_trait_sugared(),
candidates[..end].join(""),
if candidates.len() > 9 && !self.tcx.sess.opts.verbose {
format!("\nand {} others", candidates.len() - 8)
} else {
String::new()
if candidates.len() < 5 {
let spans: Vec<_> =
candidates.iter().map(|(_, def_id)| self.tcx.def_span(def_id)).collect();
let mut span: MultiSpan = spans.into();
for (c, def_id) in &candidates {
let msg = if all_traits_equal {
format!("`{}`", self.tcx.short_string(c.self_ty(), err.long_ty_path()))
} else {
format!(
"`{}` implements `{}`",
self.tcx.short_string(c.self_ty(), err.long_ty_path()),
self.tcx.short_string(c.print_only_trait_path(), err.long_ty_path()),
)
};
span.push_span_label(self.tcx.def_span(def_id), msg);
}
));
err.span_help(
span,
format!(
"the following {other}types implement trait `{}`",
trait_ref.print_trait_sugared(),
),
);
} else {
let candidate_names: Vec<String> = candidates
.iter()
.map(|(c, _)| {
if all_traits_equal {
format!(
"\n {}",
self.tcx.short_string(c.self_ty(), err.long_ty_path())
)
} else {
format!(
"\n `{}` implements `{}`",
self.tcx.short_string(c.self_ty(), err.long_ty_path()),
self.tcx
.short_string(c.print_only_trait_path(), err.long_ty_path()),
)
}
})
.collect();
err.help(format!(
"the following {other}types implement trait `{}`:{}{}",
trait_ref.print_trait_sugared(),
candidate_names[..end].join(""),
if candidates.len() > 9 && !self.tcx.sess.opts.verbose {
format!("\nand {} others", candidates.len() - 8)
} else {
String::new()
}
));
}
true
};
@ -2349,7 +2380,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
(cand.similarity, len, cand.trait_ref.to_string())
});
let mut impl_candidates: Vec<_> =
impl_candidates.into_iter().map(|cand| cand.trait_ref).collect();
impl_candidates.into_iter().map(|cand| (cand.trait_ref, cand.impl_def_id)).collect();
impl_candidates.dedup();
report(impl_candidates, err)

View file

@ -9,9 +9,13 @@ help: the trait `VisitorResult` is not implemented for `NotAValidResultType`
|
LL | struct NotAValidResultType;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: the following other types implement trait `VisitorResult`:
()
ControlFlow<T>
help: the following other types implement trait `VisitorResult`
--> /rustc-dev/xyz/compiler/rustc_ast_ir/src/visit.rs:LL:COL
|
= note: `()`
::: /rustc-dev/xyz/compiler/rustc_ast_ir/src/visit.rs:LL:COL
|
= note: `ControlFlow<T>`
note: required by a bound in `rustc_ast::visit::Visitor::Result`
--> /rustc-dev/xyz/compiler/rustc_ast/src/visit.rs:LL:COL
= note: this error originates in the macro `common_visitor_and_walkers` (in Nightly builds, run with -Z macro-backtrace for more info)

View file

@ -9,9 +9,14 @@ help: the trait `VisitorResult` is not implemented for `NotAValidResultType`
|
LL | struct NotAValidResultType;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: the following other types implement trait `VisitorResult`:
()
ControlFlow<T>
help: the following other types implement trait `VisitorResult`
--> $COMPILER_DIR_REAL/rustc_ast_ir/src/visit.rs:LL:COL
|
LL | impl VisitorResult for () {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ `()`
...
LL | impl<T> VisitorResult for ControlFlow<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ControlFlow<T>`
note: required by a bound in `rustc_ast::visit::Visitor::Result`
--> $COMPILER_DIR_REAL/rustc_ast/src/visit.rs:LL:COL
|

View file

@ -1,3 +1,6 @@
//@ revisions: u w
//@[u] only-unix
//@[w] only-windows
#[global_allocator]
static A: usize = 0;
//~^ ERROR E0277

View file

@ -1,44 +1,48 @@
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:2:11
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
= help: the trait `GlobalAlloc` is implemented for `System`
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/unix.rs:LL:COL
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:2:11
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
= help: the trait `GlobalAlloc` is implemented for `System`
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/unix.rs:LL:COL
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:2:11
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
= help: the trait `GlobalAlloc` is implemented for `System`
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/unix.rs:LL:COL
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:2:11
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
= help: the trait `GlobalAlloc` is implemented for `System`
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/unix.rs:LL:COL
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 4 previous errors

View file

@ -0,0 +1,50 @@
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/windows.rs:LL:COL
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/windows.rs:LL:COL
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/windows.rs:LL:COL
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/windows.rs:LL:COL
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0277`.

View file

@ -25,7 +25,11 @@ LL | f1(2u32, 4u32);
| |
| required by a bound introduced by this call
|
= help: the trait `Foo` is implemented for `i32`
help: the trait `Foo` is implemented for `i32`
--> $DIR/associated-types-path-2.rs:11:1
|
LL | impl Foo for i32 {
| ^^^^^^^^^^^^^^^^
note: required by a bound in `f1`
--> $DIR/associated-types-path-2.rs:15:14
|
@ -38,7 +42,11 @@ error[E0277]: the trait bound `u32: Foo` is not satisfied
LL | f1(2u32, 4u32);
| ^^^^ the trait `Foo` is not implemented for `u32`
|
= help: the trait `Foo` is implemented for `i32`
help: the trait `Foo` is implemented for `i32`
--> $DIR/associated-types-path-2.rs:11:1
|
LL | impl Foo for i32 {
| ^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `u32: Foo` is not satisfied
--> $DIR/associated-types-path-2.rs:37:8
@ -48,7 +56,11 @@ LL | f1(2u32, 4i32);
| |
| required by a bound introduced by this call
|
= help: the trait `Foo` is implemented for `i32`
help: the trait `Foo` is implemented for `i32`
--> $DIR/associated-types-path-2.rs:11:1
|
LL | impl Foo for i32 {
| ^^^^^^^^^^^^^^^^
note: required by a bound in `f1`
--> $DIR/associated-types-path-2.rs:15:14
|
@ -61,7 +73,11 @@ error[E0277]: the trait bound `u32: Foo` is not satisfied
LL | f1(2u32, 4i32);
| ^^^^ the trait `Foo` is not implemented for `u32`
|
= help: the trait `Foo` is implemented for `i32`
help: the trait `Foo` is implemented for `i32`
--> $DIR/associated-types-path-2.rs:11:1
|
LL | impl Foo for i32 {
| ^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/associated-types-path-2.rs:43:18

View file

@ -4,7 +4,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-1.rs:3:33
|
@ -20,7 +21,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | 1i32.f("abc");
| ^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X::f`
--> $DIR/hr-associated-type-bound-1.rs:3:33
|

View file

@ -4,7 +4,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | type V = str;
| ^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `Y`
--> $DIR/hr-associated-type-bound-param-1.rs:4:36
|
@ -20,7 +21,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | 1u8.g("abc");
| ^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `Y::g`
--> $DIR/hr-associated-type-bound-param-1.rs:4:36
|

View file

@ -4,7 +4,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | T: Z<'a, u16>,
| ^^^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
@ -20,7 +21,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | type W = str;
| ^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
@ -36,7 +38,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | T: Z<'a, u16>,
| ^^^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
@ -53,7 +56,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | <T::W>::clone(x);
| ^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `Z::W`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
@ -69,7 +73,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | <T::W>::clone(x);
| ^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
@ -85,7 +90,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | <T::W>::clone(x);
| ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
@ -101,7 +107,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | 1u16.h("abc");
| ^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `Z::h`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|

View file

@ -4,7 +4,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-3.rs:4:33
|
@ -20,7 +21,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | <(i32,) as X<(i32,)>>::f("abc");
| ^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X::f`
--> $DIR/hr-associated-type-bound-param-3.rs:4:33
|

View file

@ -4,7 +4,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-4.rs:4:36
|
@ -20,7 +21,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | <(i32,) as X<i32>>::f("abc");
| ^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X::f`
--> $DIR/hr-associated-type-bound-param-4.rs:4:36
|

View file

@ -4,7 +4,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-5.rs:17:45
|
@ -20,7 +21,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-5.rs:17:45
|
@ -36,7 +38,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | <i32 as X<Box<i32>>>::f("abc");
| ^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X::f`
--> $DIR/hr-associated-type-bound-param-5.rs:15:33
|

View file

@ -15,7 +15,11 @@ error[E0277]: the trait bound `for<'b> i32: X<'b, i32>` is not satisfied
LL | <(i32,) as X<i32>>::f("abc");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'b> X<'b, i32>` is not implemented for `i32`
|
= help: the trait `X<'_, T>` is implemented for `(S,)`
help: the trait `X<'_, T>` is implemented for `(S,)`
--> $DIR/hr-associated-type-bound-param-6.rs:12:1
|
LL | impl<S, T> X<'_, T> for (S,) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `for<'b> i32: X<'b, i32>` is not satisfied
--> $DIR/hr-associated-type-bound-param-6.rs:18:18
@ -23,7 +27,11 @@ error[E0277]: the trait bound `for<'b> i32: X<'b, i32>` is not satisfied
LL | <(i32,) as X<i32>>::f("abc");
| ^^^ the trait `for<'b> X<'b, i32>` is not implemented for `i32`
|
= help: the trait `X<'_, T>` is implemented for `(S,)`
help: the trait `X<'_, T>` is implemented for `(S,)`
--> $DIR/hr-associated-type-bound-param-6.rs:12:1
|
LL | impl<S, T> X<'_, T> for (S,) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `X::f`
--> $DIR/hr-associated-type-bound-param-6.rs:3:16
|
@ -39,7 +47,11 @@ error[E0277]: the trait bound `i32: X<'_, i32>` is not satisfied
LL | <(i32,) as X<i32>>::f("abc");
| ^^^^^ the trait `X<'_, i32>` is not implemented for `i32`
|
= help: the trait `X<'_, T>` is implemented for `(S,)`
help: the trait `X<'_, T>` is implemented for `(S,)`
--> $DIR/hr-associated-type-bound-param-6.rs:12:1
|
LL | impl<S, T> X<'_, T> for (S,) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors

View file

@ -9,7 +9,11 @@ help: the trait `MyDisplay` is not implemented for `T`
|
LL | struct T;
| ^^^^^^^^
= help: the trait `MyDisplay` is implemented for `&'a mut T`
help: the trait `MyDisplay` is implemented for `&'a mut T`
--> $DIR/issue-65774-1.rs:5:1
|
LL | impl<'a, T: MyDisplay> MyDisplay for &'a mut T { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `MPU::MpuConfig`
--> $DIR/issue-65774-1.rs:10:21
|
@ -27,7 +31,11 @@ help: the trait `MyDisplay` is not implemented for `T`
|
LL | struct T;
| ^^^^^^^^
= help: the trait `MyDisplay` is implemented for `&'a mut T`
help: the trait `MyDisplay` is implemented for `&'a mut T`
--> $DIR/issue-65774-1.rs:5:1
|
LL | impl<'a, T: MyDisplay> MyDisplay for &'a mut T { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required for `&mut T` to implement `MyDisplay`
--> $DIR/issue-65774-1.rs:5:24
|

View file

@ -9,7 +9,11 @@ help: the trait `MyDisplay` is not implemented for `T`
|
LL | struct T;
| ^^^^^^^^
= help: the trait `MyDisplay` is implemented for `&'a mut T`
help: the trait `MyDisplay` is implemented for `&'a mut T`
--> $DIR/issue-65774-2.rs:5:1
|
LL | impl<'a, T: MyDisplay> MyDisplay for &'a mut T { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `MPU::MpuConfig`
--> $DIR/issue-65774-2.rs:10:21
|
@ -27,7 +31,11 @@ help: the trait `MyDisplay` is not implemented for `T`
|
LL | struct T;
| ^^^^^^^^
= help: the trait `MyDisplay` is implemented for `&'a mut T`
help: the trait `MyDisplay` is implemented for `&'a mut T`
--> $DIR/issue-65774-2.rs:5:1
|
LL | impl<'a, T: MyDisplay> MyDisplay for &'a mut T { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: required for the cast from `&mut T` to `&dyn MyDisplay`
error: aborting due to 2 previous errors

View file

@ -35,7 +35,11 @@ error[E0277]: the trait bound `(dyn B + 'static): Mirror` is not satisfied
LL | ) -> &'a <dyn B + 'static as Mirror>::Assoc {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Mirror` is not implemented for `(dyn B + 'static)`
|
= help: the trait `Mirror` is implemented for `dyn A`
help: the trait `Mirror` is implemented for `dyn A`
--> $DIR/projection-dyn-associated-type.rs:13:1
|
LL | impl<T: ?Sized> Mirror for A {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `(dyn B + 'static): Mirror` is not satisfied
--> $DIR/projection-dyn-associated-type.rs:22:6
@ -43,7 +47,11 @@ error[E0277]: the trait bound `(dyn B + 'static): Mirror` is not satisfied
LL | ) -> &'a <dyn B + 'static as Mirror>::Assoc {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Mirror` is not implemented for `(dyn B + 'static)`
|
= help: the trait `Mirror` is implemented for `dyn A`
help: the trait `Mirror` is implemented for `dyn A`
--> $DIR/projection-dyn-associated-type.rs:13:1
|
LL | impl<T: ?Sized> Mirror for A {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 4 previous errors; 1 warning emitted

View file

@ -302,11 +302,17 @@ LL | let _ = FOO & (*"Sized".to_string().into_boxed_str());
| ^ no implementation for `i32 & str`
|
= help: the trait `BitAnd<str>` is not implemented for `i32`
= help: the following other types implement trait `BitAnd<Rhs>`:
`&i32` implements `BitAnd<i32>`
`&i32` implements `BitAnd`
`i32` implements `BitAnd<&i32>`
`i32` implements `BitAnd`
help: the following other types implement trait `BitAnd<Rhs>`
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
= note: `&i32` implements `BitAnd<i32>`
|
= note: `&i32` implements `BitAnd`
|
= note: `i32` implements `BitAnd<&i32>`
|
= note: `i32` implements `BitAnd`
= note: this error originates in the macro `bitand_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/binary-op-suggest-deref.rs:78:17

View file

@ -5,11 +5,17 @@ LL | x * y
| ^ no implementation for `i32 * f32`
|
= help: the trait `Mul<f32>` is not implemented for `i32`
= help: the following other types implement trait `Mul<Rhs>`:
`&i32` implements `Mul<i32>`
`&i32` implements `Mul`
`i32` implements `Mul<&i32>`
`i32` implements `Mul`
help: the following other types implement trait `Mul<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&i32` implements `Mul<i32>`
|
= note: `&i32` implements `Mul`
|
= note: `i32` implements `Mul<&i32>`
|
= note: `i32` implements `Mul`
= note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 1 previous error

View file

@ -4,7 +4,11 @@ error[E0277]: the trait bound `{integer}: Scalar` is not satisfied
LL | b + 3
| ^ the trait `Scalar` is not implemented for `{integer}`
|
= help: the trait `Scalar` is implemented for `f64`
help: the trait `Scalar` is implemented for `f64`
--> $DIR/issue-22645.rs:4:1
|
LL | impl Scalar for f64 {}
| ^^^^^^^^^^^^^^^^^^^
note: required for `Bob` to implement `Add<{integer}>`
--> $DIR/issue-22645.rs:8:19
|

View file

@ -82,12 +82,14 @@ LL | check(&mut () as *mut ());
| |
| required by a bound introduced by this call
|
= help: the trait `ConstParamTy_` is implemented for `()`
help: the trait `ConstParamTy_` is implemented for `()`
--> $SRC_DIR/core/src/marker.rs:LL:COL
note: required by a bound in `check`
--> $DIR/const_param_ty_bad.rs:4:18
|
LL | fn check(_: impl std::marker::ConstParamTy_) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
= note: this error originates in the macro `marker_impls` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `*const ()` can't be used as a const parameter type
--> $DIR/const_param_ty_bad.rs:12:11
@ -97,12 +99,14 @@ LL | check(&() as *const ());
| |
| required by a bound introduced by this call
|
= help: the trait `ConstParamTy_` is implemented for `()`
help: the trait `ConstParamTy_` is implemented for `()`
--> $SRC_DIR/core/src/marker.rs:LL:COL
note: required by a bound in `check`
--> $DIR/const_param_ty_bad.rs:4:18
|
LL | fn check(_: impl std::marker::ConstParamTy_) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
= note: this error originates in the macro `marker_impls` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 6 previous errors

View file

@ -53,7 +53,11 @@ LL | nested: &'static Bar<dyn std::fmt::Debug>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
= help: the trait `Debug` is implemented for `Bar<T>`
help: the trait `Debug` is implemented for `Bar<T>`
--> $DIR/unsizing-wfcheck-issue-126272.rs:19:10
|
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
| ^^^^^
note: required for `Bar<(dyn Debug + 'static)>` to implement `Debug`
--> $DIR/unsizing-wfcheck-issue-126272.rs:19:10
|
@ -83,7 +87,11 @@ LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
LL | nested: &'static Bar<dyn std::fmt::Debug>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `dyn Debug`
|
= help: the trait `Eq` is implemented for `Bar<T>`
help: the trait `Eq` is implemented for `Bar<T>`
--> $DIR/unsizing-wfcheck-issue-126272.rs:19:28
|
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
| ^^
note: required for `Bar<dyn Debug>` to implement `Eq`
--> $DIR/unsizing-wfcheck-issue-126272.rs:19:28
|

View file

@ -12,7 +12,11 @@ help: the trait `Trait` is not implemented for `Uwu<10, 12>`
|
LL | struct Uwu<const N: u32 = 1, const M: u32 = N>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: the trait `Trait` is implemented for `Uwu<N>`
help: the trait `Trait` is implemented for `Uwu<N>`
--> $DIR/rp_impl_trait_fail.rs:4:1
|
LL | impl<const N: u32> Trait for Uwu<N> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `u32: Traitor<N>` is not satisfied
--> $DIR/rp_impl_trait_fail.rs:16:26

View file

@ -4,9 +4,13 @@ error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
LL | <u8 as Baz>::Quaks: Bar,
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[u16; 3]`
|
= help: the following other types implement trait `Bar`:
[[u16; 3]; 3]
[u16; 4]
help: the following other types implement trait `Bar`
--> $DIR/issue-67185-2.rs:9:1
|
LL | impl Bar for [u16; 4] {}
| ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
@ -19,9 +23,13 @@ error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
LL | [<u8 as Baz>::Quaks; 2]: Bar,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
|
= help: the following other types implement trait `Bar`:
[[u16; 3]; 3]
[u16; 4]
help: the following other types implement trait `Bar`
--> $DIR/issue-67185-2.rs:9:1
|
LL | impl Bar for [u16; 4] {}
| ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
@ -34,9 +42,13 @@ error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`
|
= help: the following other types implement trait `Bar`:
[[u16; 3]; 3]
[u16; 4]
help: the following other types implement trait `Bar`
--> $DIR/issue-67185-2.rs:9:1
|
LL | impl Bar for [u16; 4] {}
| ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:15:25
|
@ -52,9 +64,13 @@ error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
|
= help: the following other types implement trait `Bar`:
[[u16; 3]; 3]
[u16; 4]
help: the following other types implement trait `Bar`
--> $DIR/issue-67185-2.rs:9:1
|
LL | impl Bar for [u16; 4] {}
| ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:14:30
|
@ -70,9 +86,13 @@ error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
LL | fn f(_: impl Foo) {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
|
= help: the following other types implement trait `Bar`:
[[u16; 3]; 3]
[u16; 4]
help: the following other types implement trait `Bar`
--> $DIR/issue-67185-2.rs:9:1
|
LL | impl Bar for [u16; 4] {}
| ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:14:30
|
@ -88,9 +108,13 @@ error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
LL | fn f(_: impl Foo) {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`
|
= help: the following other types implement trait `Bar`:
[[u16; 3]; 3]
[u16; 4]
help: the following other types implement trait `Bar`
--> $DIR/issue-67185-2.rs:9:1
|
LL | impl Bar for [u16; 4] {}
| ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:15:25
|

View file

@ -7,7 +7,11 @@ LL | let _ = foo([0; 1]);
| required by a bound introduced by this call
|
= note: cannot satisfy `_: Foo`
= help: the trait `Foo` is implemented for `u8`
help: the trait `Foo` is implemented for `u8`
--> $DIR/issue-83249.rs:8:1
|
LL | impl Foo for u8 {
| ^^^^^^^^^^^^^^^
note: required by a bound in `foo`
--> $DIR/issue-83249.rs:12:11
|

View file

@ -4,7 +4,11 @@ error[E0277]: the trait bound `[(); 0]: Foo` is not satisfied
LL | <[(); 0] as Foo>::foo()
| ^^^^^^^ the trait `Foo` is not implemented for `[(); 0]`
|
= help: the trait `Foo` is implemented for `[(); 1]`
help: the trait `Foo` is implemented for `[(); 1]`
--> $DIR/const-eval-array-len-in-impl.rs:9:1
|
LL | impl Foo for [(); 1] {
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error

View file

@ -11,11 +11,17 @@ LL | = [0; (i8::MAX + 1u8) as usize];
| ^ no implementation for `i8 + u8`
|
= help: the trait `Add<u8>` is not implemented for `i8`
= help: the following other types implement trait `Add<Rhs>`:
`&i8` implements `Add<i8>`
`&i8` implements `Add`
`i8` implements `Add<&i8>`
`i8` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&i8` implements `Add<i8>`
|
= note: `&i8` implements `Add`
|
= note: `i8` implements `Add<&i8>`
|
= note: `i8` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors

View file

@ -11,11 +11,17 @@ LL | : [u32; (i8::MAX as i8 + 1u8) as usize]
| ^ no implementation for `i8 + u8`
|
= help: the trait `Add<u8>` is not implemented for `i8`
= help: the following other types implement trait `Add<Rhs>`:
`&i8` implements `Add<i8>`
`&i8` implements `Add`
`i8` implements `Add<&i8>`
`i8` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&i8` implements `Add<i8>`
|
= note: `&i8` implements `Add`
|
= note: `i8` implements `Add<&i8>`
|
= note: `i8` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0604]: only `u8` can be cast as `char`, not `i8`
--> $DIR/const-eval-overflow-4b.rs:24:13

View file

@ -58,7 +58,11 @@ error[E0277]: the trait bound `u8: Trait` is not satisfied
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
| ^^ the trait `Trait` is not implemented for `u8`
|
= help: the trait `Trait` is implemented for `Z`
help: the trait `Trait` is implemented for `Z`
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:1
|
LL | impl Trait for Z {
| ^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:53
@ -75,7 +79,11 @@ error[E0277]: the trait bound `u8: Trait` is not satisfied
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
| ^^ the trait `Trait` is not implemented for `u8`
|
= help: the trait `Trait` is implemented for `Z`
help: the trait `Trait` is implemented for `Z`
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:1
|
LL | impl Trait for Z {
| ^^^^^^^^^^^^^^^^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0308]: mismatched types
@ -94,7 +102,11 @@ error[E0277]: the trait bound `u8: Trait` is not satisfied
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
| ^^ the trait `Trait` is not implemented for `u8`
|
= help: the trait `Trait` is implemented for `Z`
help: the trait `Trait` is implemented for `Z`
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:1
|
LL | impl Trait for Z {
| ^^^^^^^^^^^^^^^^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0308]: mismatched types

View file

@ -96,9 +96,17 @@ help: the trait `Trait` is not implemented for `S2`
|
LL | struct S2;
| ^^^^^^^^^
= help: the following other types implement trait `Trait`:
F
S
help: the following other types implement trait `Trait`
--> $DIR/explicit-paths.rs:10:1
|
LL | impl Trait for F {}
| ^^^^^^^^^^^^^^^^ `F`
...
LL | impl Trait for S {
| ^^^^^^^^^^^^^^^^ `S`
...
LL | impl Trait for S {
| ^^^^^^^^^^^^^^^^ `S`
error[E0308]: mismatched types
--> $DIR/explicit-paths.rs:76:30

View file

@ -6,7 +6,11 @@ LL | check(());
| |
| required by a bound introduced by this call
|
= help: the trait `Foo` is implemented for `i32`
help: the trait `Foo` is implemented for `i32`
--> $DIR/supress_suggestions_in_help.rs:17:1
|
LL | impl Foo for i32 {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/supress_suggestions_in_help.rs:19:18
|

View file

@ -6,7 +6,11 @@ LL | check(());
| |
| required by a bound introduced by this call
|
= help: the trait `Foo` is implemented for `i32`
help: the trait `Foo` is implemented for `i32`
--> $DIR/supress_suggestions_in_help.rs:17:1
|
LL | impl Foo for i32 {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/supress_suggestions_in_help.rs:19:18
|

View file

@ -193,7 +193,11 @@ LL | takes_bar(());
| |
| required by a bound introduced by this call
|
= help: the trait `Bar` is implemented for `i32`
help: the trait `Bar` is implemented for `i32`
--> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:28:1
|
LL | impl Bar for i32 {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `takes_bar`
--> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:61:22
|

View file

@ -11,9 +11,14 @@ help: the trait `Foo<usize>` is not implemented for `Bar`
|
LL | struct Bar;
| ^^^^^^^^^^
= help: the following other types implement trait `Foo<A>`:
`Bar` implements `Foo<i32>`
`Bar` implements `Foo<u8>`
help: the following other types implement trait `Foo<A>`
--> $DIR/issue-21659-show-relevant-trait-impls-1.rs:15:1
|
LL | impl Foo<i32> for Bar {}
| ^^^^^^^^^^^^^^^^^^^^^ `Bar` implements `Foo<i32>`
LL |
LL | impl Foo<u8> for Bar {}
| ^^^^^^^^^^^^^^^^^^^^ `Bar` implements `Foo<u8>`
error: aborting due to 1 previous error

View file

@ -21,11 +21,17 @@ LL | Foo::<i32>::bar(&1u8);
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `Foo<B>`:
`u8` implements `Foo<bool>`
`u8` implements `Foo<u16>`
`u8` implements `Foo<u32>`
`u8` implements `Foo<u64>`
help: the following other types implement trait `Foo<B>`
--> $DIR/issue-39802-show-5-trait-impls.rs:11:1
|
LL | impl Foo<u16> for u8 {}
| ^^^^^^^^^^^^^^^^^^^^ `u8` implements `Foo<u16>`
LL | impl Foo<u32> for u8 {}
| ^^^^^^^^^^^^^^^^^^^^ `u8` implements `Foo<u32>`
LL | impl Foo<u64> for u8 {}
| ^^^^^^^^^^^^^^^^^^^^ `u8` implements `Foo<u64>`
LL | impl Foo<bool> for u8 {}
| ^^^^^^^^^^^^^^^^^^^^^ `u8` implements `Foo<bool>`
error[E0277]: the trait bound `bool: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:26:21

View file

@ -4,7 +4,11 @@ error[E0277]: the trait bound `[u8; 1]: Test` is not satisfied
LL | needs_test::<[u8; 1]>();
| ^^^^^^^ the trait `Test` is not implemented for `[u8; 1]`
|
= help: the trait `Test` is implemented for `&[u8]`
help: the trait `Test` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:2:1
|
LL | impl Test for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `needs_test`
--> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:4:18
|
@ -17,7 +21,11 @@ error[E0277]: the trait bound `[u8; 1]: Test` is not satisfied
LL | let x: [u8; 1] = needs_test();
| ^^^^^^^^^^^^ the trait `Test` is not implemented for `[u8; 1]`
|
= help: the trait `Test` is implemented for `&[u8]`
help: the trait `Test` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:2:1
|
LL | impl Test for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `needs_test`
--> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:4:18
|

View file

@ -6,7 +6,11 @@ LL | wants_read([0u8]);
| |
| required by a bound introduced by this call
|
= help: the trait `Read` is implemented for `&[u8]`
help: the trait `Read` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-suggestion-1.rs:8:1
|
LL | impl Read for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_read`
--> $DIR/issue-90528-unsizing-suggestion-1.rs:10:23
|
@ -25,7 +29,11 @@ LL | wants_read(&[0u8]);
| |
| required by a bound introduced by this call
|
= help: the trait `Read` is implemented for `&[u8]`
help: the trait `Read` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-suggestion-1.rs:8:1
|
LL | impl Read for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_read`
--> $DIR/issue-90528-unsizing-suggestion-1.rs:10:23
|
@ -44,7 +52,11 @@ LL | wants_read(&mut [0u8]);
| |
| required by a bound introduced by this call
|
= help: the trait `Read` is implemented for `&[u8]`
help: the trait `Read` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-suggestion-1.rs:8:1
|
LL | impl Read for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_read`
--> $DIR/issue-90528-unsizing-suggestion-1.rs:10:23
|

View file

@ -6,7 +6,11 @@ LL | wants_read(x);
| |
| required by a bound introduced by this call
|
= help: the trait `Read` is implemented for `&[u8]`
help: the trait `Read` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:8:1
|
LL | impl Read for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_read`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:10:23
|
@ -25,7 +29,11 @@ LL | wants_read(&x);
| |
| required by a bound introduced by this call
|
= help: the trait `Read` is implemented for `&[u8]`
help: the trait `Read` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:8:1
|
LL | impl Read for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_read`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:10:23
|
@ -44,7 +52,11 @@ LL | wants_read(x);
| |
| required by a bound introduced by this call
|
= help: the trait `Read` is implemented for `&[u8]`
help: the trait `Read` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:8:1
|
LL | impl Read for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_read`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:10:23
|
@ -63,7 +75,11 @@ LL | wants_read(&x);
| |
| required by a bound introduced by this call
|
= help: the trait `Read` is implemented for `&[u8]`
help: the trait `Read` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:8:1
|
LL | impl Read for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_read`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:10:23
|
@ -78,7 +94,11 @@ LL | wants_read(*x);
| |
| required by a bound introduced by this call
|
= help: the trait `Read` is implemented for `&[u8]`
help: the trait `Read` is implemented for `&[u8]`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:8:1
|
LL | impl Read for &[u8] {}
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_read`
--> $DIR/issue-90528-unsizing-suggestion-2.rs:10:23
|

View file

@ -6,7 +6,11 @@ LL | wants_write([0u8]);
| |
| required by a bound introduced by this call
|
= help: the trait `Write` is implemented for `&mut [u8]`
help: the trait `Write` is implemented for `&mut [u8]`
--> $DIR/issue-90528-unsizing-suggestion-3.rs:8:1
|
LL | impl Write for &mut [u8] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_write`
--> $DIR/issue-90528-unsizing-suggestion-3.rs:10:24
|
@ -25,7 +29,11 @@ LL | wants_write(&mut [0u8]);
| |
| required by a bound introduced by this call
|
= help: the trait `Write` is implemented for `&mut [u8]`
help: the trait `Write` is implemented for `&mut [u8]`
--> $DIR/issue-90528-unsizing-suggestion-3.rs:8:1
|
LL | impl Write for &mut [u8] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_write`
--> $DIR/issue-90528-unsizing-suggestion-3.rs:10:24
|
@ -44,7 +52,11 @@ LL | wants_write(&[0u8]);
| |
| required by a bound introduced by this call
|
= help: the trait `Write` is implemented for `&mut [u8]`
help: the trait `Write` is implemented for `&mut [u8]`
--> $DIR/issue-90528-unsizing-suggestion-3.rs:8:1
|
LL | impl Write for &mut [u8] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_write`
--> $DIR/issue-90528-unsizing-suggestion-3.rs:10:24
|
@ -59,7 +71,11 @@ LL | wants_write(&[0u8][..]);
| |
| required by a bound introduced by this call
|
= help: the trait `Write` is implemented for `&mut [u8]`
help: the trait `Write` is implemented for `&mut [u8]`
--> $DIR/issue-90528-unsizing-suggestion-3.rs:8:1
|
LL | impl Write for &mut [u8] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_write`
--> $DIR/issue-90528-unsizing-suggestion-3.rs:10:24
|

View file

@ -6,7 +6,11 @@ LL | wants_write(x);
| |
| required by a bound introduced by this call
|
= help: the trait `Write` is implemented for `&mut [u8]`
help: the trait `Write` is implemented for `&mut [u8]`
--> $DIR/issue-90528-unsizing-suggestion-4.rs:8:1
|
LL | impl Write for &mut [u8] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_write`
--> $DIR/issue-90528-unsizing-suggestion-4.rs:10:24
|
@ -25,7 +29,11 @@ LL | wants_write(&mut x);
| |
| required by a bound introduced by this call
|
= help: the trait `Write` is implemented for `&mut [u8]`
help: the trait `Write` is implemented for `&mut [u8]`
--> $DIR/issue-90528-unsizing-suggestion-4.rs:8:1
|
LL | impl Write for &mut [u8] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_write`
--> $DIR/issue-90528-unsizing-suggestion-4.rs:10:24
|
@ -44,7 +52,11 @@ LL | wants_write(x);
| |
| required by a bound introduced by this call
|
= help: the trait `Write` is implemented for `&mut [u8]`
help: the trait `Write` is implemented for `&mut [u8]`
--> $DIR/issue-90528-unsizing-suggestion-4.rs:8:1
|
LL | impl Write for &mut [u8] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_write`
--> $DIR/issue-90528-unsizing-suggestion-4.rs:10:24
|
@ -63,7 +75,11 @@ LL | wants_write(*x);
| |
| required by a bound introduced by this call
|
= help: the trait `Write` is implemented for `&mut [u8]`
help: the trait `Write` is implemented for `&mut [u8]`
--> $DIR/issue-90528-unsizing-suggestion-4.rs:8:1
|
LL | impl Write for &mut [u8] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `wants_write`
--> $DIR/issue-90528-unsizing-suggestion-4.rs:10:24
|

View file

@ -39,7 +39,11 @@ LL | want(Some(()));
| required by a bound introduced by this call
|
= help: the trait `Iterator` is not implemented for `()`
= help: the trait `T1` is implemented for `Option<It>`
help: the trait `T1` is implemented for `Option<It>`
--> $DIR/blame-trait-error.rs:21:1
|
LL | impl<It: Iterator> T1 for Option<It> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required for `Option<()>` to implement `T1`
--> $DIR/blame-trait-error.rs:21:20
|

View file

@ -4,7 +4,11 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
LL | enum E where i32: Foo { V }
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: the trait `Foo` is implemented for `()`
help: the trait `Foo` is implemented for `()`
--> $DIR/feature-gate-trivial_bounds.rs:20:1
|
LL | impl Foo for () where i32: Foo {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
@ -17,7 +21,11 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
LL | struct S where i32: Foo;
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: the trait `Foo` is implemented for `()`
help: the trait `Foo` is implemented for `()`
--> $DIR/feature-gate-trivial_bounds.rs:20:1
|
LL | impl Foo for () where i32: Foo {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
@ -30,7 +38,11 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
LL | trait T where i32: Foo {}
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: the trait `Foo` is implemented for `()`
help: the trait `Foo` is implemented for `()`
--> $DIR/feature-gate-trivial_bounds.rs:20:1
|
LL | impl Foo for () where i32: Foo {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
@ -43,7 +55,11 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
LL | union U where i32: Foo { f: i32 }
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: the trait `Foo` is implemented for `()`
help: the trait `Foo` is implemented for `()`
--> $DIR/feature-gate-trivial_bounds.rs:20:1
|
LL | impl Foo for () where i32: Foo {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
@ -56,7 +72,11 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
LL | impl Foo for () where i32: Foo {
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: the trait `Foo` is implemented for `()`
help: the trait `Foo` is implemented for `()`
--> $DIR/feature-gate-trivial_bounds.rs:20:1
|
LL | impl Foo for () where i32: Foo {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
@ -69,7 +89,11 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
LL | fn f() where i32: Foo
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: the trait `Foo` is implemented for `()`
help: the trait `Foo` is implemented for `()`
--> $DIR/feature-gate-trivial_bounds.rs:20:1
|
LL | impl Foo for () where i32: Foo {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|

View file

@ -5,7 +5,11 @@ LL | do_something(SomeImplementation(), test);
| ^^^^ cannot infer type of the type parameter `I` declared on the function `test`
|
= note: cannot satisfy `_: Iterable`
= help: the trait `Iterable` is implemented for `SomeImplementation`
help: the trait `Iterable` is implemented for `SomeImplementation`
--> $DIR/issue-88382.rs:13:1
|
LL | impl Iterable for SomeImplementation {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `test`
--> $DIR/issue-88382.rs:29:16
|

View file

@ -42,7 +42,11 @@ error[E0277]: the trait bound `u64: Other` is not satisfied
LL | foo::<()>();
| ^^ the trait `Other` is not implemented for `u64`
|
= help: the trait `Other` is implemented for `u32`
help: the trait `Other` is implemented for `u32`
--> $DIR/type-param-defaults.rs:21:1
|
LL | impl Other for u32 {}
| ^^^^^^^^^^^^^^^^^^
note: required by a bound in `foo`
--> $DIR/type-param-defaults.rs:26:15
|

View file

@ -30,11 +30,17 @@ LL | n + sum_to(n - 1)
| ^ no implementation for `u32 + impl Foo`
|
= help: the trait `Add<impl Foo>` is not implemented for `u32`
= help: the following other types implement trait `Add<Rhs>`:
`&u32` implements `Add<u32>`
`&u32` implements `Add`
`u32` implements `Add<&u32>`
`u32` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&u32` implements `Add<u32>`
|
= note: `&u32` implements `Add`
|
= note: `u32` implements `Add<&u32>`
|
= note: `u32` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors; 1 warning emitted

View file

@ -4,7 +4,11 @@ error[E0277]: the trait bound `(): Foo` is not satisfied
LL | let x: impl Foo = W(());
| ^^^ the trait `Foo` is not implemented for `()`
|
= help: the trait `Foo` is implemented for `W<T>`
help: the trait `Foo` is implemented for `W<T>`
--> $DIR/trait-failure.rs:6:1
|
LL | impl<T> Foo for W<T> where T: Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required for `W<()>` to implement `Foo`
--> $DIR/trait-failure.rs:6:9
|
@ -17,7 +21,11 @@ error[E0277]: the trait bound `(): Foo` is not satisfied
LL | let x: W<impl Foo> = W(());
| ^^^ the trait `Foo` is not implemented for `()`
|
= help: the trait `Foo` is implemented for `W<T>`
help: the trait `Foo` is implemented for `W<T>`
--> $DIR/trait-failure.rs:6:1
|
LL | impl<T> Foo for W<T> where T: Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors

View file

@ -6,7 +6,11 @@ LL | MyTrait::foo(&self)
| |
| required by a bound introduced by this call
|
= help: the trait `MyTrait` is implemented for `Outer`
help: the trait `MyTrait` is implemented for `Outer`
--> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:10:1
|
LL | impl MyTrait for Outer {
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0038]: the trait `MyTrait` is not dyn compatible
--> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:20:9
@ -31,7 +35,11 @@ error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
LL | MyTrait::foo(&self)
| ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
|
= help: the trait `MyTrait` is implemented for `Outer`
help: the trait `MyTrait` is implemented for `Outer`
--> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:10:1
|
LL | impl MyTrait for Outer {
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0038]: the trait `MyTrait` is not dyn compatible
--> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:16:6

View file

@ -18,7 +18,11 @@ error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
LL | MyTrait::foo(&self)
| ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
|
= help: the trait `MyTrait` is implemented for `Outer`
help: the trait `MyTrait` is implemented for `Outer`
--> $DIR/issue-102140.rs:12:1
|
LL | impl MyTrait for Outer {
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors

View file

@ -13,7 +13,11 @@ error[E0277]: the trait bound `impl Foo<u8>: Foo<char>` is not satisfied
LL | fn foo<F2: Foo<u8>>(self) -> impl Foo<u8> {
| ^^^^^^^^^^^^ the trait `Foo<char>` is not implemented for `impl Foo<u8>`
|
= help: the trait `Foo<char>` is implemented for `Bar`
help: the trait `Foo<char>` is implemented for `Bar`
--> $DIR/return-dont-satisfy-bounds.rs:7:1
|
LL | impl Foo<char> for Bar {
| ^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `Foo::foo::{anon_assoc#0}`
--> $DIR/return-dont-satisfy-bounds.rs:2:30
|

View file

@ -50,7 +50,8 @@ LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| |
| the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
|
= help: the trait `Into<U>` is implemented for `T`
help: the trait `Into<U>` is implemented for `T`
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`
error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
@ -61,7 +62,8 @@ LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| |
| the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
|
= help: the trait `Into<U>` is implemented for `T`
help: the trait `Into<U>` is implemented for `T`
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`
error: aborting due to 7 previous errors

View file

@ -12,7 +12,11 @@ help: the trait `PartialEq<(Foo, i32)>` is not implemented for `Bar`
|
LL | struct Bar;
| ^^^^^^^^^^
= help: the trait `PartialEq<(Bar, i32)>` is implemented for `Bar`
help: the trait `PartialEq<(Bar, i32)>` is implemented for `Bar`
--> $DIR/recursive-type-alias-impl-trait-declaration.rs:7:1
|
LL | impl PartialEq<(Bar, i32)> for Bar {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error

View file

@ -4,7 +4,11 @@ error[E0277]: the trait bound `dyn Send: Trait` is not satisfied
LL | let x = hello();
| ^^^^^^^ the trait `Trait` is not implemented for `dyn Send`
|
= help: the trait `Trait` is implemented for `u32`
help: the trait `Trait` is implemented for `u32`
--> $DIR/unsized_coercion3.rs:9:1
|
LL | impl Trait for u32 {}
| ^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error

View file

@ -5,9 +5,13 @@ LL | x[0i32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[{integer}]>` is not implemented for `i32`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `Vec<{integer}>` to implement `Index<i32>`
error: aborting due to 1 previous error

View file

@ -5,9 +5,13 @@ LL | v[3u8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[isize]>` is not implemented for `u8`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `Vec<isize>` to implement `Index<u8>`
error[E0277]: the type `[isize]` cannot be indexed by `i8`
@ -17,9 +21,13 @@ LL | v[3i8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[isize]>` is not implemented for `i8`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `Vec<isize>` to implement `Index<i8>`
error[E0277]: the type `[isize]` cannot be indexed by `u32`
@ -29,9 +37,13 @@ LL | v[3u32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[isize]>` is not implemented for `u32`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `Vec<isize>` to implement `Index<u32>`
error[E0277]: the type `[isize]` cannot be indexed by `i32`
@ -41,9 +53,13 @@ LL | v[3i32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[isize]>` is not implemented for `i32`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `Vec<isize>` to implement `Index<i32>`
error[E0277]: the type `[u8]` cannot be indexed by `u8`
@ -53,9 +69,13 @@ LL | s.as_bytes()[3u8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[u8]>` is not implemented for `u8`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `[u8]` to implement `Index<u8>`
error[E0277]: the type `[u8]` cannot be indexed by `i8`
@ -65,9 +85,13 @@ LL | s.as_bytes()[3i8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[u8]>` is not implemented for `i8`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `[u8]` to implement `Index<i8>`
error[E0277]: the type `[u8]` cannot be indexed by `u32`
@ -77,9 +101,13 @@ LL | s.as_bytes()[3u32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[u8]>` is not implemented for `u32`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `[u8]` to implement `Index<u32>`
error[E0277]: the type `[u8]` cannot be indexed by `i32`
@ -89,9 +117,13 @@ LL | s.as_bytes()[3i32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[u8]>` is not implemented for `i32`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `[u8]` to implement `Index<i32>`
error: aborting due to 8 previous errors

View file

@ -5,9 +5,13 @@ LL | [0][0u8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[{integer}]>` is not implemented for `u8`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `[{integer}]` to implement `Index<u8>`
= note: 1 redundant requirement hidden
= note: required for `[{integer}; 1]` to implement `Index<u8>`

View file

@ -33,9 +33,12 @@ LL | println!("{}", scores.sum::<i32>());
| required by a bound introduced by this call
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
`i32` implements `Sum<&i32>`
`i32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Sum<&i32>`
|
= note: `i32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain-fixable.rs:14:10
|
@ -51,6 +54,7 @@ LL | | });
| |__________^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing this semicolon
|
LL - a + b;
@ -66,9 +70,12 @@ LL | .sum::<i32>(),
| required by a bound introduced by this call
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
`i32` implements `Sum<&i32>`
`i32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Sum<&i32>`
|
= note: `i32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain-fixable.rs:23:14
|
@ -84,6 +91,7 @@ LL | .map(|x| { x })
| -------------- `Iterator::Item` remains `()` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing this semicolon
|
LL - .map(|x| { x; })
@ -99,9 +107,12 @@ LL | println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
| required by a bound introduced by this call
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
`i32` implements `Sum<&i32>`
`i32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Sum<&i32>`
|
= note: `i32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain-fixable.rs:27:38
|
@ -112,6 +123,7 @@ LL | println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
| this expression has type `Vec<{integer}>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing this semicolon
|
LL - println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());

View file

@ -7,9 +7,12 @@ LL | let x = Some(()).iter().map(|()| 1).sum::<f32>();
| required by a bound introduced by this call
|
= help: the trait `Sum<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Sum<A>`:
`f32` implements `Sum<&f32>`
`f32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `f32` implements `Sum<&f32>`
|
= note: `f32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain-with-int-infer.rs:2:29
|
@ -20,6 +23,7 @@ LL | let x = Some(()).iter().map(|()| 1).sum::<f32>();
| this expression has type `Option<()>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `float_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 1 previous error

View file

@ -33,9 +33,12 @@ LL | println!("{}", scores.sum::<i32>());
| required by a bound introduced by this call
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
`i32` implements `Sum<&i32>`
`i32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Sum<&i32>`
|
= note: `i32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:12:10
|
@ -50,6 +53,7 @@ LL | | });
| |__________^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing this semicolon
|
LL - a + b;
@ -65,9 +69,12 @@ LL | .sum::<i32>(),
| required by a bound introduced by this call
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
`i32` implements `Sum<&i32>`
`i32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Sum<&i32>`
|
= note: `i32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:25:14
|
@ -89,6 +96,7 @@ LL | .map(|x| { x; })
| ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing this semicolon
|
LL - .map(|x| { x; })
@ -104,9 +112,12 @@ LL | .sum::<i32>(),
| required by a bound introduced by this call
|
= help: the trait `Sum<f64>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
`i32` implements `Sum<&i32>`
`i32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Sum<&i32>`
|
= note: `i32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:33:14
|
@ -124,6 +135,7 @@ LL | .map(|x| { x + 1.0 })
| -------------------- `Iterator::Item` remains `f64` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
--> $DIR/invalid-iterator-chain.rs:38:60
@ -134,9 +146,12 @@ LL | println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
| required by a bound introduced by this call
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
`i32` implements `Sum<&i32>`
`i32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Sum<&i32>`
|
= note: `i32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:38:38
|
@ -147,6 +162,7 @@ LL | println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
| this expression has type `Vec<{integer}>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing this semicolon
|
LL - println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
@ -162,9 +178,12 @@ LL | println!("{}", vec![(), ()].iter().sum::<i32>());
| required by a bound introduced by this call
|
= help: the trait `Sum<&()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
`i32` implements `Sum<&i32>`
`i32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Sum<&i32>`
|
= note: `i32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:39:33
|
@ -174,6 +193,7 @@ LL | println!("{}", vec![(), ()].iter().sum::<i32>());
| this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: a value of type `Vec<i32>` cannot be built from an iterator over elements of type `()`
--> $DIR/invalid-iterator-chain.rs:48:25

View file

@ -80,7 +80,11 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
LL | let a = t as Box<dyn Gettable<String>>;
| ^ the trait `Copy` is not implemented for `String`
|
= help: the trait `Gettable<T>` is implemented for `S<T>`
help: the trait `Gettable<T>` is implemented for `S<T>`
--> $DIR/kindck-impl-type-params.rs:12:1
|
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required for `S<String>` to implement `Gettable<String>`
--> $DIR/kindck-impl-type-params.rs:12:32
|
@ -96,7 +100,11 @@ error[E0277]: the trait bound `Foo: Copy` is not satisfied
LL | let a: Box<dyn Gettable<Foo>> = t;
| ^ the trait `Copy` is not implemented for `Foo`
|
= help: the trait `Gettable<T>` is implemented for `S<T>`
help: the trait `Gettable<T>` is implemented for `S<T>`
--> $DIR/kindck-impl-type-params.rs:12:1
|
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required for `S<Foo>` to implement `Gettable<Foo>`
--> $DIR/kindck-impl-type-params.rs:12:32
|

View file

@ -2,5 +2,6 @@ error: dlltool could not create import library with $DLLTOOL -d $DEF_FILE -D foo
$DLLTOOL: Syntax error in def file $DEF_FILE:1␍
error: aborting due to 1 previous error

View file

@ -23,11 +23,17 @@ LL | 2 as usize - Some(1);
| ^ no implementation for `usize - Option<{integer}>`
|
= help: the trait `Sub<Option<{integer}>>` is not implemented for `usize`
= help: the following other types implement trait `Sub<Rhs>`:
`&usize` implements `Sub<usize>`
`&usize` implements `Sub`
`usize` implements `Sub<&usize>`
`usize` implements `Sub`
help: the following other types implement trait `Sub<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&usize` implements `Sub<usize>`
|
= note: `&usize` implements `Sub`
|
= note: `usize` implements `Sub<&usize>`
|
= note: `usize` implements `Sub`
= note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot multiply `{integer}` by `()`
--> $DIR/binops.rs:4:7

View file

@ -5,11 +5,17 @@ LL | 1.0f64 - 1
| ^ no implementation for `f64 - {integer}`
|
= help: the trait `Sub<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Sub<Rhs>`:
`&f64` implements `Sub<f64>`
`&f64` implements `Sub`
`f64` implements `Sub<&f64>`
`f64` implements `Sub`
help: the following other types implement trait `Sub<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Sub<f64>`
|
= note: `&f64` implements `Sub`
|
= note: `f64` implements `Sub<&f64>`
|
= note: `f64` implements `Sub`
= note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
|
LL | 1.0f64 - 1.0

View file

@ -6,7 +6,11 @@ LL | foo(_x);
| |
| required by a bound introduced by this call
|
= help: the trait `ImplementedForUnitButNotNever` is implemented for `()`
help: the trait `ImplementedForUnitButNotNever` is implemented for `()`
--> $DIR/defaulted-never-note.rs:24:1
|
LL | impl ImplementedForUnitButNotNever for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
= help: you might have intended to use the type `()` here instead
note: required by a bound in `foo`

View file

@ -21,7 +21,7 @@ impl Deserialize for () {
trait ImplementedForUnitButNotNever {}
impl ImplementedForUnitButNotNever for () {}
impl ImplementedForUnitButNotNever for () {} //[fallback]~ HELP trait `ImplementedForUnitButNotNever` is implemented for `()`
fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
//[fallback]~^ note: required by this bound in `foo`
@ -29,12 +29,11 @@ fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
fn smeg() {
let _x = return;
foo(_x);
//[fallback]~^ error: the trait bound
//[fallback]~| note: the trait `ImplementedForUnitButNotNever` is not implemented
//[fallback]~| help: trait `ImplementedForUnitButNotNever` is implemented for `()`
//[fallback]~| note: this error might have been caused
//[fallback]~| note: required by a bound introduced by this call
//[fallback]~| help: you might have intended to use the type `()`
//[fallback]~^ ERROR the trait bound
//[fallback]~| NOTE the trait `ImplementedForUnitButNotNever` is not implemented
//[fallback]~| NOTE this error might have been caused
//[fallback]~| NOTE required by a bound introduced by this call
//[fallback]~| HELP you might have intended to use the type `()`
}
fn main() {

View file

@ -6,9 +6,13 @@ LL | unconstrained_arg(return);
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `Test`:
()
i32
help: the following other types implement trait `Test`
--> $DIR/diverging-fallback-no-leak.rs:10:1
|
LL | impl Test for i32 {}
| ^^^^^^^^^^^^^^^^^ `i32`
LL | impl Test for () {}
| ^^^^^^^^^^^^^^^^ `()`
= note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
= help: you might have intended to use the type `()` here instead
note: required by a bound in `unconstrained_arg`

View file

@ -7,7 +7,11 @@ LL |
LL | panic!()
| -------- return type was inferred to be `_` here
|
= help: the trait `T` is implemented for `i32`
help: the trait `T` is implemented for `i32`
--> $DIR/impl_trait_fallback2.rs:6:1
|
LL | impl T for i32 {}
| ^^^^^^^^^^^^^^
error[E0277]: the trait bound `(): T` is not satisfied
--> $DIR/impl_trait_fallback2.rs:16:11
@ -18,7 +22,11 @@ LL |
LL | panic!()
| -------- return type was inferred to be `_` here
|
= help: the trait `T` is implemented for `i32`
help: the trait `T` is implemented for `i32`
--> $DIR/impl_trait_fallback2.rs:6:1
|
LL | impl T for i32 {}
| ^^^^^^^^^^^^^^
error: aborting due to 2 previous errors

View file

@ -5,11 +5,17 @@ LL | 2_usize + (loop {});
| ^ no implementation for `usize + ()`
|
= help: the trait `Add<()>` is not implemented for `usize`
= help: the following other types implement trait `Add<Rhs>`:
`&usize` implements `Add<usize>`
`&usize` implements `Add`
`usize` implements `Add<&usize>`
`usize` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&usize` implements `Add<usize>`
|
= note: `&usize` implements `Add`
|
= note: `usize` implements `Add<&usize>`
|
= note: `usize` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 1 previous error

View file

@ -5,11 +5,17 @@ LL | x + 100.0
| ^ no implementation for `u8 + {float}`
|
= help: the trait `Add<{float}>` is not implemented for `u8`
= help: the following other types implement trait `Add<Rhs>`:
`&u8` implements `Add<u8>`
`&u8` implements `Add`
`u8` implements `Add<&u8>`
`u8` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&u8` implements `Add<u8>`
|
= note: `&u8` implements `Add`
|
= note: `u8` implements `Add<&u8>`
|
= note: `u8` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot add `&str` to `f64`
--> $DIR/not-suggest-float-literal.rs:6:7
@ -18,11 +24,17 @@ LL | x + "foo"
| ^ no implementation for `f64 + &str`
|
= help: the trait `Add<&str>` is not implemented for `f64`
= help: the following other types implement trait `Add<Rhs>`:
`&f64` implements `Add<f64>`
`&f64` implements `Add`
`f64` implements `Add<&f64>`
`f64` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Add<f64>`
|
= note: `&f64` implements `Add`
|
= note: `f64` implements `Add<&f64>`
|
= note: `f64` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot add `{integer}` to `f64`
--> $DIR/not-suggest-float-literal.rs:11:7
@ -31,11 +43,17 @@ LL | x + y
| ^ no implementation for `f64 + {integer}`
|
= help: the trait `Add<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Add<Rhs>`:
`&f64` implements `Add<f64>`
`&f64` implements `Add`
`f64` implements `Add<&f64>`
`f64` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Add<f64>`
|
= note: `&f64` implements `Add`
|
= note: `f64` implements `Add<&f64>`
|
= note: `f64` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot subtract `{float}` from `u8`
--> $DIR/not-suggest-float-literal.rs:15:7
@ -44,11 +62,17 @@ LL | x - 100.0
| ^ no implementation for `u8 - {float}`
|
= help: the trait `Sub<{float}>` is not implemented for `u8`
= help: the following other types implement trait `Sub<Rhs>`:
`&u8` implements `Sub<u8>`
`&u8` implements `Sub`
`u8` implements `Sub<&u8>`
`u8` implements `Sub`
help: the following other types implement trait `Sub<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&u8` implements `Sub<u8>`
|
= note: `&u8` implements `Sub`
|
= note: `u8` implements `Sub<&u8>`
|
= note: `u8` implements `Sub`
= note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot subtract `&str` from `f64`
--> $DIR/not-suggest-float-literal.rs:19:7
@ -57,11 +81,17 @@ LL | x - "foo"
| ^ no implementation for `f64 - &str`
|
= help: the trait `Sub<&str>` is not implemented for `f64`
= help: the following other types implement trait `Sub<Rhs>`:
`&f64` implements `Sub<f64>`
`&f64` implements `Sub`
`f64` implements `Sub<&f64>`
`f64` implements `Sub`
help: the following other types implement trait `Sub<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Sub<f64>`
|
= note: `&f64` implements `Sub`
|
= note: `f64` implements `Sub<&f64>`
|
= note: `f64` implements `Sub`
= note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot subtract `{integer}` from `f64`
--> $DIR/not-suggest-float-literal.rs:24:7
@ -70,11 +100,17 @@ LL | x - y
| ^ no implementation for `f64 - {integer}`
|
= help: the trait `Sub<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Sub<Rhs>`:
`&f64` implements `Sub<f64>`
`&f64` implements `Sub`
`f64` implements `Sub<&f64>`
`f64` implements `Sub`
help: the following other types implement trait `Sub<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Sub<f64>`
|
= note: `&f64` implements `Sub`
|
= note: `f64` implements `Sub<&f64>`
|
= note: `f64` implements `Sub`
= note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot multiply `u8` by `{float}`
--> $DIR/not-suggest-float-literal.rs:28:7
@ -83,11 +119,17 @@ LL | x * 100.0
| ^ no implementation for `u8 * {float}`
|
= help: the trait `Mul<{float}>` is not implemented for `u8`
= help: the following other types implement trait `Mul<Rhs>`:
`&u8` implements `Mul<u8>`
`&u8` implements `Mul`
`u8` implements `Mul<&u8>`
`u8` implements `Mul`
help: the following other types implement trait `Mul<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&u8` implements `Mul<u8>`
|
= note: `&u8` implements `Mul`
|
= note: `u8` implements `Mul<&u8>`
|
= note: `u8` implements `Mul`
= note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot multiply `f64` by `&str`
--> $DIR/not-suggest-float-literal.rs:32:7
@ -96,11 +138,17 @@ LL | x * "foo"
| ^ no implementation for `f64 * &str`
|
= help: the trait `Mul<&str>` is not implemented for `f64`
= help: the following other types implement trait `Mul<Rhs>`:
`&f64` implements `Mul<f64>`
`&f64` implements `Mul`
`f64` implements `Mul<&f64>`
`f64` implements `Mul`
help: the following other types implement trait `Mul<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Mul<f64>`
|
= note: `&f64` implements `Mul`
|
= note: `f64` implements `Mul<&f64>`
|
= note: `f64` implements `Mul`
= note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot multiply `f64` by `{integer}`
--> $DIR/not-suggest-float-literal.rs:37:7
@ -109,11 +157,17 @@ LL | x * y
| ^ no implementation for `f64 * {integer}`
|
= help: the trait `Mul<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Mul<Rhs>`:
`&f64` implements `Mul<f64>`
`&f64` implements `Mul`
`f64` implements `Mul<&f64>`
`f64` implements `Mul`
help: the following other types implement trait `Mul<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Mul<f64>`
|
= note: `&f64` implements `Mul`
|
= note: `f64` implements `Mul<&f64>`
|
= note: `f64` implements `Mul`
= note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot divide `u8` by `{float}`
--> $DIR/not-suggest-float-literal.rs:41:7
@ -136,11 +190,17 @@ LL | x / "foo"
| ^ no implementation for `f64 / &str`
|
= help: the trait `Div<&str>` is not implemented for `f64`
= help: the following other types implement trait `Div<Rhs>`:
`&f64` implements `Div<f64>`
`&f64` implements `Div`
`f64` implements `Div<&f64>`
`f64` implements `Div`
help: the following other types implement trait `Div<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Div<f64>`
|
= note: `&f64` implements `Div`
|
= note: `f64` implements `Div<&f64>`
|
= note: `f64` implements `Div`
= note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: cannot divide `f64` by `{integer}`
--> $DIR/not-suggest-float-literal.rs:50:7
@ -149,11 +209,17 @@ LL | x / y
| ^ no implementation for `f64 / {integer}`
|
= help: the trait `Div<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Div<Rhs>`:
`&f64` implements `Div<f64>`
`&f64` implements `Div`
`f64` implements `Div<&f64>`
`f64` implements `Div`
help: the following other types implement trait `Div<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Div<f64>`
|
= note: `&f64` implements `Div`
|
= note: `f64` implements `Div<&f64>`
|
= note: `f64` implements `Div`
= note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 12 previous errors

View file

@ -5,11 +5,17 @@ LL | x + 100
| ^ no implementation for `f32 + {integer}`
|
= help: the trait `Add<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Add<Rhs>`:
`&f32` implements `Add<f32>`
`&f32` implements `Add`
`f32` implements `Add<&f32>`
`f32` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f32` implements `Add<f32>`
|
= note: `&f32` implements `Add`
|
= note: `f32` implements `Add<&f32>`
|
= note: `f32` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
|
LL | x + 100.0
@ -22,11 +28,17 @@ LL | x + 100
| ^ no implementation for `f64 + {integer}`
|
= help: the trait `Add<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Add<Rhs>`:
`&f64` implements `Add<f64>`
`&f64` implements `Add`
`f64` implements `Add<&f64>`
`f64` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Add<f64>`
|
= note: `&f64` implements `Add`
|
= note: `f64` implements `Add<&f64>`
|
= note: `f64` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
|
LL | x + 100.0
@ -39,11 +51,17 @@ LL | x - 100
| ^ no implementation for `f32 - {integer}`
|
= help: the trait `Sub<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Sub<Rhs>`:
`&f32` implements `Sub<f32>`
`&f32` implements `Sub`
`f32` implements `Sub<&f32>`
`f32` implements `Sub`
help: the following other types implement trait `Sub<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f32` implements `Sub<f32>`
|
= note: `&f32` implements `Sub`
|
= note: `f32` implements `Sub<&f32>`
|
= note: `f32` implements `Sub`
= note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
|
LL | x - 100.0
@ -56,11 +74,17 @@ LL | x - 100
| ^ no implementation for `f64 - {integer}`
|
= help: the trait `Sub<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Sub<Rhs>`:
`&f64` implements `Sub<f64>`
`&f64` implements `Sub`
`f64` implements `Sub<&f64>`
`f64` implements `Sub`
help: the following other types implement trait `Sub<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Sub<f64>`
|
= note: `&f64` implements `Sub`
|
= note: `f64` implements `Sub<&f64>`
|
= note: `f64` implements `Sub`
= note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
|
LL | x - 100.0
@ -73,11 +97,17 @@ LL | x * 100
| ^ no implementation for `f32 * {integer}`
|
= help: the trait `Mul<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Mul<Rhs>`:
`&f32` implements `Mul<f32>`
`&f32` implements `Mul`
`f32` implements `Mul<&f32>`
`f32` implements `Mul`
help: the following other types implement trait `Mul<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f32` implements `Mul<f32>`
|
= note: `&f32` implements `Mul`
|
= note: `f32` implements `Mul<&f32>`
|
= note: `f32` implements `Mul`
= note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
|
LL | x * 100.0
@ -90,11 +120,17 @@ LL | x * 100
| ^ no implementation for `f64 * {integer}`
|
= help: the trait `Mul<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Mul<Rhs>`:
`&f64` implements `Mul<f64>`
`&f64` implements `Mul`
`f64` implements `Mul<&f64>`
`f64` implements `Mul`
help: the following other types implement trait `Mul<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Mul<f64>`
|
= note: `&f64` implements `Mul`
|
= note: `f64` implements `Mul<&f64>`
|
= note: `f64` implements `Mul`
= note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
|
LL | x * 100.0
@ -107,11 +143,17 @@ LL | x / 100
| ^ no implementation for `f32 / {integer}`
|
= help: the trait `Div<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Div<Rhs>`:
`&f32` implements `Div<f32>`
`&f32` implements `Div`
`f32` implements `Div<&f32>`
`f32` implements `Div`
help: the following other types implement trait `Div<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f32` implements `Div<f32>`
|
= note: `&f32` implements `Div`
|
= note: `f32` implements `Div<&f32>`
|
= note: `f32` implements `Div`
= note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
|
LL | x / 100.0
@ -124,11 +166,17 @@ LL | x / 100
| ^ no implementation for `f64 / {integer}`
|
= help: the trait `Div<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Div<Rhs>`:
`&f64` implements `Div<f64>`
`&f64` implements `Div`
`f64` implements `Div<&f64>`
`f64` implements `Div`
help: the following other types implement trait `Div<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Div<f64>`
|
= note: `&f64` implements `Div`
|
= note: `f64` implements `Div<&f64>`
|
= note: `f64` implements `Div`
= note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
|
LL | x / 100.0

View file

@ -5,9 +5,13 @@ LL | x[1i32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[i32]>` is not implemented for `i32`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `[i32]` to implement `Index<i32>`
error[E0277]: the type `[i32]` cannot be indexed by `RangeTo<i32>`
@ -17,11 +21,18 @@ LL | x[..1i32];
| ^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[i32]>` is not implemented for `RangeTo<i32>`
= help: the following other types implement trait `SliceIndex<T>`:
`RangeTo<usize>` implements `SliceIndex<ByteStr>`
`RangeTo<usize>` implements `SliceIndex<[T]>`
`RangeTo<usize>` implements `SliceIndex<str>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `RangeTo<usize>` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `RangeTo<usize>` implements `SliceIndex<ByteStr>`
--> $SRC_DIR/core/src/str/traits.rs:LL:COL
|
= note: `RangeTo<usize>` implements `SliceIndex<str>`
= note: required for `[i32]` to implement `Index<RangeTo<i32>>`
= note: this error originates in the macro `impl_slice_index` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors

View file

@ -6,7 +6,7 @@ impl Argument for &str {}
pub trait TupleArgs {}
impl<A: Argument> TupleArgs for (A,) {}
impl<A: Argument, B: Argument> TupleArgs for (A, B) {}
impl<A: Argument, B: Argument> TupleArgs for (A, B) {} //~ HELP the following other types implement trait `TupleArgs`
impl<A: Argument, B: Argument, C: Argument> TupleArgs for (A, B, C) {}
fn convert_into_tuple(_x: impl TupleArgs) {}
@ -14,6 +14,5 @@ fn convert_into_tuple(_x: impl TupleArgs) {}
fn main() {
convert_into_tuple(42_u8);
//~^ ERROR E0277
//~| HELP the following other types implement trait `TupleArgs`
//~| HELP use a unary tuple instead
}

View file

@ -6,10 +6,15 @@ LL | convert_into_tuple(42_u8);
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `TupleArgs`:
(A, B)
(A, B, C)
(A,)
help: the following other types implement trait `TupleArgs`
--> $DIR/suggest_tuple_wrap.rs:8:1
|
LL | impl<A: Argument> TupleArgs for (A,) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(A,)`
LL | impl<A: Argument, B: Argument> TupleArgs for (A, B) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(A, B)`
LL | impl<A: Argument, B: Argument, C: Argument> TupleArgs for (A, B, C) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(A, B, C)`
note: required by a bound in `convert_into_tuple`
--> $DIR/suggest_tuple_wrap.rs:12:32
|

View file

@ -5,7 +5,7 @@ impl From<(u8,)> for Tuple {
todo!()
}
}
impl From<(u8, u8)> for Tuple {
impl From<(u8, u8)> for Tuple { //~ HELP the following other types implement trait `From<T>`
fn from(_: (u8, u8)) -> Self {
todo!()
}
@ -22,5 +22,4 @@ fn main() {
convert_into_tuple(42_u8);
//~^ ERROR E0277
//~| HELP use a unary tuple instead
//~| HELP the following other types implement trait `From<T>`
}

View file

@ -11,10 +11,17 @@ help: the trait `From<u8>` is not implemented for `Tuple`
|
LL | struct Tuple;
| ^^^^^^^^^^^^
= help: the following other types implement trait `From<T>`:
`Tuple` implements `From<(u8, u8)>`
`Tuple` implements `From<(u8, u8, u8)>`
`Tuple` implements `From<(u8,)>`
help: the following other types implement trait `From<T>`
--> $DIR/suggest_tuple_wrap_root_obligation.rs:3:1
|
LL | impl From<(u8,)> for Tuple {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `Tuple` implements `From<(u8,)>`
...
LL | impl From<(u8, u8)> for Tuple {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Tuple` implements `From<(u8, u8)>`
...
LL | impl From<(u8, u8, u8)> for Tuple {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Tuple` implements `From<(u8, u8, u8)>`
= note: required for `u8` to implement `Into<Tuple>`
note: required by a bound in `convert_into_tuple`
--> $DIR/suggest_tuple_wrap_root_obligation.rs:19:32

View file

@ -7,9 +7,12 @@ LL | vec![(), ()].iter().sum::<i32>();
| required by a bound introduced by this call
|
= help: the trait `Sum<&()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
`i32` implements `Sum<&i32>`
`i32` implements `Sum`
help: the following other types implement trait `Sum<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Sum<&i32>`
|
= note: `i32` implements `Sum`
note: the method call chain might not have had the expected associated types
--> $DIR/sum.rs:4:18
|
@ -19,6 +22,7 @@ LL | vec![(), ()].iter().sum::<i32>();
| this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: a value of type `i32` cannot be made by multiplying all elements of type `&()` from an iterator
--> $DIR/sum.rs:7:35
@ -29,9 +33,12 @@ LL | vec![(), ()].iter().product::<i32>();
| required by a bound introduced by this call
|
= help: the trait `Product<&()>` is not implemented for `i32`
= help: the following other types implement trait `Product<A>`:
`i32` implements `Product<&i32>`
`i32` implements `Product`
help: the following other types implement trait `Product<A>`
--> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
|
= note: `i32` implements `Product<&i32>`
|
= note: `i32` implements `Product`
note: the method call chain might not have had the expected associated types
--> $DIR/sum.rs:7:18
|
@ -41,6 +48,7 @@ LL | vec![(), ()].iter().product::<i32>();
| this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::product`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors

View file

@ -4,7 +4,11 @@ error[E0277]: the trait bound `&_: main::Ref` is not satisfied
LL | let (&_, b) = generic();
| ^^^^^^^^^ the trait `main::Ref` is not implemented for `&_`
|
= help: the trait `main::Ref` is implemented for `&'static mut [(); 0]`
help: the trait `main::Ref` is implemented for `&'static mut [(); 0]`
--> $DIR/trait-selection-sanity.rs:22:5
|
LL | impl Ref for &'static mut [(); 0] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `generic`
--> $DIR/trait-selection-sanity.rs:7:19
|

View file

@ -5,11 +5,17 @@ LL | foo(1 as u32 +
| ^ no implementation for `u32 + ()`
|
= help: the trait `Add<()>` is not implemented for `u32`
= help: the following other types implement trait `Add<Rhs>`:
`&u32` implements `Add<u32>`
`&u32` implements `Add`
`u32` implements `Add<&u32>`
`u32` implements `Add`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&u32` implements `Add<u32>`
|
= note: `&u32` implements `Add`
|
= note: `u32` implements `Add<&u32>`
|
= note: `u32` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 1 previous error

View file

@ -14,7 +14,11 @@ error[E0277]: the trait bound `u16: Assoc` is not satisfied
LL | impl Foo for <u16 as Assoc>::Output {}
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Assoc` is not implemented for `u16`
|
= help: the trait `Assoc` is implemented for `u8`
help: the trait `Assoc` is implemented for `u8`
--> $DIR/default-impl-normalization-ambig-2.rs:12:1
|
LL | impl Assoc for u8 {}
| ^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error; 1 warning emitted

View file

@ -14,7 +14,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | default type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `X::U`
--> $DIR/default-associated-type-bound-1.rs:8:13
|

View file

@ -7,9 +7,13 @@ LL | let _: u8 = s[4];
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `str` to implement `Index<{integer}>`
error[E0277]: the type `str` cannot be indexed by `{integer}`
@ -23,9 +27,13 @@ LL | let _ = s.get(4);
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
note: required by a bound in `core::str::<impl str>::get`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
@ -40,9 +48,13 @@ LL | let _ = s.get_unchecked(4);
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
note: required by a bound in `core::str::<impl str>::get_unchecked`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL

View file

@ -31,9 +31,13 @@ LL | s[1usize] = bot();
| ^^^^^^ string indices are ranges of `usize`
|
= help: the trait `SliceIndex<str>` is not implemented for `usize`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `str` to implement `Index<usize>`
error[E0277]: the type `str` cannot be indexed by `{integer}`
@ -47,9 +51,13 @@ LL | s.get_mut(1);
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
note: required by a bound in `core::str::<impl str>::get_mut`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
@ -64,9 +72,13 @@ LL | s.get_unchecked_mut(1);
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
note: required by a bound in `core::str::<impl str>::get_unchecked_mut`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL

View file

@ -27,7 +27,11 @@ help: the trait `Trait` is not implemented for `S`
|
LL | struct S;
| ^^^^^^^^
= help: the trait `Trait` is implemented for `&mut S`
help: the trait `Trait` is implemented for `&mut S`
--> $DIR/dont-suggest-borrowing-existing-borrow.rs:7:1
|
LL | impl Trait for &mut S {}
| ^^^^^^^^^^^^^^^^^^^^^
help: you likely meant to call the associated function `foo` for type `&mut S`, but the code as written calls associated function `foo` on type `S`
|
LL | let _ = <&mut S>::foo();
@ -44,7 +48,11 @@ help: the trait `Trait` is not implemented for `S`
|
LL | struct S;
| ^^^^^^^^
= help: the trait `Trait` is implemented for `&mut S`
help: the trait `Trait` is implemented for `&mut S`
--> $DIR/dont-suggest-borrowing-existing-borrow.rs:7:1
|
LL | impl Trait for &mut S {}
| ^^^^^^^^^^^^^^^^^^^^^
help: you likely meant to call the associated function `foo` for type `&S`, but the code as written calls associated function `foo` on type `S`
|
LL - let _ = &S::foo();
@ -73,9 +81,13 @@ help: the trait `Trait2` is not implemented for `S`
|
LL | struct S;
| ^^^^^^^^
= help: the following other types implement trait `Trait2`:
&S
&mut S
help: the following other types implement trait `Trait2`
--> $DIR/dont-suggest-borrowing-existing-borrow.rs:11:1
|
LL | impl Trait2 for &S {}
| ^^^^^^^^^^^^^^^^^^ `&S`
LL | impl Trait2 for &mut S {}
| ^^^^^^^^^^^^^^^^^^^^^^ `&mut S`
help: you likely meant to call the associated function `bar` for type `&mut S`, but the code as written calls associated function `bar` on type `S`
|
LL | let _ = <&mut S>::bar();
@ -92,9 +104,13 @@ help: the trait `Trait2` is not implemented for `S`
|
LL | struct S;
| ^^^^^^^^
= help: the following other types implement trait `Trait2`:
&S
&mut S
help: the following other types implement trait `Trait2`
--> $DIR/dont-suggest-borrowing-existing-borrow.rs:11:1
|
LL | impl Trait2 for &S {}
| ^^^^^^^^^^^^^^^^^^ `&S`
LL | impl Trait2 for &mut S {}
| ^^^^^^^^^^^^^^^^^^^^^^ `&mut S`
help: you likely meant to call the associated function `bar` for type `&S`, but the code as written calls associated function `bar` on type `S`
|
LL | let _ = <&S>::bar();

View file

@ -43,10 +43,16 @@ error[E0277]: the trait bound `i32: Marker` is not satisfied
LL | test5::<i32>();
| ^^^ the trait `Marker` is not implemented for `i32`
|
= help: the following other types implement trait `Marker`:
Baz
Option<u32>
Quux
help: the following other types implement trait `Marker`
--> $DIR/auxiliary/hidden-struct.rs:31:1
|
LL | impl Marker for Option<u32> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Option<u32>`
...
LL | impl Marker for Baz {}
| ^^^^^^^^^^^^^^^^^^^ `Baz`
LL | impl Marker for Quux {}
| ^^^^^^^^^^^^^^^^^^^^ `Quux`
note: required by a bound in `test5`
--> $DIR/dont-suggest-foreign-doc-hidden.rs:22:13
|

View file

@ -6,7 +6,11 @@ LL | foo::<S>(s);
| |
| required by a bound introduced by this call
|
= help: the trait `Trait` is implemented for `&mut S`
help: the trait `Trait` is implemented for `&mut S`
--> $DIR/imm-ref-trait-object-literal-bound-regions.rs:7:1
|
LL | impl<'a> Trait for &'a mut S {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `for<'b> Trait` is implemented for `&'b mut S`, but not for `&'b S`
note: required by a bound in `foo`
--> $DIR/imm-ref-trait-object-literal-bound-regions.rs:11:20

View file

@ -6,7 +6,11 @@ LL | foo(&s);
| |
| required by a bound introduced by this call
|
= help: the trait `Trait` is implemented for `&mut S`
help: the trait `Trait` is implemented for `&mut S`
--> $DIR/imm-ref-trait-object-literal.rs:5:1
|
LL | impl<'a> Trait for &'a mut S {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `foo`
--> $DIR/imm-ref-trait-object-literal.rs:7:11
|

View file

@ -5,6 +5,7 @@ impl Bar for i32 {}
struct Qux;
impl Bar for Qux {}
//~^ HELP the following other types implement trait `Bar`
fn foo() -> impl Bar {
//~^ ERROR the trait bound `(): Bar` is not satisfied
@ -14,7 +15,6 @@ fn foo() -> impl Bar {
fn bar() -> impl Bar {
//~^ ERROR the trait bound `(): Bar` is not satisfied
//~| HELP the following other types implement trait `Bar`:
"";
}

View file

@ -1,5 +1,5 @@
error[E0277]: the trait bound `(): Bar` is not satisfied
--> $DIR/impl-trait-return-trailing-semicolon.rs:9:13
--> $DIR/impl-trait-return-trailing-semicolon.rs:10:13
|
LL | fn foo() -> impl Bar {
| ^^^^^^^^ the trait `Bar` is not implemented for `()`
@ -10,14 +10,19 @@ LL | 5;
| this expression has type `{integer}`, which implements `Bar`
error[E0277]: the trait bound `(): Bar` is not satisfied
--> $DIR/impl-trait-return-trailing-semicolon.rs:15:13
--> $DIR/impl-trait-return-trailing-semicolon.rs:16:13
|
LL | fn bar() -> impl Bar {
| ^^^^^^^^ the trait `Bar` is not implemented for `()`
|
= help: the following other types implement trait `Bar`:
Qux
i32
help: the following other types implement trait `Bar`
--> $DIR/impl-trait-return-trailing-semicolon.rs:3:1
|
LL | impl Bar for i32 {}
| ^^^^^^^^^^^^^^^^ `i32`
...
LL | impl Bar for Qux {}
| ^^^^^^^^^^^^^^^^ `Qux`
error: aborting due to 2 previous errors

View file

@ -6,7 +6,8 @@ LL | foo(&mut bref);
| |
| required by a bound introduced by this call
|
= help: the trait `std::io::Write` is implemented for `&mut [u8]`
help: the trait `std::io::Write` is implemented for `&mut [u8]`
--> $SRC_DIR/std/src/io/impls.rs:LL:COL
note: required by a bound in `foo`
--> $DIR/issue-105645.rs:8:21
|

View file

@ -6,7 +6,11 @@ LL | bar(a);
| |
| required by a bound introduced by this call
|
= help: the trait `Tr` is implemented for `&f32`
help: the trait `Tr` is implemented for `&f32`
--> $DIR/issue-84973-negative.rs:4:1
|
LL | impl Tr for &f32 {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `bar`
--> $DIR/issue-84973-negative.rs:5:11
|

View file

@ -11,7 +11,11 @@ help: the trait `for<'de> Foo<'_>` is not implemented for `EmptyBis<'de>`
|
LL | pub struct EmptyBis<'a>(&'a [u8]);
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: the trait `Foo<'de>` is implemented for `Baz<T>`
help: the trait `Foo<'de>` is implemented for `Baz<T>`
--> $DIR/issue-96223.rs:16:1
|
LL | impl<'de, T> Foo<'de> for Baz<T> where T: Foo<'de> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required for `Baz<EmptyBis<'de>>` to implement `for<'de> Foo<'de>`
--> $DIR/issue-96223.rs:16:14
|

View file

@ -6,9 +6,16 @@ LL | needs_meow(1usize);
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `Meow`:
GlobalMeow
LocalMeow
help: the following other types implement trait `Meow`
--> $DIR/issue-99080.rs:16:1
|
LL | impl Meow for LocalMeow {}
| ^^^^^^^^^^^^^^^^^^^^^^^ `LocalMeow`
|
::: $DIR/auxiliary/meow.rs:7:1
|
LL | impl Meow for GlobalMeow {}
| ^^^^^^^^^^^^^^^^^^^^^^^^ `GlobalMeow`
note: required by a bound in `needs_meow`
--> $DIR/issue-99080.rs:7:18
|

View file

@ -5,9 +5,13 @@ LL | let one_item_please: i32 = [1, 2, 3][i];
| ^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[{integer}]>` is not implemented for `&usize`
= help: the following other types implement trait `SliceIndex<T>`:
`usize` implements `SliceIndex<ByteStr>`
`usize` implements `SliceIndex<[T]>`
help: the following other types implement trait `SliceIndex<T>`
--> $SRC_DIR/core/src/slice/index.rs:LL:COL
|
= note: `usize` implements `SliceIndex<[T]>`
--> $SRC_DIR/core/src/bstr/traits.rs:LL:COL
|
= note: `usize` implements `SliceIndex<ByteStr>`
= note: required for `[{integer}]` to implement `Index<&usize>`
= note: 1 redundant requirement hidden
= note: required for `[{integer}; 3]` to implement `Index<&usize>`

View file

@ -4,7 +4,8 @@ error[E0277]: the trait bound `[bool]: Copy` is not satisfied
LL | const MYSLICE_GOOD: &MySliceBool = &MySlice(true, [false]);
| ^^^^^^^^^^^ the trait `Copy` is not implemented for `[bool]`
|
= help: the trait `Copy` is implemented for `[T; N]`
help: the trait `Copy` is implemented for `[T; N]`
--> $SRC_DIR/core/src/array/mod.rs:LL:COL
note: required by a bound in `MySlice`
--> $DIR/ice-unsized-struct-arg-issue2-121424.rs:3:19
|
@ -17,7 +18,8 @@ error[E0277]: the trait bound `[bool]: Copy` is not satisfied
LL | const MYSLICE_GOOD: &MySliceBool = &MySlice(true, [false]);
| ^^^^^^^^^^^ the trait `Copy` is not implemented for `[bool]`
|
= help: the trait `Copy` is implemented for `[T; N]`
help: the trait `Copy` is implemented for `[T; N]`
--> $SRC_DIR/core/src/array/mod.rs:LL:COL
note: required by a bound in `MySlice`
--> $DIR/ice-unsized-struct-arg-issue2-121424.rs:3:19
|

View file

@ -4,7 +4,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | f::<dyn X<Y = str>>();
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `f`
--> $DIR/check-trait-object-bounds-1.rs:7:9
|

View file

@ -4,7 +4,8 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
LL | f::<dyn X<Y = str>>();
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
help: the trait `Clone` is implemented for `String`
--> $SRC_DIR/alloc/src/string.rs:LL:COL
note: required by a bound in `f`
--> $DIR/check-trait-object-bounds-4.rs:10:9
|

View file

@ -12,7 +12,11 @@ help: trait impl with same name found
LL | impl Bar for Foo {}
| ^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `crate_a2` are being used?
= help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
--> $DIR/auxiliary/crate_a1.rs:9:1
|
LL | impl Bar for ImplementsTraitForUsize<usize> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `try_foo`
--> $DIR/auxiliary/crate_a1.rs:3:24
|
@ -27,7 +31,11 @@ LL | a::try_foo(implements_no_traits);
| |
| required by a bound introduced by this call
|
= help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
--> $DIR/auxiliary/crate_a1.rs:9:1
|
LL | impl Bar for ImplementsTraitForUsize<usize> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `try_foo`
--> $DIR/auxiliary/crate_a1.rs:3:24
|
@ -48,7 +56,11 @@ help: trait impl with same name found
LL | impl Bar for ImplementsWrongTraitConditionally<isize> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `crate_a2` are being used?
= help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
--> $DIR/auxiliary/crate_a1.rs:9:1
|
LL | impl Bar for ImplementsTraitForUsize<usize> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `try_foo`
--> $DIR/auxiliary/crate_a1.rs:3:24
|
@ -63,7 +75,11 @@ LL | a::try_foo(other_variant_implements_correct_trait);
| |
| required by a bound introduced by this call
|
= help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
--> $DIR/auxiliary/crate_a1.rs:9:1
|
LL | impl Bar for ImplementsTraitForUsize<usize> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `try_foo`
--> $DIR/auxiliary/crate_a1.rs:3:24
|

View file

@ -9,7 +9,11 @@ help: the trait `bounds_check::LeakTr` is not implemented for `NonLeakS`
|
LL | struct NonLeakS;
| ^^^^^^^^^^^^^^^
= help: the trait `bounds_check::LeakTr` is implemented for `LeakS`
help: the trait `bounds_check::LeakTr` is implemented for `LeakS`
--> $DIR/maybe-bounds-in-dyn-traits.rs:62:5
|
LL | impl LeakTr for LeakS {}
| ^^^^^^^^^^^^^^^^^^^^^
= note: required for the cast from `&NonLeakS` to `&dyn bounds_check::LeakTr + Leak`
error[E0038]: the trait `DynCompatCheck2` is not dyn compatible

View file

@ -25,7 +25,11 @@ LL | takes(|_: Argument| -> Return { todo!() });
| required by a bound introduced by this call
|
= help: the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:16:11: 16:34}`
= help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`
help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:9:1
|
LL | impl Trait for fn(Argument) -> Return {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `takes`
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:11:18
|

View file

@ -6,9 +6,14 @@ LL | c.same_as(22)
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `CompareTo<T>`:
`i64` implements `CompareTo<i64>`
`i64` implements `CompareTo<u64>`
help: the following other types implement trait `CompareTo<T>`
--> $DIR/repeated-supertrait-ambig.rs:15:1
|
LL | impl CompareTo<i64> for i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `i64` implements `CompareTo<i64>`
...
LL | impl CompareTo<u64> for i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `i64` implements `CompareTo<u64>`
error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
--> $DIR/repeated-supertrait-ambig.rs:30:15
@ -29,9 +34,14 @@ error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfi
LL | <dyn CompareToInts>::same_as(c, 22)
| ^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
|
= help: the following other types implement trait `CompareTo<T>`:
`i64` implements `CompareTo<i64>`
`i64` implements `CompareTo<u64>`
help: the following other types implement trait `CompareTo<T>`
--> $DIR/repeated-supertrait-ambig.rs:15:1
|
LL | impl CompareTo<i64> for i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `i64` implements `CompareTo<i64>`
...
LL | impl CompareTo<u64> for i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `i64` implements `CompareTo<u64>`
error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
--> $DIR/repeated-supertrait-ambig.rs:38:24
@ -54,9 +64,14 @@ LL | assert_eq!(22_i64.same_as(22), true);
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `CompareTo<T>`:
`i64` implements `CompareTo<i64>`
`i64` implements `CompareTo<u64>`
help: the following other types implement trait `CompareTo<T>`
--> $DIR/repeated-supertrait-ambig.rs:15:1
|
LL | impl CompareTo<i64> for i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `i64` implements `CompareTo<i64>`
...
LL | impl CompareTo<u64> for i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `i64` implements `CompareTo<u64>`
error: aborting due to 5 previous errors

View file

@ -7,7 +7,8 @@ LL | struct Foo<'a, T> {
LL | bar: &'a mut T
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `&mut T`
|
= help: the trait `Clone` is implemented for `&T`
help: the trait `Clone` is implemented for `&T`
--> $SRC_DIR/core/src/clone.rs:LL:COL
= note: `Clone` is implemented for `&T`, but not for `&mut T`
error: aborting due to 1 previous error

Some files were not shown because too many files have changed in this diff Show more