-
-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Description
Let me take the following code (focusing on a block doc comment) as an example:
/** foo */
fn bar() {}
I attempted to parse the above code using syn::parse_file
.
In proc-macro2 v1.0.14+, the output of parsing looks like:
Attribute {
pound_token: Pound,
style: Outer,
bracket_token: Bracket,
path: Path {
leading_colon: None,
segments: [
PathSegment {
ident: Ident(
doc,
),
arguments: None,
},
],
},
tokens: TokenStream [
Punct {
op: '=',
spacing: Alone,
},
Literal {
lit: " foo ", // <------------ (*)
},
],
},
while in v1.0.13, the output is:
Attribute {
pound_token: Pound,
style: Outer,
bracket_token: Bracket,
path: Path {
leading_colon: None,
segments: [
PathSegment {
ident: Ident(
doc,
),
arguments: None,
},
],
},
tokens: TokenStream [
Punct {
op: '=',
spacing: Alone,
},
Literal {
lit: "/** foo */", // <------------ (*)
},
],
},
Seeing the line marked with <--- (*)
, the results are different. This is probably a breaking change to the users.
In my opinion, according to semantic versioning, the major version should have been updated. What do you think about it?
Metadata
Metadata
Assignees
Labels
No labels