]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/escape.rs
Auto merge of #4551 - mikerite:fix-ice-reporting, r=llogiq
[rust.git] / clippy_lints / src / escape.rs
index f276014f43ad52c30b6a2160fcf26c7d2550faec..e174cdfb86033f92095752bcc83bb53de3dabc7d 100644 (file)
@@ -28,11 +28,10 @@ pub struct BoxedLocal {
     ///
     /// **Example:**
     /// ```rust
-    /// fn main() {
-    ///     let x = Box::new(1);
-    ///     foo(*x);
-    ///     println!("{}", *x);
-    /// }
+    /// # fn foo(bar: usize) {}
+    /// let x = Box::new(1);
+    /// foo(*x);
+    /// println!("{}", *x);
     /// ```
     pub BOXED_LOCAL,
     perf,
@@ -109,7 +108,7 @@ fn is_argument(map: &hir::map::Map<'_>, id: HirId) -> bool {
     }
 
     match map.find(map.get_parent_node(id)) {
-        Some(Node::Arg(_)) => true,
+        Some(Node::Param(_)) => true,
         _ => false,
     }
 }