fix: Split toolchain and datalayout out of CrateData

This commit is contained in:
Lukas Wirth 2024-02-16 14:48:25 +01:00
parent a01655552d
commit b1404d387a
22 changed files with 246 additions and 345 deletions

View file

@ -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);