rust/compiler
Nicholas Nethercote 7528fdc4c4 Don't escape_debug the condition of assert!.
The assertion in `assert-long-condition.rs` used to be fail like this, all on
one line:
```
thread 'main' panicked at 'assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18\n                                + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0', tests/ui/macros/assert-long-condition.rs:7:5
```
The `\n` and subsequent indent is because the condition is pretty-printed, and
the pretty-printer inserts a newline. Printing the newline in this way is
arguably reasonable given that the message appears within single quotes, which
is very similar to a string literal.

However, after the assertion printing improvements that were released in 1.73,
the assertion now fails like this:
```
thread 'main' panicked at tests/ui/macros/assert-long-condition.rs:7:5:
assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18\n                                + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0
```
Now that there are no single quotes around the pretty-printed condition, the
`\n` is quite strange.

This commit gets rid of the `\n`, by removing the `escape_debug` done on the
pretty-printed message. This results in the following:
```
thread 'main' panicked at tests/ui/macros/assert-long-condition.rs:7: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
```
The overly-large indent is still strange, but that's a separate pretty-printing issue.

This change helps with #108341.
2023-10-10 09:08:11 +11:00
..
rustc
rustc_abi
rustc_arena
rustc_ast
rustc_ast_lowering
rustc_ast_passes
rustc_ast_pretty
rustc_attr Factor out insert_or_error. 2023-10-06 14:57:09 +11:00
rustc_baked_icu_data
rustc_borrowck Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiser 2023-10-06 18:44:32 +00:00
rustc_builtin_macros Don't escape_debug the condition of assert!. 2023-10-10 09:08:11 +11:00
rustc_codegen_cranelift Auto merge of #116487 - tamird:avoid-unwrap-absolute, r=bjorn3 2023-10-08 05:24:16 +00:00
rustc_codegen_gcc
rustc_codegen_llvm
rustc_codegen_ssa Auto merge of #116454 - tmiasko:small-dominators, r=cjgillot 2023-10-08 12:38:14 +00:00
rustc_const_eval Auto merge of #115583 - RalfJung:packed-unsized, r=lcnr 2023-10-07 10:57:18 +00:00
rustc_data_structures
rustc_driver
rustc_driver_impl rustc_driver: avoid fallible conversions 2023-10-06 08:54:14 -04:00
rustc_error_codes Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiser 2023-10-06 18:44:32 +00:00
rustc_error_messages
rustc_errors
rustc_expand
rustc_feature
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir
rustc_hir_analysis Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiser 2023-10-06 18:44:32 +00:00
rustc_hir_pretty
rustc_hir_typeck Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiser 2023-10-06 18:44:32 +00:00
rustc_incremental
rustc_index Preserve DebugInfo in DeadStoreElimination. 2023-10-06 15:46:11 +00:00
rustc_infer Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiser 2023-10-06 18:44:32 +00:00
rustc_interface
rustc_lexer
rustc_lint Rollup merge of #116421 - Urgau:inter-mut-invalid_ref_casting, r=oli-obk 2023-10-06 06:23:48 +02:00
rustc_lint_defs
rustc_llvm fix to register analysis pass from llvm plugin 2023-10-06 12:04:28 +00:00
rustc_log
rustc_macros
rustc_metadata rustc_metadata: use try_canonicalize 2023-10-06 09:54:12 -04:00
rustc_middle Auto merge of #116454 - tmiasko:small-dominators, r=cjgillot 2023-10-08 12:38:14 +00:00
rustc_mir_build
rustc_mir_dataflow Preserve DebugInfo in DeadStoreElimination. 2023-10-06 15:46:11 +00:00
rustc_mir_transform Auto merge of #116454 - tmiasko:small-dominators, r=cjgillot 2023-10-08 12:38:14 +00:00
rustc_monomorphize rustc_monomorphize: Introduce check_fn_args_move_size() 2023-10-07 10:29:37 +02:00
rustc_parse Rollup merge of #116400 - estebank:issue-78585, r=WaffleLapkin 2023-10-06 16:37:47 -07:00
rustc_parse_format
rustc_passes Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiser 2023-10-06 18:44:32 +00:00
rustc_plugin_impl
rustc_privacy
rustc_query_impl Remove unneeded dependency. 2023-10-06 14:57:09 +11:00
rustc_query_system
rustc_resolve
rustc_serialize
rustc_session linker: Remove -Zgcc-ld option 2023-10-08 10:05:25 +03:00
rustc_smir Remove unnecessary pub. 2023-10-06 14:59:11 +11:00
rustc_span Rollup merge of #116474 - nnethercote:rustc_assorted, r=spastorino 2023-10-06 21:17:50 +02:00
rustc_symbol_mangling
rustc_target linker: Remove unstable legacy CLI linker flavors 2023-10-07 21:57:53 +03:00
rustc_trait_selection Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiser 2023-10-06 18:44:32 +00:00
rustc_traits
rustc_transmute Remove the MaybeTransmutableQuery<&'l Dfa<...>, C> impl. 2023-10-06 11:25:32 +11:00
rustc_ty_utils Auto merge of #116269 - Veykril:rustc-abi, r=WaffleLapkin 2023-10-06 00:03:56 +00:00
rustc_type_ir
stable_mir