Doescnot get an unused warning? 👍3ExpHP, sullyj3, and joshtriplett reacted with thumbs up emoji 👍 Member #[allow(unused_variables, unused_mut)] unused == unused_imports, unused_variables, unused_assignments, dead_code, unused_mut, unreachable_code, unused_must_use, unused_unsafe, path...
IIRC, expect behaves exactly like allow, except that it also emits an unfulfilled_lint_expectations (which is a warning by default) if it doesn't suppress anything. So if you have warn/deny on an outer module, and then allow/expect on an inner module/item, the diagnostic is suppressed as...
然而,所有的lint都可以通过allowing来关闭,并且您的错误消息(#[warn(dead_code)] on by default)包...
1 Suppress #[warn(unused_variables)] for default trait implementations #136843 opened 3 days ago by xd0096421 ICE: this path really should be doomed #136853 opened 3 days ago by matthiaskrgr0 error: failed to run custom build command for `openssl-sys v0.9.92` #136680 opened 3 days ...
I tried this code: #![deny(let_underscore_drop)] fn main() { let _ = MyStruct { field: vec![1, 2, 3], }; } struct MyStruct { field: Vec<usize>, } I got this warning: error: non-binding let on a type that implements `Drop` --> src/main.rs...
/// `#[expect]` attributes suppress the lint emission, but emit a warning, if /// the expectation is unfulfilled. This can be useful to be notified when the /// lint is no longer triggered. /// /// ### Example /// ```rust,ignore /// #[allow(unused_mut)] /// fn foo() ...
False positive on unused_import and dead_code rust-lang/rust-clippy#12418 Closed jieyouxu mentioned this issue Apr 6, 2024 "field is never read" warning despite Debug being used explicitly in the code #123562 Closed fjarri commented Apr 6, 2024 Note that while getting a warning ...
This provides a warning if a impl Trait or dyn Trait is returned and unused in the program. Compiler The default allocator has changed from jemalloc to the default allocator on your system. The compiler itself on Linux & macOS will still use jemalloc, but programs compiled with it will use...
`Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the fi...
expect(warnings)is a paradox that cannot make sense. if there are no warnings, it will cause a warning, which is a warning, so now there are warnings, which means it shouldn't trigger. i think the best thing would be to make it an error, but since it's shipped already, we may ne...