about summary refs log tree commit diff
path: root/tests/ui/patchable-function-entry/patchable-function-entry-flags.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-01 10:43:06 +0000
committerbors <bors@rust-lang.org>2024-04-01 10:43:06 +0000
commita6ddf5fb804f8f8cdde8682ab61d889387118004 (patch)
tree09ad39d9a3a618705dce315ee22bf3af7b766582 /tests/ui/patchable-function-entry/patchable-function-entry-flags.rs
parent26786608802b53dd8b3bfb48cd84f36f7e6d992f (diff)
parent0f72ab1dd34715b36586c89568db80c68d364b01 (diff)
downloadrust-a6ddf5fb804f8f8cdde8682ab61d889387118004.tar.gz
rust-a6ddf5fb804f8f8cdde8682ab61d889387118004.zip
Auto merge of #16961 - Wilfred:fix_crate_ids, r=Veykril
Fix crate IDs when multiple workspaces are loaded

Previously, we assumed that the crate numbers in a `rust-project.json` always matched the `CrateId` values in the crate graph. This isn't true when there are multiple workspaces, because the crate graphs are merged and the `CrateId` values in the merged graph are different.

This broke flycheck (see first commit), because we were unable to find the workspace when a file changed, so we every single flycheck, producing duplicate compilation errors.

Instead, use the crate root module path to look up the relevant flycheck. This makes `ProjectWorkspace::Json` consistenet with `ProjectWorkspace::Cargo`.

Also, define a separate JSON crate number type, to prevent bugs like this happening again.
Diffstat (limited to 'tests/ui/patchable-function-entry/patchable-function-entry-flags.rs')
0 files changed, 0 insertions, 0 deletions