Skip to content

Commit f2731ff

Browse files
committed
Adjust nits from pcwalton.
1 parent 64bf5a8 commit f2731ff

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/librustc/middle/traits/select.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10241024
candidates: &mut CandidateSet<'tcx>)
10251025
-> Result<(),SelectionError<'tcx>>
10261026
{
1027-
// We provide a `Fn` impl for fn pointers (but not e.g. `FnMut`).
1027+
// We provide a `Fn` impl for fn pointers. There is no need to provide
1028+
// the other traits (e.g. `FnMut`) since those are provided by blanket
1029+
// impls.
10281030
if Some(obligation.trait_ref.def_id) != self.tcx().lang_items.fn_trait() {
10291031
return Ok(());
10301032
}
@@ -1705,7 +1707,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
17051707
abi: abi::Rust,
17061708
ref sig
17071709
}) => {
1708-
(*sig).clone()
1710+
sig
17091711
}
17101712
_ => {
17111713
self.tcx().sess.span_bug(

src/librustc_trans/trans/context.rs

+1
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ impl<'tcx> LocalCrateContext<'tcx> {
395395
tn: TypeNames::new(),
396396
externs: RefCell::new(FnvHashMap::new()),
397397
item_vals: RefCell::new(NodeMap::new()),
398+
fn_pointer_shims: RefCell::new(FnvHashMap::new()),
398399
drop_glues: RefCell::new(FnvHashMap::new()),
399400
tydescs: RefCell::new(FnvHashMap::new()),
400401
finished_tydescs: Cell::new(false),

0 commit comments

Comments
 (0)