[target.'cfg(all())'] # NOTE that the web build overrides this setting in package.json via the RUSTFLAGS environment variable rustflags = [ # We need to specify this flag for all targets because Clippy checks all of our code against all targets # and our web code does not compile without this flag "--cfg=web_sys_unstable_apis", # CLIPPY LINT SETTINGS # This is a workaround to configure lints for the entire workspace, pending the ability to configure this via TOML. # See: https://github.com/rust-lang/cargo/issues/5034 # https://github.com/EmbarkStudios/rust-ecosystem/issues/22#issuecomment-947011395 # TODO: Move these to the root Cargo.toml once support is merged and stable # See: https://github.com/rust-lang/cargo/pull/12148 # Clippy nightly often adds new/buggy lints that we want to ignore. # Don't warn about these new lints on stable. "-Arenamed_and_removed_lints", "-Aunknown_lints", # LONG-TERM: These lints are unhelpful. "-Aclippy::manual_map", # Less readable: Suggests `opt.map(..)` instsead of `if let Some(opt) { .. }` "-Aclippy::manual_range_contains", # Less readable: Suggests `(a..b).contains(n)` instead of `n >= a && n < b` ]