summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.stderr')
-rw-r--r--tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.stderr38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.stderr b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.stderr
new file mode 100644
index 000000000..2d1abe91a
--- /dev/null
+++ b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.stderr
@@ -0,0 +1,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
+