mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Add unused_variables
native diagnostic
This commit is contained in:
parent
e5e937ae5e
commit
7834b8fadb
12 changed files with 282 additions and 38 deletions
|
@ -280,7 +280,7 @@ impl ProjectionId {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct Place {
|
||||
pub local: LocalId,
|
||||
pub projection: ProjectionId,
|
||||
|
@ -1007,7 +1007,7 @@ pub enum Rvalue {
|
|||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub enum StatementKind {
|
||||
Assign(Place, Rvalue),
|
||||
//FakeRead(Box<(FakeReadCause, Place)>),
|
||||
FakeRead(Place),
|
||||
//SetDiscriminant {
|
||||
// place: Box<Place>,
|
||||
// variant_index: VariantIdx,
|
||||
|
@ -1109,7 +1109,9 @@ impl MirBody {
|
|||
}
|
||||
}
|
||||
}
|
||||
StatementKind::Deinit(p) => f(p, &mut self.projection_store),
|
||||
StatementKind::FakeRead(p) | StatementKind::Deinit(p) => {
|
||||
f(p, &mut self.projection_store)
|
||||
}
|
||||
StatementKind::StorageLive(_)
|
||||
| StatementKind::StorageDead(_)
|
||||
| StatementKind::Nop => (),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue