Skip to content

Commit faa9f09

Browse files
---
yaml --- r: 274829 b: refs/heads/stable c: f831d98 h: refs/heads/master i: 274827: 855af13
1 parent 25892da commit faa9f09

File tree

12 files changed

+196
-196
lines changed

12 files changed

+196
-196
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: c877d61b15bf0098d7dfbde3e74052a3559ad028
32+
refs/heads/stable: f831d98ba2167ac19966618bfb218856e1eedc63
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc_typeck/astconv.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ fn convert_angle_bracketed_parameters<'tcx>(this: &AstConv<'tcx>,
562562
let assoc_bindings: Vec<_> =
563563
data.bindings.iter()
564564
.map(|b| ConvertedBinding { item_name: b.name,
565-
ty: ast_ty_to_ty(this, rscope, &*b.ty),
565+
ty: ast_ty_to_ty(this, rscope, &b.ty),
566566
span: b.span })
567567
.collect();
568568

@@ -1064,7 +1064,7 @@ fn ast_ty_to_trait_ref<'tcx>(this: &AstConv<'tcx>,
10641064
err.span_suggestion(full_span, "try adding parentheses (per RFC 438):",
10651065
format!("&{}({} +{})",
10661066
mutbl_str,
1067-
pprust::ty_to_string(&*mut_ty.ty),
1067+
pprust::ty_to_string(&mut_ty.ty),
10681068
pprust::bounds_to_string(bounds)));
10691069
}
10701070
(&hir::TyRptr(Some(ref lt), ref mut_ty), Some(full_span)) => {
@@ -1073,7 +1073,7 @@ fn ast_ty_to_trait_ref<'tcx>(this: &AstConv<'tcx>,
10731073
format!("&{} {}({} +{})",
10741074
pprust::lifetime_to_string(lt),
10751075
mutbl_str,
1076-
pprust::ty_to_string(&*mut_ty.ty),
1076+
pprust::ty_to_string(&mut_ty.ty),
10771077
pprust::bounds_to_string(bounds)));
10781078
}
10791079

@@ -1596,10 +1596,10 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>,
15961596

