rust/tests
Matthias Krüger 0e3af6af47
Rollup merge of #107709 - tialaramex:master, r=compiler-errors
Fix problem noticed in PR106859 with char -> u8 suggestion

HN reader `@ayosec` noticed that my #106859 a few weeks back, malfunctions if you have a Unicode escape, the code suggested b'\u{0}' if you tried to use '\u{0}' where a byte should be, when of course b'\u{0}' is not a byte literal, regardless of the codepoint you can't write Unicode escapes in a byte literal at all.

My proposed fix here just checks that the "character" you wrote is fewer than 5 bytes, thus allowing \x7F and similar escapes but conveniently forbidding even the smallest Unicode escape \u{0} before offering the suggestion as before.

I have provided an updated test which includes examples which do and don't work because of this additional rule.
2023-02-07 17:57:17 +01:00
..
assembly bump failing assembly & codegen tests from LLVM 14 to LLVM 15 2023-01-17 20:02:01 +01:00
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
codegen also do not add noalias on not-Unpin Box 2023-02-06 12:17:41 +01:00
codegen-units Move /src/test to /tests 2023-01-11 09:32:08 +00:00
debuginfo Upgrade mingw-w64 on CI 2023-01-29 13:01:06 +01:00
incremental Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mir-opt Rollup merge of #107662 - cjgillot:copy-projection, r=oli-obk 2023-02-07 17:57:15 +01:00
pretty Update tests. 2023-01-29 20:19:26 +01:00
run-make incremental: migrate diagnostics 2023-01-30 17:11:35 +00:00
run-make-fulldeps Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
run-pass-valgrind Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rustdoc rustdoc: trait bound formatting 2023-02-04 19:10:04 +01:00
rustdoc-gui Auto merge of #107141 - notriddle:notriddle/max-lev-distance-2023, r=GuillaumeGomez 2023-02-06 02:09:00 +00:00
rustdoc-js rustdoc: update test cases to match with stricter match criteria 2023-01-21 00:11:39 -07:00
rustdoc-js-std rustdoc: add test case based on #103357 2023-01-24 09:49:33 -07:00
rustdoc-json Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rustdoc-ui Auto merge of #107000 - GuillaumeGomez:fix-items-in-doc-hidden-block, r=notriddle,petrochenkov 2023-02-02 21:14:44 +00:00
ui Rollup merge of #107709 - tialaramex:master, r=compiler-errors 2023-02-07 17:57:17 +01:00
ui-fulldeps Forbid #[suggestion_*(...)] on Vecs 2023-02-01 21:49:45 +01:00
COMPILER_TESTS.md Move /src/test to /tests 2023-01-11 09:32:08 +00:00