diff options
Diffstat (limited to 'tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed')
-rw-r--r-- | tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed new file mode 100644 index 000000000..57387936a --- /dev/null +++ b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed @@ -0,0 +1,17 @@ +//run-rustfix +#![allow(dead_code)] + +trait Trait {} + +fn assert_send(ptr: *mut dyn Trait) -> *mut (dyn Trait + Send) { + //~^ ERROR incorrect parentheses around trait bounds + ptr as _ +} + +fn foo2(_: &(dyn Trait + Send)) {} +//~^ ERROR incorrect parentheses around trait bounds + +fn foo3(_: &(dyn Trait + Send)) {} +//~^ ERROR incorrect parentheses around trait bounds + +fn main() {} |