mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
fix: Split toolchain and datalayout out of CrateData
This commit is contained in:
parent
a01655552d
commit
b1404d387a
22 changed files with 246 additions and 345 deletions
|
@ -717,7 +717,7 @@ impl<'a> CompletionContext<'a> {
|
|||
let krate = scope.krate();
|
||||
let module = scope.module();
|
||||
|
||||
let toolchain = db.crate_graph()[krate.into()].channel();
|
||||
let toolchain = db.toolchain_channel(krate.into());
|
||||
// `toolchain == None` means we're in some detached files. Since we have no information on
|
||||
// the toolchain being used, let's just allow unstable items to be listed.
|
||||
let is_nightly = matches!(toolchain, Some(base_db::ReleaseChannel::Nightly) | None);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue