tree-sitter-rust icon indicating copy to clipboard operation
tree-sitter-rust copied to clipboard

default is no more a function modifier so remove it

Open calixteman opened this issue 5 years ago • 1 comments
trafficstars

According to https://doc.rust-lang.org/reference/items/functions.html we could remove default. Its presence in the grammar leads to error with for example:

pub struct A {
    a: default::C,
}

And nothing in: https://doc.rust-lang.org/reference/keywords.html

@maxbrunsfeld are you ok to remove it ? if yes I'll do the PR.

calixteman avatar Mar 19 '20 17:03 calixteman

That sounds good. I can't really remember the story behind the default modifier. If removing it allows us to parse code successfully that we couldn't parse before, I'm 👍 .

maxbrunsfeld avatar Mar 19 '20 18:03 maxbrunsfeld

The given example parses correctly now

amaanq avatar Feb 17 '24 21:02 amaanq