diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-05-17 11:44:25 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-09-24 18:48:48 -0700 |
commit | e2260650a046a54f97f57e76ad6f0c106f96cea0 (patch) | |
tree | c35be9f99b7f517d0f62363fe8235d4f636b8d7b | |
parent | 79ed1f985c1ba52c0f8f85bd1d201e1ccdb0bdfe (diff) | |
download | meson-e2260650a046a54f97f57e76ad6f0c106f96cea0.zip meson-e2260650a046a54f97f57e76ad6f0c106f96cea0.tar.gz meson-e2260650a046a54f97f57e76ad6f0c106f96cea0.tar.bz2 |
rust: Add werror arguments
-rw-r--r-- | docs/markdown/snippets/rustc-improvements.md | 4 | ||||
-rw-r--r-- | mesonbuild/compilers/rust.py | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/docs/markdown/snippets/rustc-improvements.md b/docs/markdown/snippets/rustc-improvements.md new file mode 100644 index 0000000..2db0a11 --- /dev/null +++ b/docs/markdown/snippets/rustc-improvements.md @@ -0,0 +1,4 @@ +## Improvements for the Rustc compiler + +- Werror now works, this set's `-D warnings`, which will cause rustc to error + for every warning not explicitly disabled diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 2b566c8..10f54ef 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -168,3 +168,8 @@ class RustCompiler(Compiler): for a in super().get_linker_always_args(): args.extend(['-C', f'link-arg={a}']) return args + + def get_werror_args(self) -> T.List[str]: + # Use -D warnings, which makes every warning not explicitly allowed an + # error + return ['-D', 'warnings'] |