auto merge of #8150 : dotdash/rust/assert_bloat, r=huonw
Assertions without a message get a generated message that consists of a prefix plus the stringified expression that is being asserted. That prefix is currently a unique string, while a static string would be sufficient and needs less code.
This commit is contained in:
commit
66a0b5870d
1 changed files with 1 additions and 1 deletions
|
@ -683,7 +683,7 @@ pub fn std_macros() -> @str {
|
|||
($cond:expr) => {
|
||||
if !$cond {
|
||||
::std::sys::FailWithCause::fail_with(
|
||||
~\"assertion failed: \" + stringify!($cond), file!(), line!())
|
||||
\"assertion failed: \" + stringify!($cond), file!(), line!())
|
||||
}
|
||||
};
|
||||
($cond:expr, $msg:expr) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue