Closed
Description
The snippet
fn main() {
let foo = "str";
println!("{}", foo.desc);
}
produces the two error messages
error: attempted access of field `desc` on type `&'static str`, but no field with that name was found
bug.rs:3 println!("{}", foo.desc);
^~~~~~~~
error: cannot determine a type for this bounded type parameter: unconstrained type
bug.rs:3 println!("{}", foo.desc);
^~~~~~~~
that are possibly separated by some notes from the compiler such that the first one is not directly visible.
The problem is, that the second message is absolutely not helpful and leads to confusion if the first one is overlooked. I get why the second message is issued but I don't think that it's relevant since the first error is the sole cause for the second error.