1
Fork 0

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:
Niko Matsakis 2013-03-27 06:16:28 -04:00
parent 3333b0f117
commit d28f734412
46 changed files with 1069 additions and 860 deletions

View file

@ -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)