about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-03-05 14:29:09 +0100
committerGitHub <noreply@github.com>2023-03-05 14:29:09 +0100
commitf7bd8afa076d02488a3e9415a2bec2373ebbd6c9 (patch)
tree18ad41960663dc176bce642e4015197bfdce2a5d
parentc86ea5a0ef23188affc1d862b3330bb54a7a5a98 (diff)
parenta90e7d465806ee772f726818a0e35ab9539fb8b7 (diff)
downloadrust-f7bd8afa076d02488a3e9415a2bec2373ebbd6c9.tar.gz
rust-f7bd8afa076d02488a3e9415a2bec2373ebbd6c9.zip
Rollup merge of #108618 - KittyBorgX:master, r=Mark-Simulacrum
Rename `src/etc/vscode_settings.json` to `rust_analyzer_settings.json`

Fixes https://github.com/rust-lang/rust/issues/108614
-rw-r--r--src/bootstrap/setup.rs10
-rw-r--r--src/bootstrap/setup/tests.rs6
-rw-r--r--src/etc/rust_analyzer_settings.json (renamed from src/etc/vscode_settings.json)0
3 files changed, 8 insertions, 8 deletions
diff --git a/src/bootstrap/setup.rs b/src/bootstrap/setup.rs
index 4480bce99d7..09f26862b4a 100644
--- a/src/bootstrap/setup.rs
+++ b/src/bootstrap/setup.rs
@@ -24,7 +24,7 @@ pub enum Profile {
     None,
 }
 
-/// A list of historical hashes of `src/etc/vscode_settings.json`.
+/// A list of historical hashes of `src/etc/rust_analyzer_settings.json`.
 /// New entries should be appended whenever this is updated so we can detect
 /// outdated vs. user-modified settings files.
 static SETTINGS_HASHES: &[&str] = &[
@@ -32,7 +32,7 @@ static SETTINGS_HASHES: &[&str] = &[
     "56e7bf011c71c5d81e0bf42e84938111847a810eee69d906bba494ea90b51922",
     "af1b5efe196aed007577899db9dae15d6dbc923d6fa42fa0934e68617ba9bbe0",
 ];
-static VSCODE_SETTINGS: &str = include_str!("../etc/vscode_settings.json");
+static RUST_ANALYZER_SETTINGS: &str = include_str!("../etc/rust_analyzer_settings.json");
 
 impl Profile {
     fn include_path(&self, src_path: &Path) -> PathBuf {
@@ -489,7 +489,7 @@ undesirable, simply delete the `pre-push` file from .git/hooks."
     Ok(())
 }
 
-/// Sets up or displays `src/etc/vscode_settings.json`
+/// Sets up or displays `src/etc/rust_analyzer_settings.json`
 #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
 pub struct Vscode;
 
@@ -580,10 +580,10 @@ fn create_vscode_settings_maybe(config: &Config) -> io::Result<()> {
             }
             _ => "Created",
         };
-        fs::write(&vscode_settings, &VSCODE_SETTINGS)?;
+        fs::write(&vscode_settings, &RUST_ANALYZER_SETTINGS)?;
         println!("{verb} `.vscode/settings.json`");
     } else {
-        println!("\n{VSCODE_SETTINGS}");
+        println!("\n{RUST_ANALYZER_SETTINGS}");
     }
     Ok(())
 }
diff --git a/src/bootstrap/setup/tests.rs b/src/bootstrap/setup/tests.rs
index dcf9d18e632..0fe6e4a4644 100644
--- a/src/bootstrap/setup/tests.rs
+++ b/src/bootstrap/setup/tests.rs
@@ -1,14 +1,14 @@
-use super::{SETTINGS_HASHES, VSCODE_SETTINGS};
+use super::{RUST_ANALYZER_SETTINGS, SETTINGS_HASHES};
 use sha2::Digest;
 
 #[test]
 fn check_matching_settings_hash() {
     let mut hasher = sha2::Sha256::new();
-    hasher.update(&VSCODE_SETTINGS);
+    hasher.update(&RUST_ANALYZER_SETTINGS);
     let hash = hex::encode(hasher.finalize().as_slice());
     assert_eq!(
         &hash,
         SETTINGS_HASHES.last().unwrap(),
-        "Update `SETTINGS_HASHES` with the new hash of `src/etc/vscode_settings.json`"
+        "Update `SETTINGS_HASHES` with the new hash of `src/etc/rust_analyzer_settings.json`"
     );
 }
diff --git a/src/etc/vscode_settings.json b/src/etc/rust_analyzer_settings.json
index dd01bfaa725..dd01bfaa725 100644
--- a/src/etc/vscode_settings.json
+++ b/src/etc/rust_analyzer_settings.json