diff options
| -rw-r--r-- | tests/ui/allow_attributes_without_reason.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/allow_attributes_without_reason.rs b/tests/ui/allow_attributes_without_reason.rs index 95a9fa2aa47..2b26624b424 100644 --- a/tests/ui/allow_attributes_without_reason.rs +++ b/tests/ui/allow_attributes_without_reason.rs @@ -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(()) +} |
