mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Overwrite the prelude with one defined in a later dependency
This removes the special casing for the "core" prelude. Whenever a later dependency also exports a prelude, it will replace the formerly imported prelude. The utilized prelude then depends purely on import order.
This commit is contained in:
parent
8baa05666c
commit
d634364462
2 changed files with 8 additions and 9 deletions
|
@ -241,6 +241,8 @@ impl ProjectWorkspace {
|
|||
}
|
||||
}
|
||||
}
|
||||
// core is added as a dependency before std in order to
|
||||
// mimic rustcs dependency order
|
||||
if let Some(core) = libcore {
|
||||
if let Err(_) = crate_graph.add_dep(from, "core".into(), core) {
|
||||
log::error!("cyclic dependency on core for {}", pkg.name(&cargo))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue