rust/tests
Matthias Krüger 665a1a4b55
Rollup merge of #128865 - jieyouxu:unicurd, r=Urgau
Ensure let stmt compound assignment removal suggestion respect codepoint boundaries

Previously we would try to issue a suggestion for `let x <op>= 1`, i.e.
a compound assignment within a `let` binding, to remove the `<op>`. The
suggestion code unfortunately incorrectly assumed that the `<op>` is an
exactly-1-byte ASCII character, but this assumption is incorrect because
we also recover Unicode-confusables like `=` as `-=`. In this example,
the suggestion code used a `+ BytePos(1)` to calculate the span of the
`<op>` codepoint that looks like `-` but the mult-byte Unicode
look-alike would cause the suggested removal span to be inside a
multi-byte codepoint boundary, triggering a codepoint boundary
assertion.

The fix is to use `SourceMap::start_point(token_span)` which properly accounts for codepoint boundaries.

Fixes #128845.

cc #128790

r? ````@fmease````
2024-08-09 18:25:00 +02:00
..
assembly Disallow setting built-in cfgs via set the command-line 2024-08-07 14:08:34 +02:00
auxiliary
codegen Auto merge of #128796 - matthiaskrgr:rollup-r7l68ph, r=matthiaskrgr 2024-08-07 20:00:29 +00:00
codegen-units Revert "Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix" 2024-08-03 07:57:31 -04:00
coverage Finish blessing coverage/mcdc tests after LLVM 19 upgrade 2024-08-01 13:36:50 +10:00
coverage-run-rustdoc coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
crashes Don't inline tainted MIR bodies 2024-08-08 20:53:25 -04:00
debuginfo Disallow setting built-in cfgs via set the command-line 2024-08-07 14:08:34 +02:00
incremental Do not normalize constants eagerly. 2024-07-31 00:59:12 +00:00
mir-opt custom MIR: add support for tail calls 2024-08-05 18:23:14 +02:00
pretty Mark format! with must_use hint 2024-07-06 14:24:20 +02:00
run-make Rollup merge of #128823 - ChrisDenton:staticlib, r=jieyouxu 2024-08-09 05:52:16 +02:00
run-pass-valgrind
rustdoc rustdoc: move invalid langstring test to UI 2024-08-09 07:57:46 -07:00
rustdoc-gui rustdoc-search: account for numeric disambiguators on impls 2024-08-06 07:36:12 -07:00
rustdoc-js Add test for Self not being a generic in search index 2024-08-04 12:49:28 -07:00
rustdoc-js-std
rustdoc-json Rollup merge of #128836 - its-the-shrimp:add_test_for_107278, r=aDotInTheVoid 2024-08-09 00:03:38 +02:00
rustdoc-ui rustdoc: move invalid langstring test to UI 2024-08-09 07:57:46 -07:00
ui Rollup merge of #128865 - jieyouxu:unicurd, r=Urgau 2024-08-09 18:25:00 +02:00
ui-fulldeps Bless test fallout 2024-08-03 07:57:31 -04:00
COMPILER_TESTS.md