Support unsized types with the type keyword

This commit is contained in:
Nick Cameron 2014-04-03 13:38:45 +13:00
parent c3b2f2b0c6
commit f78add10cd
39 changed files with 484 additions and 73 deletions

View file

@ -1325,7 +1325,7 @@ impl<'a> Resolver<'a> {
ItemImpl(_, Some(_), _, _) => parent,
ItemTrait(_, _, ref methods) => {
ItemTrait(_, _, _, ref methods) => {
let name_bindings =
self.add_child(ident, parent.clone(), ForbidDuplicateTypes, sp);
@ -3578,7 +3578,7 @@ impl<'a> Resolver<'a> {
methods.as_slice());
}
ItemTrait(ref generics, ref traits, ref methods) => {
ItemTrait(ref generics, _, ref traits, ref methods) => {
// Create a new rib for the self type.
let self_type_rib = Rib::new(NormalRibKind);
// plain insert (no renaming)
@ -3786,9 +3786,8 @@ impl<'a> Resolver<'a> {
}
Some(declaration) => {
for argument in declaration.inputs.iter() {
let binding_mode = ArgumentIrrefutableMode;
this.resolve_pattern(argument.pat,
binding_mode,
ArgumentIrrefutableMode,
None);
this.resolve_type(argument.ty);