40f4993c67
Fixes 4984 When parsing derive attributes we're only concerned about the traits and comments listed between the opening and closing parentheses. Derive attribute spans currently start at the '#'. Span starts here | v #[derive(...)] After this update the derive spans start after the opening '('. Span starts here | V #[derive(...)]
21 lines
376 B
Rust
21 lines
376 B
Rust
#[derive(
|
|
/* ---------- Some really important comment that just had to go inside the derive --------- */
|
|
Debug, Clone, Eq, PartialEq,
|
|
)]
|
|
struct Foo {
|
|
a: i32,
|
|
b: T,
|
|
}
|
|
|
|
#[derive(
|
|
/*
|
|
Some really important comment that just had to go inside the derive.
|
|
Also had to be put over multiple lines
|
|
*/
|
|
Debug, Clone, Eq, PartialEq,
|
|
)]
|
|
struct Bar {
|
|
a: i32,
|
|
b: T,
|
|
}
|