Auto merge of #145640 - estebank:point-at-impl-e0277, r=nnethercote
When a trait isn't implemented, but another similar impl is found, point at it
```
error[E0277]: the trait bound `u32: Trait` is not satisfied
--> $DIR/trait_objects_fail.rs:26:9
|
LL | foo(&10_u32);
| ^^^^^^^ the trait `Trait` is not implemented for `u32`
|
help: the trait `Trait<12>` is not implemented for `u32`
but trait `Trait<2>` is implemented for it
--> $DIR/trait_objects_fail.rs:7:1
|
LL | impl Trait<2> for u32 {}
| ^^^^^^^^^^^^^^^^^^^^^
= note: required for the cast from `&u32` to `&dyn Trait`
```
Pointing at the `impl` definition that *could* apply given a different self type is *particularly* useful when it has a blanket self type, as it might not be obvious and is not trivially greppable:
```
error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
--> $DIR/issue-62742.rs:4:5
|
LL | WrongImpl::foo(0i32);
| ^^^^^^^^^ unsatisfied trait bound
|
help: the trait `Raw<_>` is not implemented for `RawImpl<_>`
but trait `Raw<[_]>` is implemented for it
--> $DIR/issue-62742.rs:29:1
|
LL | impl<T> Raw<[T]> for RawImpl<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `SafeImpl`
--> $DIR/issue-62742.rs:33:35
|
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
| ^^^^^^ required by this bound in `SafeImpl`
```
This commit is contained in:
commit
bd3ac03300
159 changed files with 1795 additions and 656 deletions
|
|
@ -1523,16 +1523,17 @@ impl HumanEmitter {
|
|||
label_width += 2;
|
||||
}
|
||||
let mut line = 0;
|
||||
let mut pad = false;
|
||||
for (text, style) in msgs.iter() {
|
||||
let text =
|
||||
self.translator.translate_message(text, args).map_err(Report::new).unwrap();
|
||||
// Account for newlines to align output to its label.
|
||||
for text in normalize_whitespace(&text).lines() {
|
||||
for text in normalize_whitespace(&text).split('\n') {
|
||||
buffer.append(
|
||||
line,
|
||||
&format!(
|
||||
"{}{}",
|
||||
if line == 0 { String::new() } else { " ".repeat(label_width) },
|
||||
if pad { " ".repeat(label_width) } else { String::new() },
|
||||
text
|
||||
),
|
||||
match style {
|
||||
|
|
@ -1541,7 +1542,9 @@ impl HumanEmitter {
|
|||
},
|
||||
);
|
||||
line += 1;
|
||||
pad = true;
|
||||
}
|
||||
pad = false;
|
||||
// We add lines above, but if the last line has no explicit newline (which would
|
||||
// yield an empty line), then we revert one line up to continue with the next
|
||||
// styled text chunk on the same line as the last one from the prior one. Otherwise
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// ignore-tidy-filelength
|
||||
use core::ops::ControlFlow;
|
||||
use std::borrow::Cow;
|
||||
use std::path::PathBuf;
|
||||
|
|
@ -1906,13 +1907,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| {
|
||||
(header.polarity != ty::ImplPolarity::Negative
|
||||
.map(|def_id| (self.tcx.impl_trait_header(def_id), def_id))
|
||||
.filter_map(|(header, def_id)| {
|
||||
(header.polarity == ty::ImplPolarity::Positive
|
||||
|| 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 +1945,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 +1973,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 +2005,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)
|
||||
|
|
@ -2191,7 +2192,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
msg.extend(types.1.0);
|
||||
msg.push(StringPart::normal("`"));
|
||||
}
|
||||
err.highlighted_help(msg);
|
||||
err.highlighted_span_help(self.tcx.def_span(single.impl_def_id), msg);
|
||||
|
||||
if let [TypeError::Sorts(exp_found)] = &terrs[..] {
|
||||
let exp_found = self.resolve_vars_if_possible(*exp_found);
|
||||
|
|
@ -2217,12 +2218,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 +2239,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 +2381,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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
//@ revisions: u w
|
||||
//@[u] only-unix
|
||||
//@[w] only-windows
|
||||
#[global_allocator]
|
||||
static A: usize = 0;
|
||||
//~^ ERROR E0277
|
||||
|
|
|
|||
|
|
@ -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
|
||||
50
tests/ui/allocator/not-an-allocator.w.stderr
Normal file
50
tests/ui/allocator/not-an-allocator.w.stderr
Normal 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`.
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ error[E0277]: the trait bound `u16: Bar<N>` is not satisfied
|
|||
LL | type Assoc = u16;
|
||||
| ^^^ the trait `Bar<N>` is not implemented for `u16`
|
||||
|
|
||||
= help: the trait `Bar<N>` is not implemented for `u16`
|
||||
but trait `Bar<3>` is implemented for it
|
||||
help: the trait `Bar<N>` is not implemented for `u16`
|
||||
but trait `Bar<3>` is implemented for it
|
||||
--> $DIR/associated-type-bound-fail.rs:7:1
|
||||
|
|
||||
LL | impl Bar<3> for u16 {}
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `Foo::Assoc`
|
||||
--> $DIR/associated-type-bound-fail.rs:4:17
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -23,8 +27,12 @@ LL |
|
|||
LL | 1_u32
|
||||
| ----- return type was inferred to be `u32` here
|
||||
|
|
||||
= help: the trait `Traitor<N, N>` is not implemented for `u32`
|
||||
but trait `Traitor<N, 2>` is implemented for it
|
||||
help: the trait `Traitor<N, N>` is not implemented for `u32`
|
||||
but trait `Traitor<N, 2>` is implemented for it
|
||||
--> $DIR/rp_impl_trait_fail.rs:13:1
|
||||
|
|
||||
LL | impl<const N: u8> Traitor<N, 2> for u32 {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `u64: Traitor` is not satisfied
|
||||
--> $DIR/rp_impl_trait_fail.rs:21:13
|
||||
|
|
@ -35,8 +43,12 @@ LL |
|
|||
LL | 1_u64
|
||||
| ----- return type was inferred to be `u64` here
|
||||
|
|
||||
= help: the trait `Traitor<1, 1>` is not implemented for `u64`
|
||||
but trait `Traitor<1, 2>` is implemented for it
|
||||
help: the trait `Traitor<1, 1>` is not implemented for `u64`
|
||||
but trait `Traitor<1, 2>` is implemented for it
|
||||
--> $DIR/rp_impl_trait_fail.rs:14:1
|
||||
|
|
||||
LL | impl Traitor<1, 2> for u64 {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0284]: type annotations needed
|
||||
--> $DIR/rp_impl_trait_fail.rs:28:5
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ error[E0277]: the trait bound `u32: Trait` is not satisfied
|
|||
LL | foo(&10_u32);
|
||||
| ^^^^^^^ the trait `Trait` is not implemented for `u32`
|
||||
|
|
||||
= help: the trait `Trait<12>` is not implemented for `u32`
|
||||
but trait `Trait<2>` is implemented for it
|
||||
help: the trait `Trait<12>` is not implemented for `u32`
|
||||
but trait `Trait<2>` is implemented for it
|
||||
--> $DIR/trait_objects_fail.rs:7:1
|
||||
|
|
||||
LL | impl Trait<2> for u32 {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: required for the cast from `&u32` to `&dyn Trait`
|
||||
|
||||
error[E0277]: the trait bound `bool: Traitor<_>` is not satisfied
|
||||
|
|
@ -14,8 +18,12 @@ error[E0277]: the trait bound `bool: Traitor<_>` is not satisfied
|
|||
LL | bar(&true);
|
||||
| ^^^^^ the trait `Traitor<_>` is not implemented for `bool`
|
||||
|
|
||||
= help: the trait `Traitor<_, _>` is not implemented for `bool`
|
||||
but trait `Traitor<2, 3>` is implemented for it
|
||||
help: the trait `Traitor<_, _>` is not implemented for `bool`
|
||||
but trait `Traitor<2, 3>` is implemented for it
|
||||
--> $DIR/trait_objects_fail.rs:19:1
|
||||
|
|
||||
LL | impl Traitor<2, 3> for bool {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: required for the cast from `&bool` to `&dyn Traitor<_>`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
|||
|
|
@ -10,8 +10,12 @@ error[E0277]: the trait bound `(): Trait<2>` is not satisfied
|
|||
LL | (): Trait<N>;
|
||||
| ^^^^^^^^ the trait `Trait<2>` is not implemented for `()`
|
||||
|
|
||||
= help: the trait `Trait<2>` is not implemented for `()`
|
||||
but trait `Trait<3>` is implemented for it
|
||||
help: the trait `Trait<2>` is not implemented for `()`
|
||||
but trait `Trait<3>` is implemented for it
|
||||
--> $DIR/wfness.rs:5:1
|
||||
|
|
||||
LL | impl Trait<3> for () {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `WhereClause`
|
||||
--> $DIR/wfness.rs:8:9
|
||||
|
|
||||
|
|
@ -27,8 +31,12 @@ error[E0277]: the trait bound `(): Trait<1>` is not satisfied
|
|||
LL | fn foo() -> DependentDefaultWfness {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<1>` is not implemented for `()`
|
||||
|
|
||||
= help: the trait `Trait<1>` is not implemented for `()`
|
||||
but trait `Trait<3>` is implemented for it
|
||||
help: the trait `Trait<1>` is not implemented for `()`
|
||||
but trait `Trait<3>` is implemented for it
|
||||
--> $DIR/wfness.rs:5:1
|
||||
|
|
||||
LL | impl Trait<3> for () {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `WhereClause`
|
||||
--> $DIR/wfness.rs:8:9
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ error[E0277]: the trait bound `A<_>: Bar<_>` is not satisfied
|
|||
LL | let _ = A;
|
||||
| ^ unsatisfied trait bound
|
||||
|
|
||||
= help: the trait `Bar<_>` is not implemented for `A<_>`
|
||||
but it is implemented for `A<{ 6 + 1 }>`
|
||||
help: the trait `Bar<_>` is not implemented for `A<_>`
|
||||
but it is implemented for `A<{ 6 + 1 }>`
|
||||
--> $DIR/unused-substs-1.rs:5:1
|
||||
|
|
||||
LL | impl<const N: usize> Bar<N> for A<{ 6 + 1 }> {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `A`
|
||||
--> $DIR/unused-substs-1.rs:9:11
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ error[E0277]: the trait bound `&str: AsExpression<Integer>` is not satisfied
|
|||
LL | SelectInt.check("bar");
|
||||
| ^^^^^ the trait `AsExpression<Integer>` is not implemented for `&str`
|
||||
|
|
||||
= help: the trait `AsExpression<Integer>` is not implemented for `&str`
|
||||
but trait `AsExpression<Text>` is implemented for it
|
||||
help: the trait `AsExpression<Integer>` is not implemented for `&str`
|
||||
but trait `AsExpression<Text>` is implemented for it
|
||||
--> $DIR/as_expression.rs:40:1
|
||||
|
|
||||
LL | impl AsExpression<Text> for &'_ str {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `Text`, found `Integer`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
|
|
|||
|
|
@ -6,8 +6,12 @@ LL | SelectInt.check("bar");
|
|||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `AsExpression<Integer>` is not implemented for `&str`
|
||||
but trait `AsExpression<Text>` is implemented for it
|
||||
help: the trait `AsExpression<Integer>` is not implemented for `&str`
|
||||
but trait `AsExpression<Text>` is implemented for it
|
||||
--> $DIR/as_expression.rs:40:1
|
||||
|
|
||||
LL | impl AsExpression<Text> for &'_ str {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `Text`, found `Integer`
|
||||
note: required by a bound in `Foo::check`
|
||||
--> $DIR/as_expression.rs:47:12
|
||||
|
|
@ -24,8 +28,12 @@ error[E0277]: the trait bound `&str: AsExpression<Integer>` is not satisfied
|
|||
LL | SelectInt.check("bar");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `AsExpression<Integer>` is not implemented for `&str`
|
||||
|
|
||||
= help: the trait `AsExpression<Integer>` is not implemented for `&str`
|
||||
but trait `AsExpression<Text>` is implemented for it
|
||||
help: the trait `AsExpression<Integer>` is not implemented for `&str`
|
||||
but trait `AsExpression<Text>` is implemented for it
|
||||
--> $DIR/as_expression.rs:40:1
|
||||
|
|
||||
LL | impl AsExpression<Text> for &'_ str {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `Text`, found `Integer`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ error[E0277]: a value of type `Vec<(&str, fn())>` cannot be built from an iterat
|
|||
LL | let _: Vec<(&str, fn())> = [("foo", foo)].into_iter().collect();
|
||||
| ^^^^^^^ value of type `Vec<(&str, fn())>` cannot be built from `std::iter::Iterator<Item=(&str, fn() {foo})>`
|
||||
|
|
||||
= help: the trait `FromIterator<(&_, fn() {foo})>` is not implemented for `Vec<(&str, fn())>`
|
||||
but trait `FromIterator<(&_, fn())>` is implemented for it
|
||||
help: the trait `FromIterator<(&_, fn() {foo})>` is not implemented for `Vec<(&str, fn())>`
|
||||
but trait `FromIterator<(&_, fn())>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `fn()`, found `fn() {foo}`
|
||||
= note: fn items are distinct from fn pointers
|
||||
= help: consider casting the fn item to a fn pointer: `foo as fn()`
|
||||
|
|
@ -25,8 +26,9 @@ error[E0277]: a value of type `Vec<fn()>` cannot be built from an iterator over
|
|||
LL | let _: Vec<fn()> = [foo].into_iter().collect();
|
||||
| ^^^^^^^ value of type `Vec<fn()>` cannot be built from `std::iter::Iterator<Item=fn() {foo}>`
|
||||
|
|
||||
= help: the trait `FromIterator<fn() {foo}>` is not implemented for `Vec<fn()>`
|
||||
but trait `FromIterator<fn()>` is implemented for it
|
||||
help: the trait `FromIterator<fn() {foo}>` is not implemented for `Vec<fn()>`
|
||||
but trait `FromIterator<fn()>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `fn()`, found `fn() {foo}`
|
||||
= note: fn items are distinct from fn pointers
|
||||
= help: consider casting the fn item to a fn pointer: `foo as fn()`
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ error[E0277]: the trait bound `Infallible: From<()>` is not satisfied
|
|||
LL | let () = K::<()>;
|
||||
| ^^ the trait `From<()>` is not implemented for `Infallible`
|
||||
|
|
||||
= help: the trait `From<()>` is not implemented for `Infallible`
|
||||
but trait `From<!>` is implemented for it
|
||||
help: the trait `From<()>` is not implemented for `Infallible`
|
||||
but trait `From<!>` is implemented for it
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `!`, found `()`
|
||||
note: required by a bound in `K`
|
||||
--> $DIR/unsatisfied-bounds.rs:12:17
|
||||
|
|
@ -49,8 +50,9 @@ error[E0277]: the trait bound `Infallible: From<()>` is not satisfied
|
|||
LL | let _ = <() as Trait<&'static str>>::B::<()>;
|
||||
| ^^ the trait `From<()>` is not implemented for `Infallible`
|
||||
|
|
||||
= help: the trait `From<()>` is not implemented for `Infallible`
|
||||
but trait `From<!>` is implemented for it
|
||||
help: the trait `From<()>` is not implemented for `Infallible`
|
||||
but trait `From<!>` is implemented for it
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `!`, found `()`
|
||||
note: required by a bound in `Trait::B`
|
||||
--> $DIR/unsatisfied-bounds.rs:21:21
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<svg width="1096px" height="398px" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg width="1188px" height="470px" xmlns="http://www.w3.org/2000/svg">
|
||||
<style>
|
||||
.fg { fill: #AAAAAA }
|
||||
.bg { fill: #000000 }
|
||||
.fg-bright-blue { fill: #5555FF }
|
||||
.fg-bright-cyan { fill: #55FFFF }
|
||||
.fg-bright-green { fill: #55FF55 }
|
||||
.fg-bright-red { fill: #FF5555 }
|
||||
.fg-magenta { fill: #AA00AA }
|
||||
|
|
@ -37,31 +38,39 @@
|
|||
</tspan>
|
||||
<tspan x="10px" y="154px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="172px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Bar<</tspan><tspan class="fg-magenta bold">i32</tspan><tspan>>` </tspan><tspan class="fg-magenta bold">is not</tspan><tspan> implemented for `Struct`</tspan>
|
||||
<tspan x="10px" y="172px"><tspan class="fg-bright-cyan bold">help</tspan><tspan>: the trait `Bar<</tspan><tspan class="fg-magenta bold">i32</tspan><tspan>>` </tspan><tspan class="fg-magenta bold">is not</tspan><tspan> implemented for `Struct`</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="190px"><tspan> but trait `Bar<</tspan><tspan class="fg-magenta bold">()</tspan><tspan>>` </tspan><tspan class="fg-magenta bold">is</tspan><tspan> implemented for it</tspan>
|
||||
<tspan x="10px" y="190px"><tspan> but trait `Bar<</tspan><tspan class="fg-magenta bold">()</tspan><tspan>>` </tspan><tspan class="fg-magenta bold">is</tspan><tspan> implemented for it</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="208px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: for that trait implementation, expected `</tspan><tspan class="fg-magenta bold">()</tspan><tspan>`, found `</tspan><tspan class="fg-magenta bold">i32</tspan><tspan>`</tspan>
|
||||
<tspan x="10px" y="208px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/highlight-difference-between-expected-trait-and-found-trait.rs:13:1</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="226px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required for `Struct` to implement `Foo<i32>`</tspan>
|
||||
<tspan x="10px" y="226px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="244px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/highlight-difference-between-expected-trait-and-found-trait.rs:10:12</tspan>
|
||||
<tspan x="10px" y="244px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> impl<'a> Bar<()> for Struct {}</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="262px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
|
||||
<tspan x="10px" y="262px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-cyan bold">^^^^^^^^^^^^^^^^^^^^^^^^^^^</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="280px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> impl<T, K> Foo<K> for T where T: Bar<K></tspan>
|
||||
<tspan x="10px" y="280px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: for that trait implementation, expected `</tspan><tspan class="fg-magenta bold">()</tspan><tspan>`, found `</tspan><tspan class="fg-magenta bold">i32</tspan><tspan>`</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="298px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-green bold">^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-green bold">^</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">------</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">unsatisfied trait bound introduced here</tspan>
|
||||
<tspan x="10px" y="298px"><tspan class="fg-bright-green bold">note</tspan><tspan>: required for `Struct` to implement `Foo<i32>`</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="316px">
|
||||
<tspan x="10px" y="316px"><tspan> </tspan><tspan class="fg-bright-blue bold">--> </tspan><tspan>$DIR/highlight-difference-between-expected-trait-and-found-trait.rs:10:12</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="334px"><tspan class="fg-bright-red bold">error</tspan><tspan class="bold">: aborting due to 1 previous error</tspan>
|
||||
<tspan x="10px" y="334px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="352px">
|
||||
<tspan x="10px" y="352px"><tspan class="fg-bright-blue bold">LL</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> impl<T, K> Foo<K> for T where T: Bar<K></tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="370px"><tspan class="bold">For more information about this error, try `rustc --explain E0277`.</tspan>
|
||||
<tspan x="10px" y="370px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-green bold">^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-green bold">^</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">------</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">unsatisfied trait bound introduced here</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="388px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="406px"><tspan class="fg-bright-red bold">error</tspan><tspan class="bold">: aborting due to 1 previous error</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="424px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="442px"><tspan class="bold">For more information about this error, try `rustc --explain E0277`.</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="460px">
|
||||
</tspan>
|
||||
</text>
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 5.1 KiB |
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
@ -29,8 +33,12 @@ LL | fn foo<F2: Foo<u8>>(self) -> impl Foo<u8> {
|
|||
LL | self
|
||||
| ---- return type was inferred to be `Bar` here
|
||||
|
|
||||
= help: the trait `Foo<u8>` is not implemented for `Bar`
|
||||
but trait `Foo<char>` is implemented for it
|
||||
help: the trait `Foo<u8>` is not implemented for `Bar`
|
||||
but trait `Foo<char>` is implemented for it
|
||||
--> $DIR/return-dont-satisfy-bounds.rs:7:1
|
||||
|
|
||||
LL | impl Foo<char> for Bar {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `char`, found `u8`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
|
|||
LL | WrongImpl::foo(0i32);
|
||||
| ^^^^^^^^^ unsatisfied trait bound
|
||||
|
|
||||
= help: the trait `Raw<_>` is not implemented for `RawImpl<_>`
|
||||
but trait `Raw<[_]>` is implemented for it
|
||||
help: the trait `Raw<_>` is not implemented for `RawImpl<_>`
|
||||
but trait `Raw<[_]>` is implemented for it
|
||||
--> $DIR/issue-62742.rs:29:1
|
||||
|
|
||||
LL | impl<T> Raw<[T]> for RawImpl<T> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `SafeImpl`
|
||||
--> $DIR/issue-62742.rs:33:35
|
||||
|
|
||||
|
|
@ -43,8 +47,12 @@ error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied
|
|||
LL | WrongImpl::<()>::foo(0i32);
|
||||
| ^^^^^^^^^^^^^^^ unsatisfied trait bound
|
||||
|
|
||||
= help: the trait `Raw<()>` is not implemented for `RawImpl<()>`
|
||||
but trait `Raw<[()]>` is implemented for it
|
||||
help: the trait `Raw<()>` is not implemented for `RawImpl<()>`
|
||||
but trait `Raw<[()]>` is implemented for it
|
||||
--> $DIR/issue-62742.rs:29:1
|
||||
|
|
||||
LL | impl<T> Raw<[T]> for RawImpl<T> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `[()]`, found `()`
|
||||
note: required by a bound in `SafeImpl`
|
||||
--> $DIR/issue-62742.rs:33:35
|
||||
|
|
|
|||
|
|
@ -83,8 +83,12 @@ error[E0277]: the trait bound `for<'a> &'a (): Qux<'b>` is not satisfied
|
|||
LL | fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {}
|
||||
| ^^^^^^^^^^^^ the trait `for<'a> Qux<'b>` is not implemented for `&'a ()`
|
||||
|
|
||||
= help: the trait `Qux<'b>` is not implemented for `&'a ()`
|
||||
but trait `Qux<'_>` is implemented for `()`
|
||||
help: the trait `Qux<'b>` is not implemented for `&'a ()`
|
||||
but trait `Qux<'_>` is implemented for `()`
|
||||
--> $DIR/nested-rpit-hrtb.rs:22:1
|
||||
|
|
||||
LL | impl Qux<'_> for () {}
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `()`, found `&'a ()`
|
||||
|
||||
error: implementation of `Bar` is not general enough
|
||||
|
|
@ -102,8 +106,12 @@ error[E0277]: the trait bound `for<'a, 'b> &'a (): Qux<'b>` is not satisfied
|
|||
LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Qux<'b>` is not implemented for `&'a ()`
|
||||
|
|
||||
= help: the trait `Qux<'b>` is not implemented for `&'a ()`
|
||||
but trait `Qux<'_>` is implemented for `()`
|
||||
help: the trait `Qux<'b>` is not implemented for `&'a ()`
|
||||
but trait `Qux<'_>` is implemented for `()`
|
||||
--> $DIR/nested-rpit-hrtb.rs:22:1
|
||||
|
|
||||
LL | impl Qux<'_> for () {}
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `()`, found `&'a ()`
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ error[E0277]: the trait bound `String: Trait<u32>` is not satisfied
|
|||
LL | impls_trait(x);
|
||||
| ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
|
||||
|
|
||||
= help: the trait `Trait<u32>` is not implemented for `String`
|
||||
but trait `Trait<u64>` is implemented for it
|
||||
help: the trait `Trait<u32>` is not implemented for `String`
|
||||
but trait `Trait<u64>` is implemented for it
|
||||
--> $DIR/avoid-inference-constraints-from-blanket-3.rs:17:1
|
||||
|
|
||||
LL | impl Trait<u64> for String {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `u64`, found `u32`
|
||||
note: required for `String` to implement `Trait<u32>`
|
||||
--> $DIR/avoid-inference-constraints-from-blanket-3.rs:16:15
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>`
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ error[E0277]: the trait bound `String: Borrow<&str>` is not satisfied
|
|||
LL | &s
|
||||
| ^^ the trait `Borrow<&str>` is not implemented for `String`
|
||||
|
|
||||
= help: the trait `Borrow<&_>` is not implemented for `String`
|
||||
but trait `Borrow<_>` is implemented for it
|
||||
help: the trait `Borrow<&_>` is not implemented for `String`
|
||||
but trait `Borrow<_>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/str.rs:LL:COL
|
||||
= help: for that trait implementation, expected `str`, found `&str`
|
||||
= note: required for `HashMap<String, String>` to implement `Index<&&str>`
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ error[E0277]: a value of type `Vec<(u32, _, _)>` cannot be built from an iterato
|
|||
LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect();
|
||||
| ^^^^^^^ value of type `Vec<(u32, _, _)>` cannot be built from `std::iter::Iterator<Item=()>`
|
||||
|
|
||||
= help: the trait `FromIterator<()>` is not implemented for `Vec<(u32, _, _)>`
|
||||
but trait `FromIterator<(u32, _, _)>` is implemented for it
|
||||
help: the trait `FromIterator<()>` is not implemented for `Vec<(u32, _, _)>`
|
||||
but trait `FromIterator<(u32, _, _)>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `(u32, _, _)`, found `()`
|
||||
note: the method call chain might not have had the expected associated types
|
||||
--> $DIR/issue-34334.rs:5:43
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ error[E0277]: the trait bound `Params: Plugin<i32>` is not satisfied
|
|||
LL | req.get_ref::<Params>();
|
||||
| ^^^^^^^ unsatisfied trait bound
|
||||
|
|
||||
= help: the trait `Plugin<i32>` is not implemented for `Params`
|
||||
but trait `Plugin<Foo>` is implemented for it
|
||||
help: the trait `Plugin<i32>` is not implemented for `Params`
|
||||
but trait `Plugin<Foo>` is implemented for it
|
||||
--> $DIR/issue-45801.rs:14:1
|
||||
|
|
||||
LL | impl Plugin<Foo> for Params {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `Foo`, found `i32`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ LL | let i = i.map(|x| x.clone());
|
|||
LL | i.collect()
|
||||
| ^^^^^^^ value of type `Vec<X>` cannot be built from `std::iter::Iterator<Item=&X>`
|
||||
|
|
||||
= help: the trait `FromIterator<&_>` is not implemented for `Vec<X>`
|
||||
but trait `FromIterator<_>` is implemented for it
|
||||
help: the trait `FromIterator<&_>` is not implemented for `Vec<X>`
|
||||
but trait `FromIterator<_>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `X`, found `&X`
|
||||
note: the method call chain might not have had the expected associated types
|
||||
--> $DIR/invalid-iterator-chain-fixable.rs:5:26
|
||||
|
|
@ -32,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
|
||||
|
|
||||
|
|
@ -50,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;
|
||||
|
|
@ -65,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
|
||||
|
|
||||
|
|
@ -83,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; })
|
||||
|
|
@ -98,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
|
||||
|
|
||||
|
|
@ -111,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>());
|
||||
|
|
@ -123,8 +136,9 @@ error[E0277]: a value of type `Vec<i32>` cannot be built from an iterator over e
|
|||
LL | let g: Vec<i32> = f.collect();
|
||||
| ^^^^^^^ value of type `Vec<i32>` cannot be built from `std::iter::Iterator<Item=()>`
|
||||
|
|
||||
= help: the trait `FromIterator<()>` is not implemented for `Vec<i32>`
|
||||
but trait `FromIterator<i32>` is implemented for it
|
||||
help: the trait `FromIterator<()>` is not implemented for `Vec<i32>`
|
||||
but trait `FromIterator<i32>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `i32`, found `()`
|
||||
note: the method call chain might not have had the expected associated types
|
||||
--> $DIR/invalid-iterator-chain-fixable.rs:32:15
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ LL | let i = i.map(|x| x.clone());
|
|||
LL | i.collect()
|
||||
| ^^^^^^^ value of type `Vec<X>` cannot be built from `std::iter::Iterator<Item=&X>`
|
||||
|
|
||||
= help: the trait `FromIterator<&_>` is not implemented for `Vec<X>`
|
||||
but trait `FromIterator<_>` is implemented for it
|
||||
help: the trait `FromIterator<&_>` is not implemented for `Vec<X>`
|
||||
but trait `FromIterator<_>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `X`, found `&X`
|
||||
note: the method call chain might not have had the expected associated types
|
||||
--> $DIR/invalid-iterator-chain.rs:4:26
|
||||
|
|
@ -32,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
|
||||
|
|
||||
|
|
@ -49,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;
|
||||
|
|
@ -64,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
|
||||
|
|
||||
|
|
@ -88,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; })
|
||||
|
|
@ -103,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
|
||||
|
|
||||
|
|
@ -123,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
|
||||
|
|
@ -133,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
|
||||
|
|
||||
|
|
@ -146,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>());
|
||||
|
|
@ -161,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
|
||||
|
|
||||
|
|
@ -173,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
|
||||
|
|
@ -180,8 +201,9 @@ error[E0277]: a value of type `Vec<i32>` cannot be built from an iterator over e
|
|||
LL | let g: Vec<i32> = f.collect();
|
||||
| ^^^^^^^ value of type `Vec<i32>` cannot be built from `std::iter::Iterator<Item=()>`
|
||||
|
|
||||
= help: the trait `FromIterator<()>` is not implemented for `Vec<i32>`
|
||||
but trait `FromIterator<i32>` is implemented for it
|
||||
help: the trait `FromIterator<()>` is not implemented for `Vec<i32>`
|
||||
but trait `FromIterator<i32>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `i32`, found `()`
|
||||
note: the method call chain might not have had the expected associated types
|
||||
--> $DIR/invalid-iterator-chain.rs:44:15
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
error: dlltool could not create import library with $DLLTOOL -d $DEF_FILE -D foo.dll -l $LIB_FILE $TARGET_MACHINE $ASM_FLAGS --no-leading-underscore $TEMP_PREFIX:
|
||||
|
||||
$DLLTOOL: Syntax error in def file $DEF_FILE:1␍
|
||||
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over e
|
|||
LL | let x2: Vec<f64> = x1.into_iter().collect();
|
||||
| ^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
|
||||
|
|
||||
= help: the trait `FromIterator<&_>` is not implemented for `Vec<f64>`
|
||||
but trait `FromIterator<_>` is implemented for it
|
||||
help: the trait `FromIterator<&_>` is not implemented for `Vec<f64>`
|
||||
but trait `FromIterator<_>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `f64`, found `&f64`
|
||||
note: the method call chain might not have had the expected associated types
|
||||
--> $DIR/collect-method-type-mismatch-66923.rs:9:27
|
||||
|
|
@ -25,8 +26,9 @@ LL | let x3 = x1.into_iter().collect::<Vec<f64>>();
|
|||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `FromIterator<&_>` is not implemented for `Vec<f64>`
|
||||
but trait `FromIterator<_>` is implemented for it
|
||||
help: the trait `FromIterator<&_>` is not implemented for `Vec<f64>`
|
||||
but trait `FromIterator<_>` is implemented for it
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
= help: for that trait implementation, expected `f64`, found `&f64`
|
||||
note: the method call chain might not have had the expected associated types
|
||||
--> $DIR/collect-method-type-mismatch-66923.rs:13:17
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ error[E0277]: the trait bound `E: From<()>` is not satisfied
|
|||
LL | <E as From<_>>::from(never); // Should the inference fail?
|
||||
| ^ unsatisfied trait bound
|
||||
|
|
||||
= help: the trait `From<()>` is not implemented for `E`
|
||||
but trait `From<!>` is implemented for it
|
||||
help: the trait `From<()>` is not implemented for `E`
|
||||
but trait `From<!>` is implemented for it
|
||||
--> $DIR/from_infer_breaking_with_unit_fallback.rs:16:1
|
||||
|
|
||||
LL | impl From<!> for E {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `!`, found `()`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ error[E0277]: the trait bound `E: From<()>` is not satisfied
|
|||
LL | <E as From<_>>::from(never);
|
||||
| ^ unsatisfied trait bound
|
||||
|
|
||||
= help: the trait `From<()>` is not implemented for `E`
|
||||
but trait `From<!>` is implemented for it
|
||||
help: the trait `From<()>` is not implemented for `E`
|
||||
but trait `From<!>` is implemented for it
|
||||
--> $DIR/never-value-fallback-issue-66757.rs:17:1
|
||||
|
|
||||
LL | impl From<!> for E {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
= help: for that trait implementation, expected `!`, found `()`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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>`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue