From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/stable-mir-print/basic_function.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/ui/stable-mir-print/basic_function.rs (limited to 'tests/ui/stable-mir-print/basic_function.rs') diff --git a/tests/ui/stable-mir-print/basic_function.rs b/tests/ui/stable-mir-print/basic_function.rs new file mode 100644 index 000000000..6394edcbb --- /dev/null +++ b/tests/ui/stable-mir-print/basic_function.rs @@ -0,0 +1,15 @@ +// compile-flags: -Z unpretty=stable-mir -Z mir-opt-level=3 +// check-pass +// only-x86_64 + +fn foo(i:i32) -> i32 { + i + 1 +} + +fn bar(vec: &mut Vec) -> Vec { + let mut new_vec = vec.clone(); + new_vec.push(1); + new_vec +} + +fn main(){} -- cgit v1.2.3