Skip to content

Commit

Permalink
Resolve conflicts and apply requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibektas committed Apr 12, 2024
1 parent beef4bd commit faa79ba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 6 additions & 3 deletions crates/rust-analyzer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ config_data! {
/// set to a path relative to the workspace to use that path.
cargo_targetDir | rust_analyzerTargetDir: Option<TargetDirectory> = None,
/// Unsets the implicit `#[cfg(test)]` for the specified crates.
cargo_unsetTest: Vec<String> = @verbatim: r#"["core"]"#,
cargo_unsetTest: Vec<String> = vec!["core".to_owned()],

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

#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(untagged)]
enum ManifestOrProjectJson {
pub(crate) enum ManifestOrProjectJson {
Manifest(Utf8PathBuf),
ProjectJson(ProjectJsonData),
}
Expand Down Expand Up @@ -3177,7 +3177,10 @@ mod tests {
"rust": { "analyzerTargetDir": "other_folder" }
}))
.unwrap();
assert_eq!(&Some(TargetDirectory::Directory(Utf8PathBuf::from("other_folder"))));
assert_eq!(
config.cargo_targetDir(),
&Some(TargetDirectory::Directory(Utf8PathBuf::from("other_folder")))
);
assert!(
matches!(config.flycheck(), FlycheckConfig::CargoCommand { options, .. } if options.target_dir == Some(Utf8PathBuf::from("other_folder")))
);
Expand Down
9 changes: 8 additions & 1 deletion docs/user/generated_config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,17 @@ building from locking the `Cargo.lock` at the expense of duplicating build artif
Set to `true` to use a subdirectory of the existing target directory or
set to a path relative to the workspace to use that path.
--
[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]`)::
[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest::
+
--
Default:
----
[
"core"
]
----
Unsets the implicit `#[cfg(test)]` for the specified crates.

--
[[rust-analyzer.checkOnSave]]rust-analyzer.checkOnSave (default: `true`)::
+
Expand Down

0 comments on commit faa79ba

Please sign in to comment.