-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make examples and generated code work with rust_2018_idioms lint. #367
Conversation
lrlex/src/lib/ctbuilder.rs
Outdated
@@ -68,6 +68,15 @@ impl Visibility { | |||
} | |||
} | |||
|
|||
/// Specifies the [^Rust Edition] that will be emitted during code generation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the ^
intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was part of the footnote syntax of cargo doc, but looking at the generated doc (oops),
it looked terrible with the footnote style. I managed to get it working so the link text shows up inline.
while not making line-length terrible asymmetric.
Should be fixed in bb1e970
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still a couple of other [^
s in the PR -- should they disappear too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry still 😴 ☕, they probably should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the one in lrlex now in 931202f
Please squash. |
931202f
to
b641255
Compare
Squashed. |
bors r+ |
Build succeeded: |
This is an update to my previous pull request #365, towards the end of writing this patch
my understanding of
rust_2018_idioms
changed, e.g. for some reason I thought it was a 2018 -> 2021 thing,but it's actually a 2015 -> 2018 change. It lints against code which was previously accepted by 2015 compilers,
was deprecated in the 2018 edition.
But the lints which deprecated have never been completed to the satisfaction of being enabled by default.
tracking issue: rust-lang/rust#54910
As such i'm really not sure about the conditional code generation being necessary for this.
the new code generated for > 2015 was accepted by 2015 edition, and expect the old code to have lints enabled for them
in the future.
But perhaps this edition stuff would be useful to have everything in place for future edition changes?
As such I figure i'll just make the PR with what I have, and we can trim it down if we want...