rust-analyzer/crates
Matthias Krüger 3ec86f1978
Rollup merge of #119172 - nnethercote:earlier-NulInCStr, r=petrochenkov
Detect `NulInCStr` error earlier.

By making it an `EscapeError` instead of a `LitError`. This makes it like the other errors produced when checking string literals contents, e.g. for invalid escape sequences or bare CR chars.

NOTE: this means these errors are issued earlier, before expansion, which changes behaviour. It will be possible to move the check back to the later point if desired. If that happens, it's likely that all the string literal contents checks will be delayed together.

One nice thing about this: the old approach had some code in `report_lit_error` to calculate the span of the nul char from a range. This code used a hardwired `+2` to account for the `c"` at the start of a C string literal, but this should have changed to a `+3` for raw C string literals to account for the `cr"`, which meant that the caret in `cr"` nul error messages was one short of where it should have been. The new approach doesn't need any of this and avoids the off-by-one error.

r? ```@fee1-dead```
2024-01-18 10:34:17 +01:00
..
base-db internal: Consider all kinds of explicit private imports in find_path 2024-01-11 12:22:04 +01:00
cfg Use Cargo's [workspace.lints.*] to config clippy 2023-12-29 23:51:32 +09:00
flycheck Use Cargo's [workspace.lints.*] to config clippy 2023-12-29 23:51:32 +09:00
hir internal: Consider all kinds of explicit private imports in find_path 2024-01-11 12:22:04 +01:00
hir-def Auto merge of #16348 - Veykril:nested-includes, r=Veykril 2024-01-11 11:53:24 +00:00
hir-expand Auto merge of #16348 - Veykril:nested-includes, r=Veykril 2024-01-11 11:53:24 +00:00
hir-ty internal: Consider all kinds of explicit private imports in find_path 2024-01-11 12:22:04 +01:00
ide Some minor perf improvements 2024-01-09 20:43:17 +01:00
ide-assists Auto merge of #16265 - Patryk27:suggest-pub-crate-imports, r=Veykril 2024-01-11 09:54:22 +00:00
ide-completion add tests to verify relevance of notable traits and some refactors 2024-01-10 16:30:22 +05:30
ide-db Auto merge of #16265 - Patryk27:suggest-pub-crate-imports, r=Veykril 2024-01-11 09:54:22 +00:00
ide-diagnostics Set experimental field at diagnostic new instead of lib 2024-01-10 05:58:25 -06:00
ide-ssr Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
intern Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
limit Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
load-cargo fix: Differentiate between vfs config load and file changed events 2024-01-09 10:30:16 +01:00
mbe Set the in-rust-tree` feature for all rust-analyzer{-proc-macro-srv} steps 2024-01-04 11:02:20 +01:00
parser Rollup merge of #119172 - nnethercote:earlier-NulInCStr, r=petrochenkov 2024-01-18 10:34:17 +01:00
paths Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
proc-macro-api Auto merge of #16312 - Veykril:win-proc-macro-srv, r=Veykril 2024-01-09 10:12:57 +00:00
proc-macro-srv Remove sysroot-abi feature flag from proc-macro-test 2024-01-10 09:53:12 +01:00
proc-macro-srv-cli Recognize proc macro server unexpectedly exiting and report the exit code 2024-01-09 10:37:26 +01:00
profile Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
project-model fix: Differentiate between vfs config load and file changed events 2024-01-09 10:30:16 +01:00
rust-analyzer Auto merge of #16319 - Veykril:no-double-load, r=Veykril 2024-01-09 10:24:23 +00:00
sourcegen Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
span Merge commit 'af40101841c45aa75b56f4e9ca745369da8fb4ba' into sync-from-ra 2024-01-08 11:29:25 +02:00
stdx Merge commit 'af40101841c45aa75b56f4e9ca745369da8fb4ba' into sync-from-ra 2024-01-08 11:29:25 +02:00
syntax Rollup merge of #119172 - nnethercote:earlier-NulInCStr, r=petrochenkov 2024-01-18 10:34:17 +01:00
test-fixture Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
test-utils Builtin derives are hygienic 2024-01-08 12:50:11 +01:00
text-edit Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
toolchain Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
tt Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
vfs fix: Differentiate between vfs config load and file changed events 2024-01-09 10:30:16 +01:00
vfs-notify fix: Differentiate between vfs config load and file changed events 2024-01-09 10:30:16 +01:00