Skip to content

Commit 1ef3598

Browse files
committed
Merge conflicts due to eddyb's UFCS branch
1 parent abdb42b commit 1ef3598

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/librustc_typeck/astconv.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ fn ast_path_to_trait_ref<'a,'tcx>(
688688
-> Rc<ty::TraitRef<'tcx>>
689689
{
690690
debug!("ast_path_to_trait_ref {:?}", trait_segment);
691-
let trait_def = match this.get_trait_def(path.span, trait_def_id) {
691+
let trait_def = match this.get_trait_def(span, trait_def_id) {
692692
Ok(trait_def) => trait_def,
693693
Err(ErrorReported) => {
694694
// No convenient way to recover from a cycle here. Just bail. Sorry!
@@ -873,17 +873,19 @@ fn ast_path_to_ty<'tcx>(
873873
-> Ty<'tcx>
874874
{
875875
let tcx = this.tcx();
876-
let substs = match this.get_item_type_scheme(path.span, did) {
876+
let (generics, decl_ty) = match this.get_item_type_scheme(span, did) {
877877
Ok(ty::TypeScheme { generics, ty: decl_ty }) => {
878-
ast_path_substs_for_ty(this, rscope,
879-
span, param_mode,
880-
&generics, item_segment)
878+
(generics, decl_ty)
881879
}
882880
Err(ErrorReported) => {
883-
return TypeAndSubsts { substs: Substs::empty(), ty: tcx.types.err };
881+
return tcx.types.err;
884882
}
885883
};
886884

885+
let substs = ast_path_substs_for_ty(this, rscope,
886+
span, param_mode,
887+
&generics, item_segment);
888+
887889
// FIXME(#12938): This is a hack until we have full support for DST.
888890
if Some(did) == this.tcx().lang_items.owned_box() {
889891
assert_eq!(substs.types.len(TypeSpace), 1);
@@ -1020,7 +1022,7 @@ fn associated_path_def_to_ty<'tcx>(this: &AstConv<'tcx>,
10201022

10211023
// FIXME(#20300) -- search where clauses, not bounds
10221024
let bounds =
1023-
this.get_type_parameter_bounds(ast_ty.span, ty_param_ndoe_id)
1025+
this.get_type_parameter_bounds(span, ty_param_node_id)
10241026
.unwrap_or(Vec::new());
10251027

10261028
let mut suitable_bounds: Vec<_> =

src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3637,7 +3637,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
36373637
}
36383638
} else {
36393639
tcx.sess.span_bug(expr.span,
3640-
&format!("unbound path {}", expr.repr(tcx))[])
3640+
&format!("unbound path {}", expr.repr(tcx)))
36413641
};
36423642

36433643
let mut def = path_res.base_def;

src/librustc_typeck/collect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ fn is_param<'tcx>(tcx: &ty::ctxt<'tcx>,
504504
-> bool
505505
{
506506
if let ast::TyPath(None, _) = ast_ty.node {
507-
let path_res = ccx.tcx.def_map.borrow()[ast_ty.id];
507+
let path_res = tcx.def_map.borrow()[ast_ty.id];
508508
if let def::DefTyParam(_, _, def_id, _) = path_res.base_def {
509509
path_res.depth == 0 && def_id == local_def(param_id)
510510
} else {

0 commit comments

Comments
 (0)