@@ -769,30 +769,30 @@ fn create_function(fcx: fn_ctxt) -> @metadata<subprogram_md> {
769
769
ast_map:: node_item( item, _) => {
770
770
match /*bad*/ copy item. node {
771
771
ast : : item_fn( decl, _, _, _) => {
772
- ( item. ident, Some ( decl. output) , item. id)
772
+ ( item. ident, decl. output, item. id)
773
773
}
774
774
_ => fcx. ccx. sess. span_bug( item. span, ~"create_function: item \
775
775
bound to non-function")
776
776
}
777
777
}
778
778
ast_map:: node_method( method, _, _) => {
779
- ( method. ident , Some ( method. decl . output ) , method. id )
779
+ ( method. ident, method. decl. output, method. id)
780
780
}
781
781
ast_map:: node_expr( expr) => {
782
782
match /*bad*/ copy expr. node {
783
783
ast : : expr_fn( _, decl, _, _) => {
784
- ( ( dbg_cx. names ) ( ~"fn ") , Some ( decl. output ) , expr. id )
784
+ ( ( dbg_cx. names) ( ~"fn ") , decl. output, expr. id)
785
785
}
786
786
ast:: expr_fn_block( decl, _, _) => {
787
- ( ( dbg_cx. names ) ( ~"fn ") , Some ( decl. output ) , expr. id )
787
+ ( ( dbg_cx. names ) ( ~"fn ") , decl. output , expr. id )
788
788
}
789
789
_ => fcx. ccx . sess . span_bug ( expr. span ,
790
790
~"create_function: \
791
791
expected an expr_fn or fn_block here")
792
792
}
793
793
}
794
794
ast_map:: node_dtor ( _, _, did, _) => {
795
- ( ( dbg_cx. names ) ( ~"dtor") , None , did. node )
795
+ ( ( dbg_cx. names ) ( ~"dtor") , ast_util :: dtor_ty ( ) , did. node )
796
796
}
797
797
_ => fcx. ccx . sess . bug ( ~"create_function: unexpected \
798
798
sort of node")
@@ -810,8 +810,7 @@ fn create_function(fcx: fn_ctxt) -> @metadata<subprogram_md> {
810
810
811
811
let loc = cx. sess . codemap . lookup_char_pos ( sp. lo ) ;
812
812
let file_node = create_file ( cx, loc. file . name ) . node ;
813
- let ty_node = if ret_ty. is_some ( ) && cx. sess . opts . extra_debuginfo {
814
- let ret_ty = ret_ty. unwrap ( ) ;
813
+ let ty_node = if cx. sess . opts . extra_debuginfo {
815
814
match ret_ty. node {
816
815
ast:: ty_nil => llnull ( ) ,
817
816
_ => create_ty ( cx, ty:: node_id_to_type ( cx. tcx , id) , ret_ty) . node
0 commit comments