-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions
Description
If I don't include a ()
at the end of a let res: Result<(), io::Error> = try
block, I get a "passing a unit value to a function" clippy warning. If I do include a ()
, I get an "unneeded unit expression" clippy warning.
Sample code:
let res: Result<(), io::Error> = try {
if true {
some_statement();
} else {
some_other_statement();
}
//()
};
$ cargo clippy --version
clippy 0.0.212 (3bda548f 2019-02-03)
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions