compilers: fix mypy warning in Rust detection

pull/10160/head
Dylan Baker 3 years ago committed by Jussi Pakkanen
parent 39f1d52e4a
commit 655746e8b4
  1. 1
      mesonbuild/compilers/detect.py

@ -1049,6 +1049,7 @@ def detect_rust_compiler(env: 'Environment', for_machine: MachineChoice) -> Rust
# This trickery with type() gets us the class of the linker
# so we can initialize a new copy for the Rust Compiler
# TODO rewrite this without type: ignore
assert cc.linker is not None, 'for mypy'
if is_link_exe:
linker = type(cc.linker)(for_machine, always_args, exelist=cc.linker.exelist, # type: ignore
version=cc.linker.version, **extra_args) # type: ignore

Loading…
Cancel
Save