about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-06-10 20:09:22 +0000
committerbors <bors@rust-lang.org>2018-06-10 20:09:22 +0000
commita805a2a5ebba2802f432d79874e59c24e398f82a (patch)
treeef60205bdc07e3c79fed7bf2df5609bca11db3ce /src/test
parentcabb679bf1bf37d34b0de3d60f655cf5e4185db6 (diff)
parentdc87d0d1fbe416d637f8f8f5a2f499e794862dd5 (diff)
downloadrust-a805a2a5ebba2802f432d79874e59c24e398f82a.tar.gz
rust-a805a2a5ebba2802f432d79874e59c24e398f82a.zip
Auto merge of #50205 - topecongiro:include-parens-to-type-parameter, r=petrochenkov
Include parens to type parameter

The motivation of this PR is to fix a bug in rustfmt (cc https://github.com/rust-lang-nursery/rustfmt/issues/2630).
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/maybe-bounds.rs4
-rw-r--r--src/test/ui/maybe-bounds.stderr16
2 files changed, 10 insertions, 10 deletions
diff --git a/src/test/ui/maybe-bounds.rs b/src/test/ui/maybe-bounds.rs
index 1dc198dee83..ec8a6b8ffdc 100644
--- a/src/test/ui/maybe-bounds.rs
+++ b/src/test/ui/maybe-bounds.rs
@@ -10,7 +10,7 @@
 
 trait Tr: ?Sized {} //~ ERROR `?Trait` is not permitted in supertraits
 
-type A1 = Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types
-type A2 = for<'a> Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types
+type A1 = Tr + (?Sized); //~ ERROR `?Trait` is not permitted in trait object types
+type A2 = for<'a> Tr + (?Sized); //~ ERROR `?Trait` is not permitted in trait object types
 
 fn main() {}
diff --git a/src/test/ui/maybe-bounds.stderr b/src/test/ui/maybe-bounds.stderr
index 72f052b75e3..db8f7ad8166 100644
--- a/src/test/ui/maybe-bounds.stderr
+++ b/src/test/ui/maybe-bounds.stderr
@@ -1,22 +1,22 @@
 error: `?Trait` is not permitted in supertraits
-  --> $DIR/maybe-bounds.rs:11:12
+  --> $DIR/maybe-bounds.rs:11:11
    |
 LL | trait Tr: ?Sized {} //~ ERROR `?Trait` is not permitted in supertraits
-   |            ^^^^^
+   |           ^^^^^^
    |
    = note: traits are `?Sized` by default
 
 error: `?Trait` is not permitted in trait object types
-  --> $DIR/maybe-bounds.rs:13:17
+  --> $DIR/maybe-bounds.rs:13:16
    |
-LL | type A1 = Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types
-   |                 ^^^^^
+LL | type A1 = Tr + (?Sized); //~ ERROR `?Trait` is not permitted in trait object types
+   |                ^^^^^^^^
 
 error: `?Trait` is not permitted in trait object types
-  --> $DIR/maybe-bounds.rs:14:25
+  --> $DIR/maybe-bounds.rs:14:24
    |
-LL | type A2 = for<'a> Tr + ?Sized; //~ ERROR `?Trait` is not permitted in trait object types
-   |                         ^^^^^
+LL | type A2 = for<'a> Tr + (?Sized); //~ ERROR `?Trait` is not permitted in trait object types
+   |                        ^^^^^^^^
 
 error: aborting due to 3 previous errors