Created
March 25, 2018 14:34
-
-
Save sinkuu/ba6abd95cb55e839ae33cb022410bb36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(prelude_import)] | |
#![no_std] | |
#[prelude_import] | |
use std::prelude::v1::*; | |
#[macro_use] | |
extern crate std; | |
macro_rules! panic(( $ ( $ t : tt ) * ) => { panic ( $ ( $ t ) * ) } ;); | |
use std::ops::Add; | |
fn misc() { | |
{ | |
if !false { | |
() | |
} else { | |
panic("assertion failed: {}\nwith expansion: !false", "!false") | |
} | |
}; | |
{ | |
if -3 == 3 * -1 { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: -3 == 3 * (-1)", | |
"-3 == 3 * (-1)", | |
) | |
} | |
}; | |
{ | |
let mut __capture0 = ::std::assert_helper::Captured::Unevaluated {}; | |
if !{ | |
let __tmp = r"\b\w{13}\b".is_empty(); | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture0); | |
__tmp | |
} { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: !{1:?}", | |
"!r\"\\b\\w{13}\\b\".is_empty()", | |
::std::assert_helper::DebugFallback::new( | |
__capture0, | |
"(r\"\\b\\w{13}\\b\".is_empty())", | |
), | |
) | |
} | |
}; | |
{ | |
let x = &3; | |
let y = &1; | |
{ | |
match x { | |
ref __capture0 => { | |
match y { | |
ref __capture1 => { | |
match **__capture0 << **__capture1 { | |
__tmp0 => if __tmp0 == 6 { | |
() | |
} else { | |
panic("assertion failed: {}\nwith expansion: *{1:?} << *{2:?} == 6", | |
"*x << *y == 6", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(x)"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture1), | |
"(y)")) | |
}, | |
} | |
} | |
} | |
} | |
} | |
}; | |
} | |
{ | |
use std::cell::RefCell; | |
let x = RefCell::new(0); | |
{ | |
match &0 as &PartialEq<i32> { | |
ref __capture0 => match x.borrow() { | |
ref __capture1 => if **__capture0 == **__capture1 { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: *{1:?} == *{2:?}", | |
"*(&0 as &PartialEq<i32>) == *x.borrow()", | |
::std::assert_helper::DebugFallback::new( | |
::std::assert_helper::Captured::Value(__capture0), | |
"(&0 as &PartialEq<i32>)", | |
), | |
::std::assert_helper::DebugFallback::new( | |
::std::assert_helper::Captured::Value(__capture1), | |
"(x.borrow())", | |
), | |
) | |
}, | |
}, | |
} | |
}; | |
} | |
{ | |
fn x() {} | |
let y: fn() = x; | |
{ | |
match y { | |
ref __capture0 => match x { | |
ref __capture1 => if *__capture0 == *__capture1 { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: {1:?} == {2:?}", | |
"y == x", | |
::std::assert_helper::DebugFallback::new( | |
::std::assert_helper::Captured::Value(__capture0), | |
"(y)", | |
), | |
::std::assert_helper::DebugFallback::new( | |
::std::assert_helper::Captured::Value(__capture1), | |
"(x)", | |
), | |
) | |
}, | |
}, | |
} | |
}; | |
} | |
{ | |
struct Foo; | |
#[automatically_derived] | |
#[allow(unused_qualifications)] | |
impl ::std::cmp::PartialEq for Foo { | |
#[inline] | |
fn eq(&self, __arg_0: &Foo) -> bool { | |
match *__arg_0 { | |
Foo => match *self { | |
Foo => true, | |
}, | |
} | |
} | |
} | |
impl<'a> Add<&'a mut Foo> for Foo { | |
type Output = Self; | |
fn add(self, _: &mut Foo) -> Self { | |
Foo | |
} | |
} | |
{ | |
let mut __capture1 = ::std::assert_helper::Captured::Unevaluated {}; | |
match Foo { | |
ref __capture0 => { | |
match { | |
let __tmp = Foo; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture1); | |
__tmp | |
} { | |
__tmp0 => match Foo { | |
ref mut __capture2 => if *__capture0 == __tmp0 + &mut *__capture2 { | |
() | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} == {2:?} + &mut {3:?}", | |
"Foo == Foo + &mut Foo", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(Foo)"), | |
::std::assert_helper::DebugFallback::new(__capture1, | |
"(Foo)"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture2), | |
"(Foo)")) | |
}, | |
}, | |
} | |
} | |
} | |
}; | |
} | |
} | |
#[cfg(not(stage0))] | |
#[should_panic(expected = "1 == 1 && (y) + (NonDebug(1)) == (NonDebug(0)) && (unevaluated) == 1 && (unevaluated)")] | |
fn capture() { | |
#[structural_match] | |
struct NonDebug(i32); | |
#[automatically_derived] | |
#[allow(unused_qualifications)] | |
impl ::std::cmp::Ord for NonDebug { | |
#[inline] | |
fn cmp(&self, __arg_0: &NonDebug) -> ::std::cmp::Ordering { | |
match *__arg_0 { | |
NonDebug(ref __self_1_0) => match *self { | |
NonDebug(ref __self_0_0) => { | |
match ::std::cmp::Ord::cmp(&(*__self_0_0), &(*__self_1_0)) { | |
::std::cmp::Ordering::Equal => ::std::cmp::Ordering::Equal, | |
__cmp => __cmp, | |
} | |
} | |
}, | |
} | |
} | |
} | |
#[automatically_derived] | |
#[allow(unused_qualifications)] | |
impl ::std::cmp::Eq for NonDebug { | |
#[inline] | |
#[doc(hidden)] | |
fn assert_receiver_is_total_eq(&self) -> () { | |
{ | |
let _: ::std::cmp::AssertParamIsEq<i32>; | |
} | |
} | |
} | |
#[automatically_derived] | |
#[allow(unused_qualifications)] | |
impl ::std::cmp::PartialOrd for NonDebug { | |
#[inline] | |
fn partial_cmp(&self, __arg_0: &NonDebug) -> ::std::option::Option<::std::cmp::Ordering> { | |
match *__arg_0 { | |
NonDebug(ref __self_1_0) => match *self { | |
NonDebug(ref __self_0_0) => { | |
match ::std::cmp::PartialOrd::partial_cmp(&(*__self_0_0), &(*__self_1_0)) { | |
::std::option::Option::Some(::std::cmp::Ordering::Equal) => { | |
::std::option::Option::Some(::std::cmp::Ordering::Equal) | |
} | |
__cmp => __cmp, | |
} | |
} | |
}, | |
} | |
} | |
#[inline] | |
fn lt(&self, __arg_0: &NonDebug) -> bool { | |
match *__arg_0 { | |
NonDebug(ref __self_1_0) => match *self { | |
NonDebug(ref __self_0_0) => { | |
(*__self_0_0) < (*__self_1_0) || !((*__self_1_0) < (*__self_0_0)) && false | |
} | |
}, | |
} | |
} | |
#[inline] | |
fn le(&self, __arg_0: &NonDebug) -> bool { | |
match *__arg_0 { | |
NonDebug(ref __self_1_0) => match *self { | |
NonDebug(ref __self_0_0) => { | |
(*__self_0_0) < (*__self_1_0) || !((*__self_1_0) < (*__self_0_0)) && true | |
} | |
}, | |
} | |
} | |
#[inline] | |
fn gt(&self, __arg_0: &NonDebug) -> bool { | |
match *__arg_0 { | |
NonDebug(ref __self_1_0) => match *self { | |
NonDebug(ref __self_0_0) => { | |
(*__self_0_0) > (*__self_1_0) || !((*__self_1_0) > (*__self_0_0)) && false | |
} | |
}, | |
} | |
} | |
#[inline] | |
fn ge(&self, __arg_0: &NonDebug) -> bool { | |
match *__arg_0 { | |
NonDebug(ref __self_1_0) => match *self { | |
NonDebug(ref __self_0_0) => { | |
(*__self_0_0) > (*__self_1_0) || !((*__self_1_0) > (*__self_0_0)) && true | |
} | |
}, | |
} | |
} | |
} | |
#[automatically_derived] | |
#[allow(unused_qualifications)] | |
impl ::std::cmp::PartialEq for NonDebug { | |
#[inline] | |
fn eq(&self, __arg_0: &NonDebug) -> bool { | |
match *__arg_0 { | |
NonDebug(ref __self_1_0) => match *self { | |
NonDebug(ref __self_0_0) => true && (*__self_0_0) == (*__self_1_0), | |
}, | |
} | |
} | |
#[inline] | |
fn ne(&self, __arg_0: &NonDebug) -> bool { | |
match *__arg_0 { | |
NonDebug(ref __self_1_0) => match *self { | |
NonDebug(ref __self_0_0) => false || (*__self_0_0) != (*__self_1_0), | |
}, | |
} | |
} | |
} | |
impl Add for NonDebug { | |
type Output = Self; | |
fn add(self, rhs: Self) -> Self { | |
NonDebug(self.0 + rhs.0) | |
} | |
} | |
let x = 1; | |
let y = NonDebug(0); | |
{ | |
#[allow(unused)] | |
let __capture0 = ::std::assert_helper::Unevaluated {}; | |
let mut __capture1 = ::std::assert_helper::Captured::Unevaluated {}; | |
let mut __capture2 = ::std::assert_helper::Captured::Unevaluated {}; | |
#[allow(unused)] | |
let __capture3 = ::std::assert_helper::Unevaluated {}; | |
#[allow(unused)] | |
let __capture4 = ::std::assert_helper::Unevaluated {}; | |
let mut __capture5 = ::std::assert_helper::Captured::Unevaluated {}; | |
match x { | |
ref __capture0 => if *__capture0 == 1 { | |
match { | |
let __tmp = y; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture1); | |
__tmp | |
} { | |
__tmp0 => match __tmp0 + { | |
let __tmp = NonDebug(1); | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture2); | |
__tmp | |
} { | |
__tmp1 => match NonDebug(0) { | |
ref __capture3 => if __tmp1 == *__capture3 { | |
match x { | |
ref __capture4 => if *__capture4 == 1 { | |
if { | |
let __tmp = { 1 == 0 }; | |
::std::assert_helper::TryCapture::try_capture( | |
&__tmp, | |
&mut __capture5, | |
); | |
__tmp | |
} { | |
() | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} == 1 && {2:?} + {3:?} == {4:?} && {5:?} == 1 && {6:?}", | |
"x == 1 && y + NonDebug(1) == NonDebug(0) && x == 1 && { 1 == 0 }", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(x)"), | |
::std::assert_helper::DebugFallback::new(__capture1, | |
"(y)"), | |
::std::assert_helper::DebugFallback::new(__capture2, | |
"(NonDebug(1))"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture3), | |
"(NonDebug(0))"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture4), | |
"(x)"), | |
::std::assert_helper::DebugFallback::new(__capture5, | |
"({ 1 == 0 })")) | |
} | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} == 1 && {2:?} + {3:?} == {4:?} && {5:?} == 1 && {6:?}", | |
"x == 1 && y + NonDebug(1) == NonDebug(0) && x == 1 && { 1 == 0 }", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(x)"), | |
::std::assert_helper::DebugFallback::new(__capture1, | |
"(y)"), | |
::std::assert_helper::DebugFallback::new(__capture2, | |
"(NonDebug(1))"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture3), | |
"(NonDebug(0))"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture4), | |
"(x)"), | |
::std::assert_helper::DebugFallback::new(__capture5, | |
"({ 1 == 0 })")) | |
}, | |
} | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} == 1 && {2:?} + {3:?} == {4:?} && {5:?} == 1 && {6:?}", | |
"x == 1 && y + NonDebug(1) == NonDebug(0) && x == 1 && { 1 == 0 }", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(x)"), | |
::std::assert_helper::DebugFallback::new(__capture1, | |
"(y)"), | |
::std::assert_helper::DebugFallback::new(__capture2, | |
"(NonDebug(1))"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture3), | |
"(NonDebug(0))"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture4), | |
"(x)"), | |
::std::assert_helper::DebugFallback::new(__capture5, | |
"({ 1 == 0 })")) | |
}, | |
}, | |
}, | |
} | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} == 1 && {2:?} + {3:?} == {4:?} && {5:?} == 1 && {6:?}", | |
"x == 1 && y + NonDebug(1) == NonDebug(0) && x == 1 && { 1 == 0 }", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(x)"), | |
::std::assert_helper::DebugFallback::new(__capture1, | |
"(y)"), | |
::std::assert_helper::DebugFallback::new(__capture2, | |
"(NonDebug(1))"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture3), | |
"(NonDebug(0))"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture4), | |
"(x)"), | |
::std::assert_helper::DebugFallback::new(__capture5, | |
"({ 1 == 0 })")) | |
}, | |
} | |
}; | |
} | |
fn escape_expr() { | |
{ | |
if "\u{2603}\n" == "\u{2600}\n" { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: \"\u{2603}\\n\" == \"\u{2600}\\n\"", | |
"\"\u{2603}\\n\" == \"\u{2600}\\n\"", | |
) | |
} | |
}; | |
} | |
fn escape_expn() { | |
{ | |
if "\u{2603}\n" == "\u{2600}\n" { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: \"\u{2603}\\n\" == \"\u{2600}\\n\"", | |
"\"\u{2603}\\n\" == \"\u{2600}\\n\"", | |
) | |
} | |
}; | |
} | |
fn evaluation_order() { | |
let mut it = <[_]>::into_vec(box [1, 2, 4, 8, 16]).into_iter(); | |
{ | |
#[allow(unused)] | |
let __capture0 = ::std::assert_helper::Unevaluated {}; | |
#[allow(unused)] | |
let __capture1 = ::std::assert_helper::Unevaluated {}; | |
let mut __capture2 = ::std::assert_helper::Captured::Unevaluated {}; | |
let mut __capture3 = ::std::assert_helper::Captured::Unevaluated {}; | |
#[allow(unused)] | |
let __capture4 = ::std::assert_helper::Unevaluated {}; | |
match it.next().unwrap() { | |
ref __capture0 => if *__capture0 != 1 { | |
() | |
} else { | |
match it.next().unwrap() { | |
ref __capture1 => if *__capture1 == 2 { | |
match { | |
let __tmp = it.next().unwrap(); | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture2); | |
__tmp | |
} { | |
__tmp0 => match __tmp0 + { | |
let __tmp = it.next().unwrap(); | |
::std::assert_helper::TryCapture::try_capture( | |
&__tmp, | |
&mut __capture3, | |
); | |
__tmp | |
} { | |
__tmp1 => if __tmp1 == 12 { | |
match it.next().unwrap() { | |
ref __capture4 => if *__capture4 == 16 { | |
() | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} != 1 || {2:?} == 2 && ({3:?} + {4:?} == 12 && {5:?} == 16)", | |
"it.next().unwrap() != 1 ||\n it.next().unwrap() == 2 &&\n (it.next().unwrap() + it.next().unwrap() == 12 &&\n it.next().unwrap() == 16)", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture1), | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(__capture2, | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(__capture3, | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture4), | |
"(it.next().unwrap())")) | |
}, | |
} | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} != 1 || {2:?} == 2 && ({3:?} + {4:?} == 12 && {5:?} == 16)", | |
"it.next().unwrap() != 1 ||\n it.next().unwrap() == 2 &&\n (it.next().unwrap() + it.next().unwrap() == 12 &&\n it.next().unwrap() == 16)", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture1), | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(__capture2, | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(__capture3, | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture4), | |
"(it.next().unwrap())")) | |
}, | |
}, | |
} | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} != 1 || {2:?} == 2 && ({3:?} + {4:?} == 12 && {5:?} == 16)", | |
"it.next().unwrap() != 1 ||\n it.next().unwrap() == 2 &&\n (it.next().unwrap() + it.next().unwrap() == 12 &&\n it.next().unwrap() == 16)", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture1), | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(__capture2, | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(__capture3, | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture4), | |
"(it.next().unwrap())")) | |
}, | |
} | |
}, | |
} | |
}; | |
let mut it = <[_]>::into_vec(box [2, 3, 16]).into_iter(); | |
{ | |
let mut __capture0 = ::std::assert_helper::Captured::Unevaluated {}; | |
let mut __capture1 = ::std::assert_helper::Captured::Unevaluated {}; | |
match { | |
let __tmp = it.next().unwrap(); | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture0); | |
__tmp | |
} { | |
__tmp0 => { | |
match __tmp0 << { | |
let __tmp = it.next().unwrap(); | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture1); | |
__tmp | |
} { | |
__tmp1 => { | |
match it.next().unwrap() { | |
ref __capture2 => if __tmp1 == *__capture2 { | |
() | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} << {2:?} == {3:?}", | |
"it.next().unwrap() << it.next().unwrap() == it.next().unwrap()", | |
::std::assert_helper::DebugFallback::new(__capture0, | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(__capture1, | |
"(it.next().unwrap())"), | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture2), | |
"(it.next().unwrap())")) | |
}, | |
} | |
} | |
} | |
} | |
} | |
}; | |
let mut b = false; | |
{ | |
let mut __capture0 = ::std::assert_helper::Captured::Unevaluated {}; | |
if true || { | |
let __tmp = { | |
b = true; | |
false | |
}; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture0); | |
__tmp | |
} { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: true || {1:?}", | |
"true || { b = true; false }", | |
::std::assert_helper::DebugFallback::new(__capture0, "({ b = true; false })"), | |
) | |
} | |
}; | |
{ | |
let mut __capture0 = ::std::assert_helper::Captured::Unevaluated {}; | |
if !{ | |
let __tmp = b; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture0); | |
__tmp | |
} { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: !{1:?}", | |
"!b", | |
::std::assert_helper::DebugFallback::new(__capture0, "(b)"), | |
) | |
} | |
}; | |
{ | |
let mut __capture0 = ::std::assert_helper::Captured::Unevaluated {}; | |
if !(false && { | |
let __tmp = { | |
b = true; | |
false | |
}; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture0); | |
__tmp | |
}) { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: !(false && {1:?})", | |
"!(false && { b = true; false })", | |
::std::assert_helper::DebugFallback::new(__capture0, "({ b = true; false })"), | |
) | |
} | |
}; | |
{ | |
let mut __capture0 = ::std::assert_helper::Captured::Unevaluated {}; | |
if !{ | |
let __tmp = b; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture0); | |
__tmp | |
} { | |
() | |
} else { | |
panic( | |
"assertion failed: {}\nwith expansion: !{1:?}", | |
"!b", | |
::std::assert_helper::DebugFallback::new(__capture0, "(b)"), | |
) | |
} | |
}; | |
let mut n = 0; | |
{ | |
let mut __capture0 = ::std::assert_helper::Captured::Unevaluated {}; | |
let mut __capture1 = ::std::assert_helper::Captured::Unevaluated {}; | |
let mut __capture2 = ::std::assert_helper::Captured::Unevaluated {}; | |
let mut __capture3 = ::std::assert_helper::Captured::Unevaluated {}; | |
let mut __capture4 = ::std::assert_helper::Captured::Unevaluated {}; | |
let mut __capture5 = ::std::assert_helper::Captured::Unevaluated {}; | |
match false || { | |
let __tmp = { | |
n += 1; | |
true | |
}; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture0); | |
__tmp | |
} { | |
__tmp3 => if true && (__tmp3 || { | |
let __tmp = { | |
n += 2; | |
true | |
}; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture1); | |
__tmp | |
}) { | |
match { | |
let __tmp = { | |
n += 4; | |
false | |
}; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture2); | |
__tmp | |
} { | |
__tmp0 => match __tmp0 && { | |
let __tmp = { | |
n += 8; | |
true | |
}; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture3); | |
__tmp | |
} { | |
__tmp1 => match { | |
let __tmp = { | |
n += 16; | |
false | |
}; | |
::std::assert_helper::TryCapture::try_capture(&__tmp, &mut __capture4); | |
__tmp | |
} { | |
__tmp2 => if __tmp1 != (__tmp2 || { | |
let __tmp = { | |
n += 32; | |
true | |
}; | |
::std::assert_helper::TryCapture::try_capture( | |
&__tmp, | |
&mut __capture5, | |
); | |
__tmp | |
}) { | |
() | |
} else { | |
panic("assertion failed: {}\nwith expansion: true && (false || {1:?} || {2:?}) && (({3:?} && {4:?}) != ({5:?} || {6:?}))", | |
"true && (false || { n += 1; true } || { n += 2; true }) &&\n (({ n += 4; false } && { n += 8; true }) !=\n ({ n += 16; false } || { n += 32; true }))", | |
::std::assert_helper::DebugFallback::new(__capture0, | |
"({ n += 1; true })"), | |
::std::assert_helper::DebugFallback::new(__capture1, | |
"({ n += 2; true })"), | |
::std::assert_helper::DebugFallback::new(__capture2, | |
"({ n += 4; false })"), | |
::std::assert_helper::DebugFallback::new(__capture3, | |
"({ n += 8; true })"), | |
::std::assert_helper::DebugFallback::new(__capture4, | |
"({ n += 16; false })"), | |
::std::assert_helper::DebugFallback::new(__capture5, | |
"({ n += 32; true })")) | |
}, | |
}, | |
}, | |
} | |
} else { | |
panic("assertion failed: {}\nwith expansion: true && (false || {1:?} || {2:?}) && (({3:?} && {4:?}) != ({5:?} || {6:?}))", | |
"true && (false || { n += 1; true } || { n += 2; true }) &&\n (({ n += 4; false } && { n += 8; true }) !=\n ({ n += 16; false } || { n += 32; true }))", | |
::std::assert_helper::DebugFallback::new(__capture0, | |
"({ n += 1; true })"), | |
::std::assert_helper::DebugFallback::new(__capture1, | |
"({ n += 2; true })"), | |
::std::assert_helper::DebugFallback::new(__capture2, | |
"({ n += 4; false })"), | |
::std::assert_helper::DebugFallback::new(__capture3, | |
"({ n += 8; true })"), | |
::std::assert_helper::DebugFallback::new(__capture4, | |
"({ n += 16; false })"), | |
::std::assert_helper::DebugFallback::new(__capture5, | |
"({ n += 32; true })")) | |
}, | |
} | |
}; | |
{ | |
match n { | |
ref __capture0 => { | |
match 1 + 4 { | |
__tmp0 => { | |
match __tmp0 + 16 { | |
__tmp1 => if *__capture0 == __tmp1 + 32 { | |
() | |
} else { | |
panic("assertion failed: {}\nwith expansion: {1:?} == 1 + 4 + 16 + 32", | |
"n == 1 + 4 + 16 + 32", | |
::std::assert_helper::DebugFallback::new(::std::assert_helper::Captured::Value(__capture0), | |
"(n)")) | |
}, | |
} | |
} | |
} | |
} | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment