]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/question_mark_used.rs
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / question_mark_used.rs
CommitLineData
9ffffee4
FG
1// non rustfixable
2#![allow(unreachable_code)]
3#![allow(dead_code)]
4#![warn(clippy::question_mark_used)]
5
6fn other_function() -> Option<i32> {
7 Some(32)
8}
9
10fn my_function() -> Option<i32> {
11 other_function()?;
781aab86 12 //~^ ERROR: question mark operator was used
9ffffee4
FG
13 None
14}
15
16fn main() {}