Skip to content

Commit 9073c89

Browse files
committedMay 2, 2018
Minor fromatting for RFC 1598 tests
1 parent a43171a commit 9073c89

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed
 

‎src/test/ui/rfc1598-generic-associated-types/collections.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ trait Collection<T> {
2222
type Iter<'iter>: Iterator<Item=&'iter T>;
2323
type Family: CollectionFamily;
2424
// Test associated type defaults with parameters
25-
type Sibling<U>: Collection<U> = <<Self as Collection<T>>::Family as CollectionFamily>::
26-
Member<U>;
25+
type Sibling<U>: Collection<U> =
26+
<<Self as Collection<T>>::Family as CollectionFamily>::Member<U>;
2727
//~^ ERROR type parameters are not allowed on this type [E0109]
2828

2929
fn empty() -> Self;
@@ -63,7 +63,7 @@ impl<T> Collection<T> for Vec<T> {
6363
}
6464

6565
fn floatify<C>(ints: &C) -> <<C as Collection<i32>>::Family as CollectionFamily>::Member<f32>
66-
//~^ ERROR type parameters are not allowed on this type [E0109]
66+
//~^ ERROR type parameters are not allowed on this type [E0109]
6767
where
6868
C: Collection<i32>,
6969
{
@@ -75,7 +75,7 @@ where
7575
}
7676

7777
fn floatify_sibling<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32>
78-
//~^ ERROR type parameters are not allowed on this type [E0109]
78+
//~^ ERROR type parameters are not allowed on this type [E0109]
7979
where
8080
C: Collection<i32>,
8181
{

‎src/test/ui/rfc1598-generic-associated-types/collections.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ LL | fn floatify_sibling<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32>
1111
| ^^^ type parameter not allowed
1212

1313
error[E0109]: type parameters are not allowed on this type
14-
--> $DIR/collections.rs:26:16
14+
--> $DIR/collections.rs:26:71
1515
|
16-
LL | Member<U>;
17-
| ^ type parameter not allowed
16+
LL | <<Self as Collection<T>>::Family as CollectionFamily>::Member<U>;
17+
| ^ type parameter not allowed
1818

1919
error[E0110]: lifetime parameters are not allowed on this type
2020
--> $DIR/collections.rs:33:50

‎src/test/ui/rfc1598-generic-associated-types/shadowing.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ trait NoShadow<'a> {
2323
type Bar<'b>; // OK
2424
}
2525

26-
impl<'a> NoShadow<'a> for &'a u32
27-
{
26+
impl<'a> NoShadow<'a> for &'a u32 {
2827
type Bar<'a> = i32; // Error: shadowed lifetime
2928
}
3029

@@ -36,8 +35,7 @@ trait NoShadowT<T> {
3635
type Bar<U>; // OK
3736
}
3837

39-
impl<T> NoShadowT<T> for Option<T>
40-
{
38+
impl<T> NoShadowT<T> for Option<T> {
4139
type Bar<T> = i32; // Error: shadowed type parameter
4240
}
4341

0 commit comments

Comments
 (0)
Please sign in to comment.