Skip to content

Commit 2ae7257

Browse files
committed
Don't use _ to ignore things so rustc will show warnings for all the gaps in the implementation
1 parent b2451c6 commit 2ae7257

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

rust/extractor/src/translate.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ impl CrateTranslator<'_> {
402402
id: TrapId::Star,
403403
location,
404404
}),
405-
ra_ap_hir_def::hir::Expr::Path(_) => self.trap.emit(generated::PathExpr {
405+
ra_ap_hir_def::hir::Expr::Path(path) => self.trap.emit(generated::PathExpr {
406406
id: TrapId::Star,
407407
location,
408408
}),
@@ -469,7 +469,7 @@ impl CrateTranslator<'_> {
469469
tail,
470470
})
471471
}
472-
ra_ap_hir_def::hir::Expr::Const(_) => self.trap.emit(generated::ConstExpr {
472+
ra_ap_hir_def::hir::Expr::Const(const_block) => self.trap.emit(generated::ConstExpr {
473473
id: TrapId::Star,
474474
location,
475475
}),
@@ -834,7 +834,7 @@ impl CrateTranslator<'_> {
834834
labels: &mut Vec<trap::Label>,
835835
) {
836836
match id {
837-
ModuleDef::Module(_) => {}
837+
ModuleDef::Module(module) => {}
838838
ModuleDef::Function(function) => {
839839
let def: ra_ap_hir::DefWithBody = function.into();
840840
let (body, source_map) = self.db.body_with_source_map(def.into());
@@ -852,15 +852,15 @@ impl CrateTranslator<'_> {
852852
body,
853853
}));
854854
}
855-
ModuleDef::Adt(_) => {}
856-
ModuleDef::Variant(_) => {}
857-
ModuleDef::Const(_) => {}
858-
ModuleDef::Static(_) => {}
859-
ModuleDef::Trait(_) => {}
860-
ModuleDef::TraitAlias(_) => {}
861-
ModuleDef::TypeAlias(_) => {}
862-
ModuleDef::BuiltinType(_) => {}
863-
ModuleDef::Macro(_) => {}
855+
ModuleDef::Adt(adt) => {}
856+
ModuleDef::Variant(variant) => {}
857+
ModuleDef::Const(const_) => {}
858+
ModuleDef::Static(static_) => {}
859+
ModuleDef::Trait(trait_) => {}
860+
ModuleDef::TraitAlias(alias_) => {}
861+
ModuleDef::TypeAlias(type_alias_) => {}
862+
ModuleDef::BuiltinType(builtin_type_) => {}
863+
ModuleDef::Macro(macro_) => {}
864864
}
865865
}
866866

0 commit comments

Comments
 (0)