summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs
blob: 8a1939bcfe93c5c53cc69f9f64d72889f88d04f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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() {}