The code
#[derive(Clone, Copy)]
struct Foo<'a>(&'a NotDefined);
fn main() {}
results in
error[E0412]: cannot find type `NotDefined` in this scope
--> src/main.rs:2:20
|
2 | struct Foo<'a>(&'a NotDefined);
| ^^^^^^^^^^ not found in this scope
error[E0204]: the trait `Copy` may not be implemented for this type
--> src/main.rs:1:17
|
1 | #[derive(Clone, Copy)]
| ^^^^
2 | struct Foo<'a>(&'a NotDefined);
| --------------- this field does not implement `Copy`
Many warnings can end up between these two, so somebody who starts reading errors from the bottom up can become very confused.
The code
results in
Many warnings can end up between these two, so somebody who starts reading errors from the bottom up can become very confused.