about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-04-05 19:42:01 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-04-15 07:46:47 +0000
commitc9409136c7da51b403d18764128f93bb22b7fe22 (patch)
tree3c4c518f06fe3a2b59479be77388c6c429d1022f /tests
parent4a1ff5e04d0856cf9173973caf60097b833af9af (diff)
downloadrust-c9409136c7da51b403d18764128f93bb22b7fe22.tar.gz
rust-c9409136c7da51b403d18764128f93bb22b7fe22.zip
Bless run-make.
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make/const_fn_mir/dump.mir8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/run-make/const_fn_mir/dump.mir b/tests/run-make/const_fn_mir/dump.mir
index ab4084c952a..9cc70d3b0e6 100644
--- a/tests/run-make/const_fn_mir/dump.mir
+++ b/tests/run-make/const_fn_mir/dump.mir
@@ -2,9 +2,15 @@
 // and is subject to change without notice. Knock yourself out.
 fn foo() -> i32 {
     let mut _0: i32;                     // return place in scope 0 at main.rs:4:19: 4:22
+    let mut _1: (i32, bool);             // in scope 0 at main.rs:5:5: 5:10
 
     bb0: {
-        _0 = const 11_i32;               // scope 0 at main.rs:5:5: 5:10
+        _1 = CheckedAdd(const 5_i32, const 6_i32); // scope 0 at main.rs:5:5: 5:10
+        assert(!move (_1.1: bool), "attempt to compute `{} + {}`, which would overflow", const 5_i32, const 6_i32) -> bb1; // scope 0 at main.rs:5:5: 5:10
+    }
+
+    bb1: {
+        _0 = move (_1.0: i32);           // scope 0 at main.rs:5:5: 5:10
         return;                          // scope 0 at main.rs:6:2: 6:2
     }
 }