-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Use the new rustc interface #3733
Conversation
☔ The latest upstream changes (presumably #2857) made this pull request unmergeable. Please resolve the merge conflicts. |
src/driver.rs
Outdated
struct ClippyCallbacks; | ||
|
||
impl rustc_driver::Callbacks for ClippyCallbacks { | ||
fn after_parsing(&mut self, compiler: &interface::Compiler<'_>) -> bool { |
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.
fn after_parsing(&mut self, compiler: &interface::Compiler<'_>) -> bool { | |
fn after_parsing(&mut self, compiler: &interface::Compiler) -> bool { |
Won't compile again otherwise
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.
I'll just fix this myself and merge
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 =P
Updates clippy to work with new driver stuff from rust-lang/rust#56732 See #3733
merge on travis pass |
Oh wait bors does that for us lol @bors r+ |
📌 Commit 0d4a19c has been approved by |
Use the new rustc interface Shows the changes required to compile with rust-lang/rust#56732
💔 Test failed - checks-travis |
sess.plugin_attributes.borrow_mut().extend(attributes); | ||
|
||
// Continue execution | ||
true |
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.
The old code did controller.compilation_done.stop = Compilation::Stop;
, isn't this a change in behavior? (Same thing as in Miri, which is the only reason I noticed this.)
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.
Stopping after compilation is done doesn't really do anything.
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.
I was mostly worried about Clippy accidentally emitting a binary (which a bug in Miri made it do for some time, and I actually have no idea what made it stop doing that). Not sure if that's related to stopping here.
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.
The previous (and new) code should emit a binary here.
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.
Stopping after compilation is done doesn't really do anything.
This might be what's causing cargo clippy
not do anything on a second run. We should investigate in the future, but this PR does the right thing in keeping the previous behaviour
@bors r+ |
📌 Commit 1388f24 has been approved by |
Use the new rustc interface Shows the changes required to compile with rust-lang/rust#56732
☀️ Test successful - checks-travis, status-appveyor |
Shows the changes required to compile with rust-lang/rust#56732