Skip to content

"lint level defined here" note mostly useless #31004

Closed
@mahkoh

Description

@mahkoh

E.g.

liblrsb/parser/lib.rs:7:9: 7:23 note: lint level defined here
liblrsb/parser/lib.rs:7 #![warn(unused_results)]
                                ^~~~~~~~~~~~~~
liblrsb/parser/lib.rs:336:9: 336:30 warning: unused result
liblrsb/parser/lib.rs:336         path.shrink_to_fit();
                                  ^~~~~~~~~~~~~~~~~~~~~
liblrsb/parser/lib.rs:7:9: 7:23 note: lint level defined here
liblrsb/parser/lib.rs:7 #![warn(unused_results)]
                                ^~~~~~~~~~~~~~
liblrsb/parser/lib.rs:373:17: 373:35 warning: unused result
liblrsb/parser/lib.rs:373                 self.lexer.next();
                                          ^~~~~~~~~~~~~~~~~~
liblrsb/parser/lib.rs:7:9: 7:23 note: lint level defined here
liblrsb/parser/lib.rs:7 #![warn(unused_results)]
                                ^~~~~~~~~~~~~~
liblrsb/parser/lib.rs:374:17: 374:35 warning: unused result
liblrsb/parser/lib.rs:374                 self.lexer.next();
                                          ^~~~~~~~~~~~~~~~~~
liblrsb/parser/lib.rs:7:9: 7:23 note: lint level defined here
liblrsb/parser/lib.rs:7 #![warn(unused_results)]
                                ^~~~~~~~~~~~~~
liblrsb/parser/lib.rs:384:17: 384:35 warning: unused result
liblrsb/parser/lib.rs:384                 self.lexer.next();
                                          ^~~~~~~~~~~~~~~~~~
liblrsb/parser/lib.rs:7:9: 7:23 note: lint level defined here
liblrsb/parser/lib.rs:7 #![warn(unused_results)]
                                ^~~~~~~~~~~~~~
liblrsb/parser/lib.rs:385:17: 385:35 warning: unused result
liblrsb/parser/lib.rs:385                 self.lexer.next();
                                          ^~~~~~~~~~~~~~~~~~
liblrsb/parser/lib.rs:7:9: 7:23 note: lint level defined here
liblrsb/parser/lib.rs:7 #![warn(unused_results)]
                                ^~~~~~~~~~~~~~

At least 5 of those 6 notes add nothing but noise to the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions