We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3efe017 commit c180af8Copy full SHA for c180af8
compiler/rustc_passes/src/stability.rs
@@ -829,10 +829,7 @@ impl Visitor<'tcx> for Checker<'tcx> {
829
fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, id: hir::HirId) {
830
if let Some(def_id) = path.res.opt_def_id() {
831
let method_span = if path.segments.len() >= 2 {
832
- match path.segments.last() {
833
- Some(s) => Some(s.ident.span),
834
- None => None,
835
- }
+ path.segments.last().map(|s| s.ident.span)
836
} else {
837
None
838
};
0 commit comments