1
Fork 0

Rollup merge of #93926 - PatchMixolydic:bugfix/must_use-on-exprs, r=cjgillot

Lint against more useless `#[must_use]` attributes

This expands the existing `#[must_use]` check in `unused_attributes` to lint against pretty much everything `#[must_use]` doesn't support.
Fixes #93906.
This commit is contained in:
Dylan DPC 2022-03-01 03:41:49 +01:00 committed by GitHub
commit daed86445d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 527 additions and 164 deletions

View file

@ -587,7 +587,6 @@ impl<'a> SessionDiagnosticDeriveBuilder<'a> {
// next call to `it.next()` retrieves the next character.
while let Some(c) = it.next() {
if c == '{' && *it.peek().unwrap_or(&'\0') != '{' {
#[must_use]
let mut eat_argument = || -> Option<String> {
let mut result = String::new();
// Format specifiers look like