# Pass the rustflags specified to host dependencies (build scripts, proc-macros) # when a `--target` is passed to Cargo. Historically this was not the case, and # because of that, cross-compilation would not set the rustflags configured # below in `target.'cfg(all())'` for them, resulting in cache invalidation. # # Since this is an unstable feature (enabled at the bottom of the file), this # setting is unfortunately ignored on stable toolchains, but it's still better # to have it apply on nightly than using the old behavior for all toolchains. target-applies-to-host = false [alias] xtask = "run --package xtask --" [doc.extern-map.registries] crates-io = "https://docs.rs/" [target.'cfg(all())'] rustflags = [ "-Wrust_2018_idioms", "-Wsemicolon_in_expressions_from_macros", "-Wunused_import_braces", "-Wunused_qualifications", "-Wclippy::branches_sharing_code", "-Wclippy::cloned_instead_of_copied", "-Wclippy::dbg_macro", "-Wclippy::disallowed_types", "-Wclippy::empty_line_after_outer_attr", "-Wclippy::exhaustive_enums", "-Wclippy::exhaustive_structs", "-Wclippy::inefficient_to_string", "-Wclippy::macro_use_imports", "-Wclippy::map_flatten", "-Wclippy::missing_enforced_import_renames", # Disabled because it triggers for tests/foo/mod.rs which can't be replaced # easily. Locally allowing it also doesn't seem to work. #"-Wclippy::mod_module_files", "-Wclippy::mut_mut", "-Wclippy::needless_borrow", "-Aclippy::new_without_default", "-Wclippy::nonstandard_macro_braces", "-Wclippy::semicolon_if_nothing_returned", "-Wclippy::str_to_string", "-Wclippy::todo", "-Wclippy::unreadable_literal", "-Wclippy::unseparated_literal_suffix", "-Wclippy::wildcard_imports", ] # activate the target-applies-to-host feature. # Required for `target-applies-to-host` at the top to take effect. [unstable] target-applies-to-host = true