15971597
let typ = match ast_ty.node {
15981598
hir::TyVec(ref ty) => {
1599-
tcx.mk_slice(ast_ty_to_ty(this, rscope, &**ty))
1599+
tcx.mk_slice(ast_ty_to_ty(this, rscope, &ty))
16001600
}
16011601
hir::TyObjectSum(ref ty, ref bounds) => {
1602-
match ast_ty_to_trait_ref(this, rscope, &**ty, bounds) {
1602+
match ast_ty_to_trait_ref(this, rscope, &ty, bounds) {
16031603
Ok((trait_ref, projection_bounds)) => {
16041604
trait_ref_to_object_type(this,
16051605
rscope,
@@ -1615,7 +1615,7 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>,
16151615
}
16161616
hir::TyPtr(ref mt) => {
16171617
tcx.mk_ptr(ty::TypeAndMut {
1618-
ty: ast_ty_to_ty(this, rscope, &*mt.ty),
1618+
ty: ast_ty_to_ty(this, rscope, &mt.ty),
16191619
mutbl: mt.mutbl
16201620
})
16211621
}
@@ -1626,18 +1626,18 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>,
16261626
&ObjectLifetimeDefaultRscope::new(
16271627
rscope,
16281628
ty::ObjectLifetimeDefault::Specific(r));
1629-
let t = ast_ty_to_ty(this, rscope1, &*mt.ty);
1629+
let t = ast_ty_to_ty(this, rscope1, &mt.ty);
16301630
tcx.mk_ref(tcx.mk_region(r), ty::TypeAndMut {ty: t, mutbl: mt.mutbl})
16311631
}
16321632
hir::TyTup(ref fields) => {
16331633
let flds = fields.iter()
1634-
.map(|t| ast_ty_to_ty(this, rscope, &**t))
1634+
.map(|t| ast_ty_to_ty(this, rscope, &t))
16351635
.collect();
16361636
tcx.mk_tup(flds)
16371637
}
16381638
hir::TyBareFn(ref bf) => {
16391639
require_c_abi_if_variadic(tcx, &bf.decl, bf.abi, ast_ty.span);
1640-
let bare_fn = ty_of_bare_fn(this, bf.unsafety, bf.abi, &*bf.decl);
1640+
let bare_fn = ty_of_bare_fn(this, bf.unsafety, bf.abi, &bf.decl);
16411641
tcx.mk_fn(None, tcx.mk_bare_fn(bare_fn))
16421642
}
16431643
hir::TyPolyTraitRef(ref bounds) => {
@@ -1687,10 +1687,10 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>,
16871687
Ok(r) => {
16881688
match r {
16891689
ConstVal::Int(i) =>
1690-
tcx.mk_array(ast_ty_to_ty(this, rscope, &**ty),
1690+
tcx.mk_array(ast_ty_to_ty(this, rscope, &ty),
16911691
i as usize),
16921692
ConstVal::Uint(i) =>
1693-
tcx.mk_array(ast_ty_to_ty(this, rscope, &**ty),
1693+
tcx.mk_array(ast_ty_to_ty(this, rscope, &ty),
16941694
i as usize),
16951695
_ => {
16961696
span_err!(tcx.sess, ast_ty.span, E0249,
@@ -1740,7 +1740,7 @@ pub fn ty_of_arg<'tcx>(this: &AstConv<'tcx>,
17401740
match a.ty.node {
17411741
hir::TyInfer if expected_ty.is_some() => expected_ty.unwrap(),
17421742
hir::TyInfer => this.ty_infer(None, None, None, a.ty.span),
1743-
_ => ast_ty_to_ty(this, rscope, &*a.ty),
1743+
_ => ast_ty_to_ty(this, rscope, &a.ty),
17441744
}
17451745
}
17461746

@@ -1804,7 +1804,7 @@ fn ty_of_method_or_bare_fn<'a, 'tcx>(this: &AstConv<'tcx>,
18041804
let arg_tys: Vec<Ty> =
18051805
arg_params.iter().map(|a| ty_of_arg(this, &rb, a, None)).collect();
18061806
let arg_pats: Vec<String> =
1807-
arg_params.iter().map(|a| pprust::pat_to_string(&*a.pat)).collect();
1807+
arg_params.iter().map(|a| pprust::pat_to_string(&a.pat)).collect();
18081808

18091809
// Second, if there was exactly one lifetime (either a substitution or a
18101810
// reference) in the arguments, then any anonymous regions in the output
@@ -1860,7 +1860,7 @@ fn determine_self_type<'a, 'tcx>(this: &AstConv<'tcx>,
18601860
Some(ty::ExplicitSelfCategory::ByReference(region, mutability)))
18611861
}
18621862
hir::SelfExplicit(ref ast_type, _) => {
1863-
let explicit_type = ast_ty_to_ty(this, rscope, &**ast_type);
1863+
let explicit_type = ast_ty_to_ty(this, rscope, &ast_type);
18641864

18651865
// We wish to (for now) categorize an explicit self
18661866
// declaration like `self: SomeType` into either `self`,
@@ -1967,7 +1967,7 @@ pub fn ty_of_closure<'tcx>(
19671967
_ if is_infer =>
19681968
ty::FnConverging(this.ty_infer(None, None, None, decl.output.span())),
19691969
hir::Return(ref output) =>
1970-
ty::FnConverging(ast_ty_to_ty(this, &rb, &**output)),
1970+
ty::FnConverging(ast_ty_to_ty(this, &rb, &output)),
19711971
hir::DefaultReturn(..) => unreachable!(),
19721972
hir::NoReturn(..) => ty::FnDiverging
19731973
};

branches/stable/src/librustc_typeck/check/_match.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
5050
fcx.write_ty(pat.id, expected);
5151
}
5252
hir::PatLit(ref lt) => {
53-
check_expr(fcx, &**lt);
54-
let expr_ty = fcx.expr_ty(&**lt);
53+
check_expr(fcx, &lt);
54+
let expr_ty = fcx.expr_ty(&lt);
5555

5656
// Byte string patterns behave the same way as array patterns
5757
// They can denote both statically and dynamically sized byte arrays
@@ -198,7 +198,7 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
198198
}
199199

200200
if let Some(ref p) = *sub {
201-
check_pat(pcx, &**p, expected);
201+
check_pat(pcx, &p, expected);
202202
}
203203
}
204204
}
@@ -259,28 +259,28 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
259259
fcx.write_ty(pat.id, pat_ty);
260260
demand::eqtype(fcx, pat.span, expected, pat_ty);
261261
for (element_pat, element_ty) in elements.iter().zip(element_tys) {
262-
check_pat(pcx, &**element_pat, element_ty);
262+
check_pat(pcx, &element_pat, element_ty);
263263
}
264264
}
265265
hir::PatBox(ref inner) => {
266266
let inner_ty = fcx.infcx().next_ty_var();
267267
let uniq_ty = tcx.mk_box(inner_ty);
268268

269-
if check_dereferencable(pcx, pat.span, expected, &**inner) {
269+
if check_dereferencable(pcx, pat.span, expected, &inner) {
270270
// Here, `demand::subtype` is good enough, but I don't
271271
// think any errors can be introduced by using
272272
// `demand::eqtype`.
273273
demand::eqtype(fcx, pat.span, expected, uniq_ty);
274274
fcx.write_ty(pat.id, uniq_ty);
275-
check_pat(pcx, &**inner, inner_ty);
275+
check_pat(pcx, &inner, inner_ty);
276276
} else {
277277
fcx.write_error(pat.id);
278-
check_pat(pcx, &**inner, tcx.types.err);
278+
check_pat(pcx, &inner, tcx.types.err);
279279
}
280280
}
281281
hir::PatRegion(ref inner, mutbl) => {
282282
let expected = fcx.infcx().shallow_resolve(expected);
283-
if check_dereferencable(pcx, pat.span, expected, &**inner) {
283+
if check_dereferencable(pcx, pat.span, expected, &inner) {
284284
// `demand::subtype` would be good enough, but using
285285
// `eqtype` turns out to be equally general. See (*)
286286
// below for details.
@@ -304,10 +304,10 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
304304
};
305305

306306
fcx.write_ty(pat.id, rptr_ty);
307-
check_pat(pcx, &**inner, inner_ty);
307+
check_pat(pcx, &inner, inner_ty);
308308
} else {
309309
fcx.write_error(pat.id);
310-
check_pat(pcx, &**inner, tcx.types.err);
310+
check_pat(pcx, &inner, tcx.types.err);
311311
}
312312
}
313313
hir::PatVec(ref before, ref slice, ref after) => {
@@ -339,7 +339,7 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
339339
demand::eqtype(fcx, pat.span, expected, pat_ty);
340340

341341
for elt in before {
342-
check_pat(pcx, &**elt, inner_ty);
342+
check_pat(pcx, &elt, inner_ty);
343343
}
344344
if let Some(ref slice) = *slice {
345345
let region = fcx.infcx().next_region_var(infer::PatternRegion(pat.span));
@@ -350,10 +350,10 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
350350
ty: tcx.mk_slice(inner_ty),
351351
mutbl: mutbl
352352
});
353-
check_pat(pcx, &**slice, slice_ty);
353+
check_pat(pcx, &slice, slice_ty);
354354
}
355355
for elt in after {
356-
check_pat(pcx, &**elt, inner_ty);
356+
check_pat(pcx, &elt, inner_ty);
357357
}
358358
}
359359
}
@@ -482,10 +482,10 @@ pub fn check_match<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
482482
for arm in arms {
483483
let mut pcx = pat_ctxt {
484484
fcx: fcx,
485-
map: pat_id_map(&tcx.def_map, &*arm.pats[0]),
485+
map: pat_id_map(&tcx.def_map, &arm.pats[0]),
486486
};
487487
for p in &arm.pats {
488-
check_pat(&mut pcx, &**p, discrim_ty);
488+
check_pat(&mut pcx, &p, discrim_ty);
489489
}
490490
}
491491

@@ -507,17 +507,17 @@ pub fn check_match<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
507507
// arm for inconsistent arms or to the whole match when a `()` type
508508
// is required).
509509
Expectation::ExpectHasType(ety) if ety != fcx.tcx().mk_nil() => {
510-
check_expr_coercable_to_type(fcx, &*arm.body, ety);
510+
check_expr_coercable_to_type(fcx, &arm.body, ety);
511511
ety
512512
}
513513
_ => {
514-
check_expr_with_expectation(fcx, &*arm.body, expected);
514+
check_expr_with_expectation(fcx, &arm.body, expected);
515515
fcx.node_ty(arm.body.id)
516516
}
517517
};
518518

519519
if let Some(ref e) = arm.guard {
520-
check_expr_has_type(fcx, &**e, tcx.types.bool);
520+
check_expr_has_type(fcx, &e, tcx.types.bool);
521521
}
522522

523523
if result_ty.references_error() || bty.references_error() {
@@ -622,7 +622,7 @@ pub fn check_pat_enum<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
622622

623623
if let Some(subpats) = subpats {
624624
for pat in subpats {
625-
check_pat(pcx, &**pat, tcx.types.err);
625+
check_pat(pcx, &pat, tcx.types.err);
626626
}
627627
}
628628

@@ -670,7 +670,7 @@ pub fn check_pat_enum<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
670670
fcx.write_error(pat.id);
671671
if let Some(subpats) = subpats {
672672
for pat in subpats {
673-
check_pat(pcx, &**pat, tcx.types.err);
673+
check_pat(pcx, &pat, tcx.types.err);
674674
}
675675
}
676676
};
@@ -742,15 +742,15 @@ pub fn check_pat_enum<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
742742
if let Some(subpats) = subpats {
743743
if subpats.len() == arg_tys.len() {
744744
for (subpat, arg_ty) in subpats.iter().zip(arg_tys) {
745-
check_pat(pcx, &**subpat, arg_ty);
745+
check_pat(pcx, &subpat, arg_ty);
746746
}
747747
} else if arg_tys.is_empty() {
748748
span_err!(tcx.sess, pat.span, E0024,
749749
"this pattern has {} field{}, but the corresponding {} has no fields",
750750
subpats.len(), if subpats.len() == 1 {""} else {"s"}, kind_name);
751751

752752
for pat in subpats {
753-
check_pat(pcx, &**pat, tcx.types.err);
753+
check_pat(pcx, &pat, tcx.types.err);
754754
}
755755
} else {
756756
span_err!(tcx.sess, pat.span, E0023,
@@ -760,7 +760,7 @@ pub fn check_pat_enum<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
760760
arg_tys.len(), if arg_tys.len() == 1 {""} else {"s"});
761761

762762
for pat in subpats {
763-
check_pat(pcx, &**pat, tcx.types.err);
763+
check_pat(pcx, &pat, tcx.types.err);
764764
}
765765
}
766766
}
@@ -815,7 +815,7 @@ pub fn check_struct_pat_fields<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
815815
}
816816
};
817817

818-
check_pat(pcx, &*field.pat, field_ty);
818+
check_pat(pcx, &field.pat, field_ty);
819819
}
820820

