diff options
author | Matthias Einwag <[email protected]> | 2019-11-10 21:15:47 +0000 |
---|---|---|
committer | Matthias Einwag <[email protected]> | 2019-11-10 21:15:47 +0000 |
commit | d634364462931c0a4944de29b38681a482817b6b (patch) | |
tree | e55d40fa70e9e1122aecbe66f258073b2c3d7a43 /crates/ra_project_model/src/lib.rs | |
parent | 8baa05666c455b4dd6333fd5ac1a694136039f43 (diff) |
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.
Diffstat (limited to 'crates/ra_project_model/src/lib.rs')
-rw-r--r-- | crates/ra_project_model/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs index b1268f29b..0e14f1b70 100644 --- a/crates/ra_project_model/src/lib.rs +++ b/crates/ra_project_model/src/lib.rs | |||
@@ -241,6 +241,8 @@ impl ProjectWorkspace { | |||
241 | } | 241 | } |
242 | } | 242 | } |
243 | } | 243 | } |
244 | // core is added as a dependency before std in order to | ||
245 | // mimic rustcs dependency order | ||
244 | if let Some(core) = libcore { | 246 | if let Some(core) = libcore { |
245 | if let Err(_) = crate_graph.add_dep(from, "core".into(), core) { | 247 | if let Err(_) = crate_graph.add_dep(from, "core".into(), core) { |
246 | log::error!("cyclic dependency on core for {}", pkg.name(&cargo)) | 248 | log::error!("cyclic dependency on core for {}", pkg.name(&cargo)) |