Skip to content

Commit c3de7fe

Browse files
committed
---
yaml --- r: 89727 b: refs/heads/master c: 044dec4 h: refs/heads/master i: 89725: 11501ff 89723: e9d20cd 89719: ff041e7 89711: 0456b01 89695: 2b0cdd2 89663: 718a43f 89599: cd5d9e2 v: v3
1 parent f5d80b1 commit c3de7fe

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 98f79735c3f76c9e1a263a4a37104bda51c5dd5f
2+
refs/heads/master: 044dec4cf555e8c8f54d8de2f285201f4cdc2840
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/src/libsyntax/print/pprust.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,17 +1572,24 @@ fn print_path_(s: @ps,
15721572
}
15731573
word(s.s, "<");
15741574

1575+
let mut comma = false;
15751576
for lifetime in segment.lifetimes.iter() {
1576-
print_lifetime(s, lifetime);
1577-
if !segment.types.is_empty() {
1577+
if comma {
15781578
word_space(s, ",")
15791579
}
1580+
print_lifetime(s, lifetime);
1581+
comma = true;
15801582
}
15811583

1582-
commasep(s,
1583-
inconsistent,
1584-
segment.types.map_to_vec(|t| (*t).clone()),
1585-
print_type);
1584+
if !segment.types.is_empty() {
1585+
if comma {
1586+
word_space(s, ",")
1587+
}
1588+
commasep(s,
1589+
inconsistent,
1590+
segment.types.map_to_vec(|t| (*t).clone()),
1591+
print_type);
1592+
}
15861593

15871594
word(s.s, ">")
15881595
}

trunk/src/test/compile-fail/regions-variance-invariant-use-contravariant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn use_<'short,'long>(c: Invariant<'long>,
2727
// 'short <= 'long, this would be true if the Invariant type were
2828
// contravariant with respect to its parameter 'a.
2929

30-
let _: Invariant<'short> = c; //~ ERROR lifetime mistach
30+
let _: Invariant<'short> = c; //~ ERROR mismatched types
3131
}
3232

3333
fn main() { }

0 commit comments

Comments
 (0)