821821
// Report an error if not all the fields were specified.

branches/stable/src/librustc_typeck/check/callee.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ fn try_overloaded_call_traits<'a,'tcx>(fcx: &FnCtxt<'a, 'tcx>,
199199

200200
match method::lookup_in_trait_adjusted(fcx,
201201
call_expr.span,
202-
Some(&*callee_expr),
202+
Some(&callee_expr),
203203
method_name,
204204
trait_def_id,
205205
autoderefs,
@@ -304,12 +304,12 @@ fn confirm_deferred_closure_call<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
304304
call_expr.span,
305305
expected,
306306
fn_sig.output.clone(),
307-
&*fn_sig.inputs);
307+
&fn_sig.inputs);
308308

309309
check_argument_types(fcx,
310310
call_expr.span,
311-
&*fn_sig.inputs,
312-
&*expected_arg_tys,
311+
&fn_sig.inputs,
312+
&expected_arg_tys,
313313
arg_exprs,
314314
fn_sig.variadic,
315315
TupleArgumentsFlag::TupleArguments);

branches/stable/src/librustc_typeck/check/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn check_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
8383
&fn_sig,
8484
decl,
8585
expr.id,
86-
&*body,
86+
&body,
8787
fcx.inh);
8888

8989
// Tuple up the arguments and insert the resulting function type into

0 commit comments

Comments
 (0)