Merge pull request #481 from fhartwig/lifetime-with-alias

Make unneeded_lifetimes lint work properly with type aliases
This commit is contained in:
Manish Goregaokar 2015-12-06 09:08:40 +05:30
commit c4e9982dd7
3 changed files with 27 additions and 16 deletions

View file

@ -259,7 +259,6 @@ pub fn get_parent_expr<'c>(cx: &'c LateContext, e: &Expr) -> Option<&'c Expr> {
if let NodeExpr(parent) = node { Some(parent) } else { None } )
}
#[allow(needless_lifetimes)] // workaround for https://github.com/Manishearth/rust-clippy/issues/417
pub fn get_enclosing_block<'c>(cx: &'c LateContext, node: NodeId) -> Option<&'c Block> {
let map = &cx.tcx.map;
let enclosing_node = map.get_enclosing_scope(node)