about summary refs log tree commit diff
path: root/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed
blob: 4e562193f0d89ff15f05a4e579818730fbfa6fcf (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() -> *mut (dyn Trait + Send) {
    //~^ ERROR incorrect parentheses around trait bounds
    loop {}
}

fn foo2(_: &(dyn Trait + Send)) {}
//~^ ERROR incorrect parentheses around trait bounds

fn foo3(_: &(dyn Trait + Send)) {}
//~^ ERROR incorrect parentheses around trait bounds

fn main() {}