Adjust nits from pcwalton.

This commit is contained in:
Niko Matsakis 2014-12-04 00:57:38 -05:00
parent 64bf5a8687
commit f2731ffb52
2 changed files with 5 additions and 2 deletions

View File

@ -1024,7 +1024,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
candidates: &mut CandidateSet<'tcx>)
-> Result<(),SelectionError<'tcx>>
{
// We provide a `Fn` impl for fn pointers (but not e.g. `FnMut`).
// We provide a `Fn` impl for fn pointers. There is no need to provide
// the other traits (e.g. `FnMut`) since those are provided by blanket
// impls.
if Some(obligation.trait_ref.def_id) != self.tcx().lang_items.fn_trait() {
return Ok(());
}
@ -1705,7 +1707,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
abi: abi::Rust,
ref sig
}) => {
(*sig).clone()
sig
}
_ => {
self.tcx().sess.span_bug(

View File

@ -395,6 +395,7 @@ impl<'tcx> LocalCrateContext<'tcx> {
tn: TypeNames::new(),
externs: RefCell::new(FnvHashMap::new()),
item_vals: RefCell::new(NodeMap::new()),
fn_pointer_shims: RefCell::new(FnvHashMap::new()),
drop_glues: RefCell::new(FnvHashMap::new()),
tydescs: RefCell::new(FnvHashMap::new()),
finished_tydescs: Cell::new(false),