item.name -> item.ident.name
This commit is contained in:
@@ -334,7 +334,7 @@ pub fn method_chain_args<'a>(expr: &'a Expr, methods: &[&str]) -> Option<Vec<&'a
|
||||
pub fn get_item_name(cx: &LateContext<'_, '_>, expr: &Expr) -> Option<Name> {
|
||||
let parent_id = cx.tcx.hir().get_parent(expr.id);
|
||||
match cx.tcx.hir().find(parent_id) {
|
||||
Some(Node::Item(&Item { ref name, .. })) => Some(*name),
|
||||
Some(Node::Item(&Item { ref ident, .. })) => Some(ident.name),
|
||||
Some(Node::TraitItem(&TraitItem { ident, .. })) | Some(Node::ImplItem(&ImplItem { ident, .. })) => {
|
||||
Some(ident.name)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user