item.name -> item.ident.name
This commit is contained in:
Matthias Krüger
2018-12-30 01:09:24 +01:00
parent ece8b8e7d6
commit e590025f61
6 changed files with 6 additions and 6 deletions

View File

@@ -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)
},