rust: Add werror arguments

pull/8773/head
Dylan Baker 4 years ago
parent 79ed1f985c
commit e2260650a0
  1. 4
      docs/markdown/snippets/rustc-improvements.md
  2. 5
      mesonbuild/compilers/rust.py

@ -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

@ -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']

Loading…
Cancel
Save