Merge
This commit is contained in:
parent
f823d83718
commit
ad9c54c631
1 changed files with 2 additions and 1 deletions
|
@ -131,7 +131,8 @@ pub fn check_pat_variant(pcx: pat_ctxt, pat: @ast::pat, path: @ast::path,
|
|||
// Assign the pattern the type of the struct.
|
||||
let ctor_tpt = ty::lookup_item_type(tcx, s_def_id);
|
||||
let struct_tpt = if ty::is_fn_ty(ctor_tpt.ty) {
|
||||
{ty: ty::ty_fn_ret(ctor_tpt.ty), ..ctor_tpt}
|
||||
ty::ty_param_bounds_and_ty {ty: ty::ty_fn_ret(ctor_tpt.ty),
|
||||
..ctor_tpt}
|
||||
} else {
|
||||
ctor_tpt
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue