summaryrefslogtreecommitdiffstats
path: root/tests/codegen/function-arguments-noopt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen/function-arguments-noopt.rs')
-rw-r--r--tests/codegen/function-arguments-noopt.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/codegen/function-arguments-noopt.rs b/tests/codegen/function-arguments-noopt.rs
index ff76405a4..0c62e0d35 100644
--- a/tests/codegen/function-arguments-noopt.rs
+++ b/tests/codegen/function-arguments-noopt.rs
@@ -29,6 +29,12 @@ pub fn borrow(x: &i32) -> &i32 {
x
}
+// CHECK: align 4 {{i32\*|ptr}} @borrow_mut({{i32\*|ptr}} align 4 %x)
+#[no_mangle]
+pub fn borrow_mut(x: &mut i32) -> &mut i32 {
+ x
+}
+
// CHECK-LABEL: @borrow_call
#[no_mangle]
pub fn borrow_call(x: &i32, f: fn(&i32) -> &i32) -> &i32 {