summaryrefslogtreecommitdiffstats
path: root/tests/ui/stable-mir-print/basic_function.stdout
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/stable-mir-print/basic_function.stdout
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/stable-mir-print/basic_function.stdout234
1 files changed, 234 insertions, 0 deletions
diff --git a/tests/ui/stable-mir-print/basic_function.stdout b/tests/ui/stable-mir-print/basic_function.stdout
new file mode 100644
index 000000000..d9b33a425
--- /dev/null
+++ b/tests/ui/stable-mir-print/basic_function.stdout
@@ -0,0 +1,234 @@
+// WARNING: This is highly experimental output it's intended for stable-mir developers only.
+// If you find a bug or want to improve the output open a issue at https://github.com/rust-lang/project-stable-mir.
+fn foo(_0: i32) -> i32 {
+ let mut _0: (i32, bool);
+}
+ bb0: {
+ _2 = 1 Add const 1_i32
+ assert(!move _2 bool),"attempt to compute `{} + {}`, which would overflow", 1, const 1_i32) -> [success: bb1, unwind continue]
+ }
+ bb1: {
+ _0 = move _2
+ return
+ }
+fn bar(_0: &mut Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+}) -> Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+} {
+ let mut _0: Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+};
+ let mut _1: &Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+};
+ let _2: ();
+ let mut _3: &mut Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+};
+}
+ bb0: {
+ _3 = refShared1
+ _2 = const <Vec<i32> as Clone>::clone(move _3) -> [return: bb1, unwind continue]
+ }
+ bb1: {
+ _5 = refMut {
+ kind: TwoPhaseBorrow,
+}2
+ _4 = const Vec::<i32>::push(move _5, const 1_i32) -> [return: bb2, unwind: bb3]
+ }
+ bb2: {
+ _0 = move _2
+ return
+ }
+ bb3: {
+ drop(_2) -> [return: bb4, unwind terminate]
+ }
+ bb4: {
+ resume
+ }
+fn main() -> () {
+}
+ bb0: {
+ return
+ }