Skip to content

Commit 7055371

Browse files
committed
add test for ? desugaring
1 parent 05bfcbd commit 7055371

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/ui/allow_attributes_without_reason.rs

+14
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,17 @@ fn main() {
2828
fn b() {}
2929
}
3030
}
31+
32+
// Make sure this is not triggered on `?` desugaring
33+
34+
pub fn trigger_fp_option() -> Option<()>{
35+
Some(())?;
36+
None?;
37+
Some(())
38+
}
39+
40+
pub fn trigger_fp_result() -> Result<(), &'static str> {
41+
Ok(())?;
42+
Err("asdf")?;
43+
Ok(())
44+
}

0 commit comments

Comments
 (0)