summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.stderr
blob: 2d1abe91a1eb7c2b36e9efe496529c72c9a90ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
error: incorrect parentheses around trait bounds
  --> $DIR/issue-114797-bad-parentheses-dyn-trait.rs:6:49
   |
LL | fn assert_send(ptr: *mut dyn Trait) -> *mut dyn (Trait + Send) {
   |                                                 ^            ^
   |
help: fix the parentheses
   |
LL - fn assert_send(ptr: *mut dyn Trait) -> *mut dyn (Trait + Send) {
LL + fn assert_send(ptr: *mut dyn Trait) -> *mut (dyn Trait + Send) {
   |

error: incorrect parentheses around trait bounds
  --> $DIR/issue-114797-bad-parentheses-dyn-trait.rs:11:17
   |
LL | fn foo2(_: &dyn (Trait + Send)) {}
   |                 ^            ^
   |
help: fix the parentheses
   |
LL - fn foo2(_: &dyn (Trait + Send)) {}
LL + fn foo2(_: &(dyn Trait + Send)) {}
   |

error: incorrect parentheses around trait bounds
  --> $DIR/issue-114797-bad-parentheses-dyn-trait.rs:14:16
   |
LL | fn foo3(_: &dyn(Trait + Send)) {}
   |                ^            ^
   |
help: fix the parentheses
   |
LL - fn foo3(_: &dyn(Trait + Send)) {}
LL + fn foo3(_: &(dyn Trait + Send)) {}
   |

error: aborting due to 3 previous errors