From 9073c897459a8582fa61d87f41654e18f9869b46 Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Thu, 3 May 2018 00:58:35 +0200 Subject: [PATCH] Minor fromatting for RFC 1598 tests --- .../ui/rfc1598-generic-associated-types/collections.rs | 8 ++++---- .../rfc1598-generic-associated-types/collections.stderr | 6 +++--- src/test/ui/rfc1598-generic-associated-types/shadowing.rs | 6 ++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/test/ui/rfc1598-generic-associated-types/collections.rs b/src/test/ui/rfc1598-generic-associated-types/collections.rs index 24d756a83314e..e71166ed65bba 100644 --- a/src/test/ui/rfc1598-generic-associated-types/collections.rs +++ b/src/test/ui/rfc1598-generic-associated-types/collections.rs @@ -22,8 +22,8 @@ trait Collection { type Iter<'iter>: Iterator; type Family: CollectionFamily; // Test associated type defaults with parameters - type Sibling: Collection = <>::Family as CollectionFamily>:: - Member; + type Sibling: Collection = + <>::Family as CollectionFamily>::Member; //~^ ERROR type parameters are not allowed on this type [E0109] fn empty() -> Self; @@ -63,7 +63,7 @@ impl Collection for Vec { } fn floatify(ints: &C) -> <>::Family as CollectionFamily>::Member - //~^ ERROR type parameters are not allowed on this type [E0109] +//~^ ERROR type parameters are not allowed on this type [E0109] where C: Collection, { @@ -75,7 +75,7 @@ where } fn floatify_sibling(ints: &C) -> >::Sibling - //~^ ERROR type parameters are not allowed on this type [E0109] +//~^ ERROR type parameters are not allowed on this type [E0109] where C: Collection, { diff --git a/src/test/ui/rfc1598-generic-associated-types/collections.stderr b/src/test/ui/rfc1598-generic-associated-types/collections.stderr index 0a51bf56397df..ed96570583f4f 100644 --- a/src/test/ui/rfc1598-generic-associated-types/collections.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/collections.stderr @@ -11,10 +11,10 @@ LL | fn floatify_sibling(ints: &C) -> >::Sibling | ^^^ type parameter not allowed error[E0109]: type parameters are not allowed on this type - --> $DIR/collections.rs:26:16 + --> $DIR/collections.rs:26:71 | -LL | Member; - | ^ type parameter not allowed +LL | <>::Family as CollectionFamily>::Member; + | ^ type parameter not allowed error[E0110]: lifetime parameters are not allowed on this type --> $DIR/collections.rs:33:50 diff --git a/src/test/ui/rfc1598-generic-associated-types/shadowing.rs b/src/test/ui/rfc1598-generic-associated-types/shadowing.rs index f0e711e71e341..6cdcaf2568394 100644 --- a/src/test/ui/rfc1598-generic-associated-types/shadowing.rs +++ b/src/test/ui/rfc1598-generic-associated-types/shadowing.rs @@ -23,8 +23,7 @@ trait NoShadow<'a> { type Bar<'b>; // OK } -impl<'a> NoShadow<'a> for &'a u32 -{ +impl<'a> NoShadow<'a> for &'a u32 { type Bar<'a> = i32; // Error: shadowed lifetime } @@ -36,8 +35,7 @@ trait NoShadowT { type Bar; // OK } -impl NoShadowT for Option -{ +impl NoShadowT for Option { type Bar = i32; // Error: shadowed type parameter }