Skip to content

Commit

Permalink
Merge branch 'rust-lang:master' into illumos-aarch64-target
Browse files Browse the repository at this point in the history
  • Loading branch information
Toasterson authored Oct 10, 2023
2 parents d782c8d + 091bb74 commit b16a66f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/src/assert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub fn expand_assert<'cx>(
DUMMY_SP,
Symbol::intern(&format!(
"assertion failed: {}",
pprust::expr_to_string(&cond_expr).escape_debug()
pprust::expr_to_string(&cond_expr)
)),
)],
);
Expand Down
9 changes: 9 additions & 0 deletions tests/ui/macros/assert-long-condition.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// run-fail
// check-run-results
// exec-env:RUST_BACKTRACE=0
// ignore-emscripten no processes
// ignore-tidy-linelength

fn main() {
assert!(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0);
}
4 changes: 4 additions & 0 deletions tests/ui/macros/assert-long-condition.run.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
thread 'main' panicked at $DIR/assert-long-condition.rs:8:5:
assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18
+ 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

0 comments on commit b16a66f

Please sign in to comment.