Skip to content

Commit faa79ba

Browse files
committed
Resolve conflicts and apply requested changes
1 parent beef4bd commit faa79ba

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
@@ -168,7 +168,7 @@ config_data! {
168168
/// set to a path relative to the workspace to use that path.
169169
cargo_targetDir | rust_analyzerTargetDir: Option<TargetDirectory> = None,
170170
/// Unsets the implicit `#[cfg(test)]` for the specified crates.
171-
cargo_unsetTest: Vec<String> = @verbatim: r#"["core"]"#,
171+
cargo_unsetTest: Vec<String> = vec!["core".to_owned()],
172172

173173
/// Run the check command for diagnostics on save.
174174
checkOnSave | checkOnSave_enable: bool = true,
@@ -2074,7 +2074,7 @@ mod single_or_array {
20742074

20752075
#[derive(Serialize, Deserialize, Debug, Clone)]
20762076
#[serde(untagged)]
2077-
enum ManifestOrProjectJson {
2077+
pub(crate) enum ManifestOrProjectJson {
20782078
Manifest(Utf8PathBuf),
20792079
ProjectJson(ProjectJsonData),
20802080
}
@@ -3177,7 +3177,10 @@ mod tests {
31773177
"rust": { "analyzerTargetDir": "other_folder" }
31783178
}))
31793179
.unwrap();
3180-
assert_eq!(&Some(TargetDirectory::Directory(Utf8PathBuf::from("other_folder"))));
3180+
assert_eq!(
3181+
config.cargo_targetDir(),
3182+
&Some(TargetDirectory::Directory(Utf8PathBuf::from("other_folder")))
3183+
);
31813184
assert!(
31823185
matches!(config.flycheck(), FlycheckConfig::CargoCommand { options, .. } if options.target_dir == Some(Utf8PathBuf::from("other_folder")))
31833186
);

docs/user/generated_config.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,17 @@ building from locking the `Cargo.lock` at the expense of duplicating build artif
159159
Set to `true` to use a subdirectory of the existing target directory or
160160
set to a path relative to the workspace to use that path.
161161
--
162-
[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]`)::
162+
[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest::
163163
+
164164
--
165+
Default:
166+
----
167+
[
168+
"core"
169+
]
170+
----
165171
Unsets the implicit `#[cfg(test)]` for the specified crates.
172+
166173
--
167174
[[rust-analyzer.checkOnSave]]rust-analyzer.checkOnSave (default: `true`)::
168175
+

0 commit comments

Comments
 (0)