fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
5.6 KiB147 linesraw
1#![feature(prelude_import)]
2#![no_std]
3// check-pass
4// compile-flags: -Z unpretty=expanded
5
6#![feature(core_intrinsics, generic_assert)]
7#[prelude_import]
8use ::std::prelude::rust_2015::*;
9#[macro_use]
10extern crate std;
11
12fn arbitrary_consuming_method_for_demonstration_purposes() {
13    let elem = 1i32;
14    {
15        #[allow(unused_imports)]
16        use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
17        let mut __capture0 = ::core::asserting::Capture::new();
18        let __local_bind0 = &elem;
19        if ::core::intrinsics::unlikely(!(*{
20                                    (&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
21                                    __local_bind0
22                                } as usize)) {
23
24
25
26
27                {
28                    ::std::rt::panic_fmt(format_args!("Assertion failed: elem as usize\nWith captures:\n  elem = {0:?}\n",
29                            __capture0));
30                }
31            }
32    };
33}
34fn addr_of() {
35    let elem = 1i32;
36    {
37        #[allow(unused_imports)]
38        use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
39        let mut __capture0 = ::core::asserting::Capture::new();
40        let __local_bind0 = &elem;
41        if ::core::intrinsics::unlikely(!&*__local_bind0) {
42                (&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
43                {
44                    ::std::rt::panic_fmt(format_args!("Assertion failed: &elem\nWith captures:\n  elem = {0:?}\n",
45                            __capture0));
46                }
47            }
48    };
49}
50fn binary() {
51    let elem = 1i32;
52    {
53        #[allow(unused_imports)]
54        use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
55        let mut __capture0 = ::core::asserting::Capture::new();
56        let __local_bind0 = &elem;
57        if ::core::intrinsics::unlikely(!(*__local_bind0 == 1)) {
58                (&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
59                {
60                    ::std::rt::panic_fmt(format_args!("Assertion failed: elem == 1\nWith captures:\n  elem = {0:?}\n",
61                            __capture0));
62                }
63            }
64    };
65    {
66        #[allow(unused_imports)]
67        use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
68        let mut __capture0 = ::core::asserting::Capture::new();
69        let __local_bind0 = &elem;
70        if ::core::intrinsics::unlikely(!(*__local_bind0 >= 1)) {
71                (&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
72                {
73                    ::std::rt::panic_fmt(format_args!("Assertion failed: elem >= 1\nWith captures:\n  elem = {0:?}\n",
74                            __capture0));
75                }
76            }
77    };
78    {
79        #[allow(unused_imports)]
80        use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
81        let mut __capture0 = ::core::asserting::Capture::new();
82        let __local_bind0 = &elem;
83        if ::core::intrinsics::unlikely(!(*__local_bind0 > 0)) {
84                (&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
85                {
86                    ::std::rt::panic_fmt(format_args!("Assertion failed: elem > 0\nWith captures:\n  elem = {0:?}\n",
87                            __capture0));
88                }
89            }
90    };
91    {
92        #[allow(unused_imports)]
93        use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
94        let mut __capture0 = ::core::asserting::Capture::new();
95        let __local_bind0 = &elem;
96        if ::core::intrinsics::unlikely(!(*__local_bind0 < 3)) {
97                (&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
98                {
99                    ::std::rt::panic_fmt(format_args!("Assertion failed: elem < 3\nWith captures:\n  elem = {0:?}\n",
100                            __capture0));
101                }
102            }
103    };
104    {
105        #[allow(unused_imports)]
106        use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
107        let mut __capture0 = ::core::asserting::Capture::new();
108        let __local_bind0 = &elem;
109        if ::core::intrinsics::unlikely(!(*__local_bind0 <= 3)) {
110                (&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
111                {
112                    ::std::rt::panic_fmt(format_args!("Assertion failed: elem <= 3\nWith captures:\n  elem = {0:?}\n",
113                            __capture0));
114                }
115            }
116    };
117    {
118        #[allow(unused_imports)]
119        use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
120        let mut __capture0 = ::core::asserting::Capture::new();
121        let __local_bind0 = &elem;
122        if ::core::intrinsics::unlikely(!(*__local_bind0 != 3)) {
123                (&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
124                {
125                    ::std::rt::panic_fmt(format_args!("Assertion failed: elem != 3\nWith captures:\n  elem = {0:?}\n",
126                            __capture0));
127                }
128            }
129    };
130}
131fn unary() {
132    let elem = &1i32;
133    {
134        #[allow(unused_imports)]
135        use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
136        let mut __capture0 = ::core::asserting::Capture::new();
137        let __local_bind0 = &elem;
138        if ::core::intrinsics::unlikely(!**__local_bind0) {
139                (&::core::asserting::Wrapper(__local_bind0)).try_capture(&mut __capture0);
140                {
141                    ::std::rt::panic_fmt(format_args!("Assertion failed: *elem\nWith captures:\n  elem = {0:?}\n",
142                            __capture0));
143                }
144            }
145    };
146}
147fn main() {}