Skip to content

Speculative crate loading is not speculative enough #55103

Closed
@petrochenkov

Description

@petrochenkov

Speculative crate loading is performed as a part of speculative name resolutions (fn maybe_process_path_extern) which is used for various import suggestions, lints and similar things.

It's supposed to be silent and return None if the crate cannot be loaded, however it still reports an error if the crate path doesn't exist.
This shouldn't happen and crate path errors should be delayed until we know whether the crate loading is speculative or not.

After this issue is fixed, the test change in #55102 needs to be reverted.

cc @davidtwco @eddyb

Metadata

Metadata

Assignees

Labels

A-metadataArea: Crate metadataC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions