mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 05:53:45 +00:00
Merge pull request #18396 from lnicola/hide-default-config
internal: Hide `Config::default_config`
This commit is contained in:
commit
16785c8e13
3 changed files with 24 additions and 4 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1885,9 +1885,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "smol_str"
|
name = "smol_str"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "66eaf762c5af19db3108300515c8aa7a50efc90ff745f4c62288052ebf9fdd25"
|
checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"borsh",
|
"borsh",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
@ -145,7 +145,7 @@ smallvec = { version = "1.10.0", features = [
|
||||||
"union",
|
"union",
|
||||||
"const_generics",
|
"const_generics",
|
||||||
] }
|
] }
|
||||||
smol_str = "0.3.1"
|
smol_str = "0.3.2"
|
||||||
snap = "1.1.0"
|
snap = "1.1.0"
|
||||||
text-size = "1.1.1"
|
text-size = "1.1.1"
|
||||||
tracing = "0.1.40"
|
tracing = "0.1.40"
|
||||||
|
|
|
@ -727,7 +727,7 @@ enum RatomlFile {
|
||||||
Crate(LocalConfigInput),
|
Crate(LocalConfigInput),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
/// Projects that have a Cargo.toml or a rust-project.json in a
|
/// Projects that have a Cargo.toml or a rust-project.json in a
|
||||||
/// parent directory, so we can discover them by walking the
|
/// parent directory, so we can discover them by walking the
|
||||||
|
@ -765,6 +765,26 @@ pub struct Config {
|
||||||
detached_files: Vec<AbsPathBuf>,
|
detached_files: Vec<AbsPathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl fmt::Debug for Config {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
f.debug_struct("Config")
|
||||||
|
.field("discovered_projects_from_filesystem", &self.discovered_projects_from_filesystem)
|
||||||
|
.field("discovered_projects_from_command", &self.discovered_projects_from_command)
|
||||||
|
.field("workspace_roots", &self.workspace_roots)
|
||||||
|
.field("caps", &self.caps)
|
||||||
|
.field("root_path", &self.root_path)
|
||||||
|
.field("snippets", &self.snippets)
|
||||||
|
.field("visual_studio_code_version", &self.visual_studio_code_version)
|
||||||
|
.field("client_config", &self.client_config)
|
||||||
|
.field("user_config", &self.user_config)
|
||||||
|
.field("ratoml_file", &self.ratoml_file)
|
||||||
|
.field("source_root_parent_map", &self.source_root_parent_map)
|
||||||
|
.field("validation_errors", &self.validation_errors)
|
||||||
|
.field("detached_files", &self.detached_files)
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Delegate capability fetching methods
|
// Delegate capability fetching methods
|
||||||
impl std::ops::Deref for Config {
|
impl std::ops::Deref for Config {
|
||||||
type Target = ClientCapabilities;
|
type Target = ClientCapabilities;
|
||||||
|
|
Loading…
Reference in a new issue