about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAli Bektas <bektasali@protonmail.com>2024-08-22 21:50:40 +0200
committerAli Bektas <bektasali@protonmail.com>2024-08-28 19:33:21 +0200
commit0e5270672d5e95460c4dfbdfd4775e106697195d (patch)
tree51b7c49c92eeac1d2cfef1abbe2582c4de77afee /src
parent042a932bfe1edb1edde55db0ca620f1986fa5c95 (diff)
downloadrust-0e5270672d5e95460c4dfbdfd4775e106697195d.tar.gz
rust-0e5270672d5e95460c4dfbdfd4775e106697195d.zip
Remove invalid tests
Diffstat (limited to 'src')
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs
index e7c5f989d93..8e41b43bfe0 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs
@@ -3585,76 +3585,4 @@ mod tests {
             matches!(config.flycheck(None), FlycheckConfig::CargoCommand { options, .. } if options.target_dir == Some(Utf8PathBuf::from("other_folder")))
         );
     }
-
-    #[test]
-    fn toml_unknown_key() {
-        let config =
-            Config::new(AbsPathBuf::assert(project_root()), Default::default(), vec![], None);
-
-        let mut change = ConfigChange::default();
-
-        change.change_user_config(Some(
-            toml::toml! {
-                [cargo.cfgs]
-                these = "these"
-                should = "should"
-                be = "be"
-                valid = "valid"
-
-                [invalid.config]
-                err = "error"
-
-                [cargo]
-                target = "ok"
-
-                // FIXME: This should be an error
-                [cargo.sysroot]
-                non-table = "expected"
-            }
-            .to_string()
-            .into(),
-        ));
-
-        let (config, e, _) = config.apply_change(change);
-        expect_test::expect![[r#"
-            ConfigErrors(
-                [
-                    Toml {
-                        config_key: "invalid/config/err",
-                        error: Error {
-                            inner: Error {
-                                inner: TomlError {
-                                    message: "unexpected field",
-                                    raw: None,
-                                    keys: [],
-                                    span: None,
-                                },
-                            },
-                        },
-                    },
-                ],
-            )
-        "#]]
-        .assert_debug_eq(&e);
-        let mut change = ConfigChange::default();
-
-        change.change_user_config(Some(
-            toml::toml! {
-                [cargo.cfgs]
-                these = "these"
-                should = "should"
-                be = "be"
-                valid = "valid"
-            }
-            .to_string()
-            .into(),
-        ));
-        let (_, e, _) = config.apply_change(change);
-        expect_test::expect![[r#"
-            ConfigErrors(
-                [],
-            )
-        "#]]
-        .assert_debug_eq(&e);
-    }
 }