Remove unused utils

This commit is contained in:
Manish Goregaokar 2018-10-05 13:26:39 -07:00
parent 75965030c7
commit cbde8201c5
2 changed files with 0 additions and 9 deletions

View File

@ -957,14 +957,6 @@ pub fn get_arg_name(pat: &Pat) -> Option<ast::Name> {
}
}
pub fn get_arg_ident(pat: &Pat) -> Option<ast::Ident> {
match pat.node {
PatKind::Binding(_, _, ident, None) => Some(ident),
PatKind::Ref(ref subpat, _) => get_arg_ident(subpat),
_ => None,
}
}
pub fn int_bits(tcx: TyCtxt<'_, '_, '_>, ity: ast::IntTy) -> u64 {
layout::Integer::from_attr(tcx, attr::IntType::SignedInt(ity)).size().bits()
}

View File

@ -12,7 +12,6 @@
pub const BTREEMAP: [&str; 5] = ["alloc", "collections", "btree", "map", "BTreeMap"];
pub const BTREEMAP_ENTRY: [&str; 5] = ["alloc", "collections", "btree", "map", "Entry"];
pub const BTREESET: [&str; 5] = ["alloc", "collections", "btree", "set", "BTreeSet"];
pub const CLONE: [&str; 4] = ["core", "clone", "Clone", "clone"];
pub const CLONE_TRAIT: [&str; 3] = ["core", "clone", "Clone"];
pub const CMP_MAX: [&str; 3] = ["core", "cmp", "max"];
pub const CMP_MIN: [&str; 3] = ["core", "cmp", "min"];