add test for ? desugaring

This commit is contained in:
Centri3 2023-06-03 18:34:12 -05:00
parent 05bfcbd911
commit 70553711ae

View file

@ -28,3 +28,17 @@ fn main() {
fn b() {} 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(())
}