RS.CLIPPY.QUESTION_MARK_USED

Checks if the `?` operator is used

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: question_mark_used. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for expressions that use the ? operator and rejects them.

Why restrict this?

Sometimes code wants to avoid the ? operator because for instance a local block requires a macro to re-throw errors to attach additional information to the error.

Example

let result = expr?;

Could be written:

utility_macro!(expr);