Refactor so that references to traits are not represented using a type with a
bare function store (which is not in fact a kind of value) but rather ty::TraitRef. Removes many uses of fail!() and other telltale signs of type-semantic mismatch. cc #4183 (not a fix, but related)
This commit is contained in:
parent
3333b0f117
commit
d28f734412
46 changed files with 1069 additions and 860 deletions
|
@ -337,6 +337,17 @@ pub fn mk_ty_path_global(cx: @ext_ctxt,
|
|||
let ty = @ast::Ty { id: cx.next_id(), node: ty, span: span };
|
||||
ty
|
||||
}
|
||||
pub fn mk_trait_ref_global(cx: @ext_ctxt,
|
||||
span: span,
|
||||
+idents: ~[ ast::ident ])
|
||||
-> @ast::trait_ref
|
||||
{
|
||||
let path = build::mk_raw_path_global(span, idents);
|
||||
@ast::trait_ref {
|
||||
path: path,
|
||||
ref_id: cx.next_id()
|
||||
}
|
||||
}
|
||||
pub fn mk_simple_ty_path(cx: @ext_ctxt,
|
||||
span: span,
|
||||
ident: ast::ident)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue