Remove warning in the lastest nightly

This commit is contained in:
mcarton
2016-10-04 17:17:40 +02:00
parent 9936734cd8
commit 2b8500664c

View File

@@ -1,7 +1,8 @@
use consts::constant; use consts::constant;
use rustc::lint::*; use rustc::lint::*;
use rustc::hir::*; use rustc::hir::*;
use std::hash::{Hash, Hasher, SipHasher}; use std::hash::{Hash, Hasher};
use std::collections::hash_map::DefaultHasher;
use syntax::ast::Name; use syntax::ast::Name;
use syntax::ptr::P; use syntax::ptr::P;
use utils::differing_macro_contexts; use utils::differing_macro_contexts;
@@ -272,14 +273,14 @@ fn over<X, F>(left: &[X], right: &[X], mut eq_fn: F) -> bool
pub struct SpanlessHash<'a, 'tcx: 'a> { pub struct SpanlessHash<'a, 'tcx: 'a> {
/// Context used to evaluate constant expressions. /// Context used to evaluate constant expressions.
cx: &'a LateContext<'a, 'tcx>, cx: &'a LateContext<'a, 'tcx>,
s: SipHasher, s: DefaultHasher,
} }
impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> { impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
pub fn new(cx: &'a LateContext<'a, 'tcx>) -> Self { pub fn new(cx: &'a LateContext<'a, 'tcx>) -> Self {
SpanlessHash { SpanlessHash {
cx: cx, cx: cx,
s: SipHasher::new(), s: DefaultHasher::new(),
} }
} }