-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Simplify ExprUseVisitor #64874
Simplify ExprUseVisitor #64874
Conversation
I just noticed the old |
@@ -2,25 +2,20 @@ | |||
//! normal visitor, which just walks the entire body in one shot, the |
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.
can you check whether clippy still works after your PR? We use this visitor a lot.
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.
Oh... anything using EUV should've transitioned a long time ago to being based on MIR, IMO. I wish I brought this up to clippy people earlier :/
@@ -19,12 +19,10 @@ use rustc::ty::query::Providers; | |||
pub mod error_codes; | |||
|
|||
pub mod ast_validation; | |||
pub mod rvalue_promotion; | |||
pub mod hir_stats; | |||
pub mod layout_test; | |||
pub mod loops; |
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.
Feels like this crate is becoming quite pointless.
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.
We could split them out to a crate for each pass. :)
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.
They are tiny though... a bunch of them belong in rustc::hir
which could become a crate (with only the data types remaining in rustc
).
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.
Whatever we do, let's please not inflate the size of the rustc
crate. :)
@@ -582,48 +582,13 @@ impl<'a, 'tcx> InferBorrowKind<'a, 'tcx> { | |||
} | |||
|
|||
impl<'a, 'tcx> euv::Delegate<'tcx> for InferBorrowKind<'a, 'tcx> { |
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 this the only user left? Can its reliance on MC be simplified too?
The old Notes for anyone trying to update Clippy after this lands:
|
e18bf4b
to
c83e8a6
Compare
☔ The latest upstream changes (presumably #64778) made this pull request unmergeable. Please resolve the merge conflicts. |
c83e8a6
to
b4ad612
Compare
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.
LGTM, r=me if you don't want to change more due to #64874 (comment)
@bors r=eddyb |
📌 Commit b4ad612 has been approved by |
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.
Nice cleanup, @matthewjasper!
Simplify ExprUseVisitor * Remove HIR const qualification * Remove parts of ExprUseVisitor that aren't being used r? @eddyb
Rollup of 5 pull requests Successful merges: - #64749 (Fix most remaining Polonius test differences) - #64817 (Replace ClosureSubsts with SubstsRef) - #64874 (Simplify ExprUseVisitor) - #65026 (metadata: Some crate loading cleanup) - #65073 (Remove `borrowck_graphviz_postflow` from test) Failed merges: r? @ghost
Episode 1 - The simple cases
Episode 1 - The simple cases
Rustup to rust-lang/rust#64874 TODO: - [x] replace `rvalue_promotable_map` in [1] - [ ] ~~fix [2] according to this comment rust-lang/rust#64874 (comment) this should be merged with `consume`, but I didn't figure out how to merge them, yet.~~ - [ ] ~~fix [3]; What to do with `LoanCause`?~~ [2]+[3] probably have to be resolved by a rewrite of the lint. #4628 (comment) [1] https://github.com/rust-lang/rust-clippy/blob/54bf4ffd626970e831bb80c037f804a3b3450835/clippy_lints/src/methods/mod.rs#L1292-L1299 [2] https://github.com/rust-lang/rust-clippy/blob/54bf4ffd626970e831bb80c037f804a3b3450835/clippy_lints/src/escape.rs#L126 [3] https://github.com/rust-lang/rust-clippy/blob/54bf4ffd626970e831bb80c037f804a3b3450835/clippy_lints/src/escape.rs#L166-L176 I could need some help with [1]. The purpose of this is to "don't lint for constant values". cc @matthewjasper For now I see what I can do with [2]. changelog: Temporary break `boxed_local` lint.
r? @eddyb