rust/compiler
Matthias Krüger 70e3f8d240
Rollup merge of #119033 - Zalathar:unicode, r=davidtwco
coverage: `llvm-cov` expects column numbers to be bytes, not code points

Normally the compiler emits column numbers as a 1-based number of Unicode code points.

But when we embed coverage mappings for `-Cinstrument-coverage`, those mappings will ultimately be read by the `llvm-cov` tool. That tool assumes that column numbers are 1-based numbers of *bytes*, and relies on that assumption when slicing up source code to apply highlighting (in HTML reports, and in text-based reports with colour).

For the very common case of all-ASCII source code, bytes and code points are the same, so the difference isn't noticeable. But for code that contains non-ASCII characters, emitting column numbers as code points will result in `llvm-cov` slicing strings in the wrong places, producing mangled output or fatal errors.

(See https://github.com/taiki-e/cargo-llvm-cov/issues/275 as an example of what can go wrong.)
2024-01-09 00:19:33 +01:00
..
rustc
rustc_abi
rustc_arena
rustc_ast Auto merge of #119478 - bjorn3:no_serialize_specialization, r=wesleywiser 2024-01-06 09:56:00 +00:00
rustc_ast_lowering Rollup merge of #119705 - fmease:tilde-const-assoc-fns-trait-impls, r=compiler-errors 2024-01-08 00:38:35 +01:00
rustc_ast_passes Make DiagnosticBuilder::emit consuming. 2024-01-08 15:24:49 +11:00
rustc_ast_pretty
rustc_attr Use chaining in DiagnosticBuilder construction. 2024-01-08 15:43:07 +11:00
rustc_baked_icu_data
rustc_borrowck Use chaining in DiagnosticBuilder construction. 2024-01-08 15:43:07 +11:00
rustc_builtin_macros Use chaining for DiagnosticBuilder construction and emit. 2024-01-08 15:45:29 +11:00
rustc_codegen_cranelift Rollup merge of #118903 - azhogin:azhogin/skip_second_stmt_debuginfo.rs, r=petrochenkov 2024-01-09 00:19:32 +01:00
rustc_codegen_gcc Rollup merge of #119538 - nnethercote:cleanup-errors-5, r=compiler-errors 2024-01-05 10:57:21 -05:00
rustc_codegen_llvm Use chaining in DiagnosticBuilder construction. 2024-01-08 15:43:07 +11:00
rustc_codegen_ssa Rollup merge of #118903 - azhogin:azhogin/skip_second_stmt_debuginfo.rs, r=petrochenkov 2024-01-09 00:19:32 +01:00
rustc_const_eval Make DiagnosticBuilder::emit consuming. 2024-01-08 15:24:49 +11:00
rustc_data_structures Rollup merge of #119591 - Enselic:DestinationPropagation-stable, r=cjgillot 2024-01-06 16:07:47 +01:00
rustc_driver
rustc_driver_impl Make DiagnosticBuilder::emit consuming. 2024-01-08 15:24:49 +11:00
rustc_error_codes
rustc_error_messages
rustc_errors Remove {DiagCtxt,DiagCtxtInner}::emit_diagnostic_without_consuming. 2024-01-08 16:18:55 +11:00
rustc_expand Auto merge of #119606 - nnethercote:consuming-emit, r=oli-obk 2024-01-08 16:06:28 +00:00
rustc_feature Rollup merge of #119354 - fmease:negative_bounds-fixes, r=compiler-errors 2024-01-05 20:39:51 +01:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Remove hir::Guard 2024-01-05 10:56:59 +00:00
rustc_hir_analysis Remove all eight DiagnosticBuilder::*_with_code methods. 2024-01-08 16:00:34 +11:00
rustc_hir_pretty Remove hir::Guard 2024-01-05 10:56:59 +00:00
rustc_hir_typeck Remove DiagnosticBuilder::delay_as_bug_without_consuming. 2024-01-08 16:07:14 +11:00
rustc_incremental
rustc_index Auto merge of #119499 - cjgillot:dtm-opt, r=nnethercote 2024-01-06 11:54:15 +00:00
rustc_index_macros
rustc_infer Remove DiagnosticBuilder::delay_as_bug_without_consuming. 2024-01-08 16:07:14 +11:00
rustc_interface Remove {DiagCtxt,DiagCtxtInner}::emit_diagnostic_without_consuming. 2024-01-08 16:18:55 +11:00
rustc_lexer
rustc_lint rustc_span: Optimize syntax context comparisons 2024-01-06 01:25:20 +03:00
rustc_lint_defs Auto merge of #119192 - michaelwoerister:mcp533-push, r=cjgillot 2024-01-05 19:38:27 +00:00
rustc_llvm
rustc_log
rustc_macros Auto merge of #119478 - bjorn3:no_serialize_specialization, r=wesleywiser 2024-01-06 09:56:00 +00:00
rustc_metadata Auto merge of #119478 - bjorn3:no_serialize_specialization, r=wesleywiser 2024-01-06 09:56:00 +00:00
rustc_middle Rollup merge of #118903 - azhogin:azhogin/skip_second_stmt_debuginfo.rs, r=petrochenkov 2024-01-09 00:19:32 +01:00
rustc_mir_build Don't populate yield and resume types after the fact 2024-01-06 18:03:01 +00:00
rustc_mir_dataflow
rustc_mir_transform Rollup merge of #119033 - Zalathar:unicode, r=davidtwco 2024-01-09 00:19:33 +01:00
rustc_monomorphize Rollup merge of #119538 - nnethercote:cleanup-errors-5, r=compiler-errors 2024-01-05 10:57:21 -05:00
rustc_next_trait_solver
rustc_parse Remove DiagnosticBuilder::delay_as_bug_without_consuming. 2024-01-08 16:07:14 +11:00
rustc_parse_format
rustc_passes Remove DiagnosticBuilder::delay_as_bug_without_consuming. 2024-01-08 16:07:14 +11:00
rustc_pattern_analysis Reuse ctor_sub_tys when we have one around 2024-01-06 18:03:13 +01:00
rustc_privacy
rustc_query_impl
rustc_query_system Make DiagnosticBuilder::emit consuming. 2024-01-08 15:24:49 +11:00
rustc_resolve Remove all eight DiagnosticBuilder::*_with_code methods. 2024-01-08 16:00:34 +11:00
rustc_serialize
rustc_session Use chaining in DiagnosticBuilder construction. 2024-01-08 15:43:07 +11:00
rustc_smir
rustc_span Rollup merge of #118903 - azhogin:azhogin/skip_second_stmt_debuginfo.rs, r=petrochenkov 2024-01-09 00:19:32 +01:00
rustc_symbol_mangling Use chaining in DiagnosticBuilder construction. 2024-01-08 15:43:07 +11:00
rustc_target Unions are not PointerLike 2024-01-07 19:28:00 +00:00
rustc_trait_selection Remove DiagnosticBuilder::delay_as_bug_without_consuming. 2024-01-08 16:07:14 +11:00
rustc_traits
rustc_transmute
rustc_ty_utils
rustc_type_ir
stable_mir