Skip to content

Commit

Permalink
Merge conflicts due to eddyb's UFCS branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Feb 24, 2015
1 parent abdb42b commit 1ef3598
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ fn ast_path_to_trait_ref<'a,'tcx>(
-> Rc<ty::TraitRef<'tcx>>
{
debug!("ast_path_to_trait_ref {:?}", trait_segment);
let trait_def = match this.get_trait_def(path.span, trait_def_id) {
let trait_def = match this.get_trait_def(span, trait_def_id) {
Ok(trait_def) => trait_def,
Err(ErrorReported) => {
// No convenient way to recover from a cycle here. Just bail. Sorry!
Expand Down Expand Up @@ -873,17 +873,19 @@ fn ast_path_to_ty<'tcx>(
-> Ty<'tcx>
{
let tcx = this.tcx();
let substs = match this.get_item_type_scheme(path.span, did) {
let (generics, decl_ty) = match this.get_item_type_scheme(span, did) {
Ok(ty::TypeScheme { generics, ty: decl_ty }) => {
ast_path_substs_for_ty(this, rscope,
span, param_mode,
&generics, item_segment)
(generics, decl_ty)
}
Err(ErrorReported) => {
return TypeAndSubsts { substs: Substs::empty(), ty: tcx.types.err };
return tcx.types.err;
}
};

let substs = ast_path_substs_for_ty(this, rscope,
span, param_mode,
&generics, item_segment);

// FIXME(#12938): This is a hack until we have full support for DST.
if Some(did) == this.tcx().lang_items.owned_box() {
assert_eq!(substs.types.len(TypeSpace), 1);
Expand Down Expand Up @@ -1020,7 +1022,7 @@ fn associated_path_def_to_ty<'tcx>(this: &AstConv<'tcx>,

// FIXME(#20300) -- search where clauses, not bounds
let bounds =
this.get_type_parameter_bounds(ast_ty.span, ty_param_ndoe_id)
this.get_type_parameter_bounds(span, ty_param_node_id)
.unwrap_or(Vec::new());

let mut suitable_bounds: Vec<_> =
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3637,7 +3637,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
}
} else {
tcx.sess.span_bug(expr.span,
&format!("unbound path {}", expr.repr(tcx))[])
&format!("unbound path {}", expr.repr(tcx)))
};

let mut def = path_res.base_def;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ fn is_param<'tcx>(tcx: &ty::ctxt<'tcx>,
-> bool
{
if let ast::TyPath(None, _) = ast_ty.node {
let path_res = ccx.tcx.def_map.borrow()[ast_ty.id];
let path_res = tcx.def_map.borrow()[ast_ty.id];
if let def::DefTyParam(_, _, def_id, _) = path_res.base_def {
path_res.depth == 0 && def_id == local_def(param_id)
} else {
Expand Down

0 comments on commit 1ef3598

Please sign in to comment.