]> git.lizzy.rs Git - rust.git/commitdiff
Fix bitrotted generator panic emission
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Sat, 9 Sep 2017 09:11:13 +0000 (11:11 +0200)
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Sat, 9 Sep 2017 09:11:13 +0000 (11:11 +0200)
src/librustc_trans/mir/block.rs

index 0f42a244a1ff906ef4e6a543c66eb5b6ef612f6a..3e802c8be5bf4f3569648b76e06162b128e05e26 100644 (file)
@@ -383,16 +383,16 @@ fn trans_terminator(&mut self,
                         };
                         let msg_str = Symbol::intern(str).as_str();
                         let msg_str = C_str_slice(bcx.ccx, msg_str);
-                        let msg_file_line = C_struct(bcx.ccx,
-                                                     &[msg_str, filename, line],
+                        let msg_file_line_col = C_struct(bcx.ccx,
+                                                     &[msg_str, filename, line, col],
                                                      false);
-                        let align = llalign_of_min(bcx.ccx, common::val_ty(msg_file_line));
-                        let msg_file_line = consts::addr_of(bcx.ccx,
-                                                            msg_file_line,
-                                                            align,
-                                                            "panic_loc");
+                        let align = llalign_of_min(bcx.ccx, common::val_ty(msg_file_line_col));
+                        let msg_file_line_col = consts::addr_of(bcx.ccx,
+                                                                msg_file_line_col,
+                                                                align,
+                                                                "panic_loc");
                         (lang_items::PanicFnLangItem,
-                         vec![msg_file_line],
+                         vec![msg_file_line_col],
                          None)
                     }
                 };