Merge branch 'master' of git@github.com:graydon/rust into exterior_and_mutable_types
This commit is contained in:
commit
8660ce50a1
@ -325,7 +325,7 @@ TEST_XFAILS_X86 := test/run-pass/mlist-cycle.rs \
|
||||
test/run-pass/vec-slice.rs \
|
||||
test/run-pass/fn-lval.rs \
|
||||
test/run-pass/generic-fn-infer.rs \
|
||||
test/run-pass/generic-obj.rs \
|
||||
test/run-pass/generic-fn-twice.rs \
|
||||
test/run-pass/generic-recursive-tag.rs \
|
||||
test/run-pass/mutable-alias-vec.rs \
|
||||
test/run-pass/mutable-vec-drop.rs \
|
||||
@ -372,6 +372,7 @@ TEST_XFAILS_LLVM := $(addprefix test/run-pass/, \
|
||||
generic-drop-glue.rs \
|
||||
generic-exterior-box.rs \
|
||||
generic-fn-infer.rs \
|
||||
generic-fn-twice.rs \
|
||||
generic-fn.rs \
|
||||
generic-obj-with-derived-type.rs \
|
||||
generic-obj.rs \
|
||||
|
@ -931,7 +931,7 @@ let pattern_resolving_visitor
|
||||
Ast.PAT_tag (lval, pats) ->
|
||||
let lval_nm = lval_to_name lval in
|
||||
let lval_id = lval_base_id lval in
|
||||
let tag_ctor_id = lval_to_referent cx lval_id in
|
||||
let tag_ctor_id = (lval_item cx lval).id in
|
||||
if referent_is_item cx tag_ctor_id
|
||||
|
||||
(* FIXME (issue #76): we should actually check here that the
|
||||
|
@ -432,15 +432,15 @@ let fn_output_ty (fn_ty:Ast.ty) : Ast.ty =
|
||||
(* name of tag constructor function -> name for indexing in the ty_tag *)
|
||||
let rec tag_ctor_name_to_tag_name (name:Ast.name) : Ast.name =
|
||||
match name with
|
||||
Ast.NAME_base nb ->
|
||||
begin
|
||||
match nb with
|
||||
Ast.BASE_ident _ -> name
|
||||
| Ast.BASE_app (id, _) -> Ast.NAME_base (Ast.BASE_ident id)
|
||||
| _ ->
|
||||
bug () "tag_or_iso_ty_tup_by_name with non-tag-ctor name"
|
||||
end
|
||||
| Ast.NAME_ext (inner_name, _) -> tag_ctor_name_to_tag_name inner_name
|
||||
Ast.NAME_base (Ast.BASE_ident _) -> name
|
||||
| Ast.NAME_base (Ast.BASE_app (id, _)) ->
|
||||
Ast.NAME_base (Ast.BASE_ident id)
|
||||
|
||||
| Ast.NAME_ext (_, Ast.COMP_ident id)
|
||||
| Ast.NAME_ext (_, Ast.COMP_app (id, _)) ->
|
||||
Ast.NAME_base (Ast.BASE_ident id)
|
||||
|
||||
| _ -> bug () "tag_or_iso_ty_tup_by_name with non-tag-ctor name"
|
||||
;;
|
||||
|
||||
let tag_or_iso_ty_tup_by_name (ty:Ast.ty) (name:Ast.name) : Ast.ty_tup =
|
||||
|
10
src/test/run-pass/generic-fn-twice.rs
Normal file
10
src/test/run-pass/generic-fn-twice.rs
Normal file
@ -0,0 +1,10 @@
|
||||
// -*- rust -*-
|
||||
|
||||
mod foomod {
|
||||
fn foo[T]() {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
foomod.foo[int]();
|
||||
foomod.foo[int]();
|
||||
}
|
@ -11,7 +11,7 @@ obj buf[T](tup(T,T,T) data) {
|
||||
}
|
||||
}
|
||||
|
||||
fn take(T t) {}
|
||||
fn take(&T t) {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user