Skip to content

Commit 7147bc9

Browse files
authored
Merge pull request rust-lang#18396 from lnicola/hide-default-config
internal: Hide `Config::default_config`
2 parents 582f1a6 + 97eb4c7 commit 7147bc9

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

src/tools/rust-analyzer/Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,9 +1885,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
18851885

18861886
[[package]]
18871887
name = "smol_str"
1888-
version = "0.3.1"
1888+
version = "0.3.2"
18891889
source = "registry+https://github.com/rust-lang/crates.io-index"
1890-
checksum = "66eaf762c5af19db3108300515c8aa7a50efc90ff745f4c62288052ebf9fdd25"
1890+
checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d"
18911891
dependencies = [
18921892
"borsh",
18931893
"serde",

src/tools/rust-analyzer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ smallvec = { version = "1.10.0", features = [
145145
"union",
146146
"const_generics",
147147
] }
148-
smol_str = "0.3.1"
148+
smol_str = "0.3.2"
149149
snap = "1.1.0"
150150
text-size = "1.1.1"
151151
tracing = "0.1.40"

src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ enum RatomlFile {
727727
Crate(LocalConfigInput),
728728
}
729729

730-
#[derive(Debug, Clone)]
730+
#[derive(Clone)]
731731
pub struct Config {
732732
/// Projects that have a Cargo.toml or a rust-project.json in a
733733
/// parent directory, so we can discover them by walking the
@@ -765,6 +765,26 @@ pub struct Config {
765765
detached_files: Vec<AbsPathBuf>,
766766
}
767767

768+
impl fmt::Debug for Config {
769+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
770+
f.debug_struct("Config")
771+
.field("discovered_projects_from_filesystem", &self.discovered_projects_from_filesystem)
772+
.field("discovered_projects_from_command", &self.discovered_projects_from_command)
773+
.field("workspace_roots", &self.workspace_roots)
774+
.field("caps", &self.caps)
775+
.field("root_path", &self.root_path)
776+
.field("snippets", &self.snippets)
777+
.field("visual_studio_code_version", &self.visual_studio_code_version)
778+
.field("client_config", &self.client_config)
779+
.field("user_config", &self.user_config)
780+
.field("ratoml_file", &self.ratoml_file)
781+
.field("source_root_parent_map", &self.source_root_parent_map)
782+
.field("validation_errors", &self.validation_errors)
783+
.field("detached_files", &self.detached_files)
784+
.finish()
785+
}
786+
}
787+
768788
// Delegate capability fetching methods
769789
impl std::ops::Deref for Config {
770790
type Target = ClientCapabilities;

0 commit comments

Comments
 (0)