-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Allow unused_must_use on result with never type #65861
Copy link
Copy link
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.F-never_type`#![feature(never_type)]``#![feature(never_type)]`T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.F-never_type`#![feature(never_type)]``#![feature(never_type)]`T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
This code yields a warning:
However since a
Result<T, !>can never have theErrbranch, having to handle the resulting error seems kind of pointless. Would it be possible to disable theunused_must_uselint for this particular case?