diff options
| author | Tomas Gavenciak <gavento@ucw.cz> | 2018-05-03 00:58:35 +0200 |
|---|---|---|
| committer | Tomas Gavenciak <gavento@ucw.cz> | 2018-05-03 00:58:35 +0200 |
| commit | 9073c897459a8582fa61d87f41654e18f9869b46 (patch) | |
| tree | 96e2f2da8cd8769d3baeb9bdab985d388c016bb5 | |
| parent | a43171a24257f015113ecf494286d39f47db88ac (diff) | |
| download | rust-9073c897459a8582fa61d87f41654e18f9869b46.tar.gz rust-9073c897459a8582fa61d87f41654e18f9869b46.zip | |
Minor fromatting for RFC 1598 tests
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 24d756a8331..e71166ed65b 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<T> { type Iter<'iter>: Iterator<Item=&'iter T>; type Family: CollectionFamily; // Test associated type defaults with parameters - type Sibling<U>: Collection<U> = <<Self as Collection<T>>::Family as CollectionFamily>:: - Member<U>; + type Sibling<U>: Collection<U> = + <<Self as Collection<T>>::Family as CollectionFamily>::Member<U>; //~^ ERROR type parameters are not allowed on this type [E0109] fn empty() -> Self; @@ -63,7 +63,7 @@ impl<T> Collection<T> for Vec<T> { } fn floatify<C>(ints: &C) -> <<C as Collection<i32>>::Family as CollectionFamily>::Member<f32> - //~^ ERROR type parameters are not allowed on this type [E0109] +//~^ ERROR type parameters are not allowed on this type [E0109] where C: Collection<i32>, { @@ -75,7 +75,7 @@ where } fn floatify_sibling<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32> - //~^ ERROR type parameters are not allowed on this type [E0109] +//~^ ERROR type parameters are not allowed on this type [E0109] where C: Collection<i32>, { diff --git a/src/test/ui/rfc1598-generic-associated-types/collections.stderr b/src/test/ui/rfc1598-generic-associated-types/collections.stderr index 0a51bf56397..ed96570583f 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<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32> | ^^^ 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<U>; - | ^ type parameter not allowed +LL | <<Self as Collection<T>>::Family as CollectionFamily>::Member<U>; + | ^ 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 f0e711e71e3..6cdcaf25683 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<T> { type Bar<U>; // OK } -impl<T> NoShadowT<T> for Option<T> -{ +impl<T> NoShadowT<T> for Option<T> { type Bar<T> = i32; // Error: shadowed type parameter } |
