error[E0425]: cannot find value `foo` in this scope --> $DIR/issue-38586.rs:16:10 | LL | #[derive(A)] //~ ERROR `foo` | ^ not found in this scope error: aborting due to previous error For more information about this error, try `rustc --explain E0425`.