We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc722b1 commit c19e4e1Copy full SHA for c19e4e1
src/comp/middle/trans.rs
@@ -621,11 +621,22 @@ fn type_of_inner(@crate_ctxt cx, @ty.t t) -> TypeRef {
621
}
622
623
fn type_of_arg(@crate_ctxt cx, &ty.arg arg) -> TypeRef {
624
- auto ty = type_of_inner(cx, arg.ty);
+ alt (arg.ty.struct) {
625
+ case (ty.ty_param(_)) {
626
+ if (arg.mode == ast.alias) {
627
+ ret T_typaram_ptr(cx.tn);
628
+ }
629
630
+ case (_) {
631
+ // fall through
632
633
634
+
635
+ auto typ = type_of_inner(cx, arg.ty);
636
if (arg.mode == ast.alias) {
- ty = T_ptr(ty);
637
+ typ = T_ptr(typ);
638
- ret ty;
639
+ ret typ;
640
641
642
// Name sanitation. LLVM will happily accept identifiers with weird names, but
0 commit comments