mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
add test for ?
desugaring
This commit is contained in:
parent
05bfcbd911
commit
70553711ae
1 changed files with 14 additions and 0 deletions
|
@ -28,3 +28,17 @@ fn main() {
|
|||
fn b() {}
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure this is not triggered on `?` desugaring
|
||||
|
||||
pub fn trigger_fp_option() -> Option<()>{
|
||||
Some(())?;
|
||||
None?;
|
||||
Some(())
|
||||
}
|
||||
|
||||
pub fn trigger_fp_result() -> Result<(), &'static str> {
|
||||
Ok(())?;
|
||||
Err("asdf")?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue