Skip to content

Commit 2059584

Browse files
committed
Resolve conflicts and apply requested changes
1 parent 2e52129 commit 2059584

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ config_data! {
166166
/// set to a path relative to the workspace to use that path.
167167
cargo_targetDir | rust_analyzerTargetDir: Option<TargetDirectory> = None,
168168
/// Unsets the implicit `#[cfg(test)]` for the specified crates.
169-
cargo_unsetTest: Vec<String> = @verbatim: r#"["core"]"#,
169+
cargo_unsetTest: Vec<String> = vec!["core".to_owned()],
170170

171171
/// Run the check command for diagnostics on save.
172172
checkOnSave | checkOnSave_enable: bool = true,
@@ -2037,7 +2037,7 @@ mod single_or_array {
20372037

20382038
#[derive(Serialize, Deserialize, Debug, Clone)]
20392039
#[serde(untagged)]
2040-
enum ManifestOrProjectJson {
2040+
pub(crate) enum ManifestOrProjectJson {
20412041
Manifest(Utf8PathBuf),
20422042
ProjectJson(ProjectJsonData),
20432043
}
@@ -3140,7 +3140,10 @@ mod tests {
31403140
"rust": { "analyzerTargetDir": "other_folder" }
31413141
}))
31423142
.unwrap();
3143-
assert_eq!(&Some(TargetDirectory::Directory(Utf8PathBuf::from("other_folder"))));
3143+
assert_eq!(
3144+
config.cargo_targetDir(),
3145+
&Some(TargetDirectory::Directory(Utf8PathBuf::from("other_folder")))
3146+
);
31443147
assert!(
31453148
matches!(config.flycheck(), FlycheckConfig::CargoCommand { target_dir, .. } if target_dir == Some(Utf8PathBuf::from("other_folder")))
31463149
);

docs/user/generated_config.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,17 @@ building from locking the `Cargo.lock` at the expense of duplicating build artif
154154
Set to `true` to use a subdirectory of the existing target directory or
155155
set to a path relative to the workspace to use that path.
156156
--
157-
[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]`)::
157+
[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest::
158158
+
159159
--
160+
Default:
161+
----
162+
[
163+
"core"
164+
]
165+
----
160166
Unsets the implicit `#[cfg(test)]` for the specified crates.
167+
161168
--
162169
[[rust-analyzer.checkOnSave]]rust-analyzer.checkOnSave (default: `true`)::
163170
+

0 commit comments

Comments
 (0)