summaryrefslogtreecommitdiff
path: root/test cases/rust/1 basic
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-05-17 10:42:57 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-09-24 18:48:48 -0700
commit30202a24021587b7d7ddffd8312eb5b425b3e273 (patch)
tree8b03d4b62f0b35a520f8f5ef859df7156cd62395 /test cases/rust/1 basic
parentf0a7b6e7c6bf97b22f3e5f1d600717ac7ba4162f (diff)
downloadmeson-30202a24021587b7d7ddffd8312eb5b425b3e273.tar.gz
compilers/rust: Add support for clippy
Clippy is a compiler wrapper for rust that provides an extra layer of linting. It's quite popular, but unfortunately doesn't provide the output of the compiler that it's wrapping in it's output, so we don't detect that clippy is rustc. This small patch adds a new compiler class (that is the Rustc class with a different id) and the necessary logic to detect that clippy is in fact rustc) Fixes: #8767
Diffstat (limited to 'test cases/rust/1 basic')
-rw-r--r--test cases/rust/1 basic/clippy.toml1
-rw-r--r--test cases/rust/1 basic/prog.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/test cases/rust/1 basic/clippy.toml b/test cases/rust/1 basic/clippy.toml
new file mode 100644
index 000000000..e9ac31b69
--- /dev/null
+++ b/test cases/rust/1 basic/clippy.toml
@@ -0,0 +1 @@
+blacklisted-names = ["foo"]
diff --git a/test cases/rust/1 basic/prog.rs b/test cases/rust/1 basic/prog.rs
index b171a80c2..f1b3d303d 100644
--- a/test cases/rust/1 basic/prog.rs
+++ b/test cases/rust/1 basic/prog.rs
@@ -1,3 +1,4 @@
fn main() {
- println!("rust compiler is working");
+ let foo = "rust compiler is working";
+ println!("{}", foo);
}