strong-xml icon indicating copy to clipboard operation
strong-xml copied to clipboard

The "unused borrow that must be used" warning.

Open A1-Triard opened this issue 4 years ago • 2 comments

STR: Try to build and test the string-xml crate using nightly Rust. AR: The following warning occuries:

warning: unused borrow that must be used
 --> test-suite\tests\issue_5.rs:3:10
  |
3 | #[derive(XmlWrite, XmlRead, PartialEq, Debug)]
  |          ^^^^^^^^ the borrow produces a value
  |
  = note: `#[warn(unused_must_use)]` on by default
  = note: this warning originates in the derive macro `XmlWrite` (in Nightly builds, run with -Z macro-backtrace for more info)

ER: No warnings.

A1-Triard avatar Nov 17 '21 06:11 A1-Triard

It would be very pleasant if you fix it quickly because for now it is just impossible to use the strong-xml crate (if a dependent uses #!(deny(warnings) attribute).

A1-Triard avatar Nov 17 '21 06:11 A1-Triard

I also had a clippy lint trigger about warning: unneeded late initalization in an XmlRead derive. Style warnings should just be manually allowed in the generated code in derive macros like these.

Noratrieb avatar Feb 20 '22 13:02 Noratrieb