Closed
Description
Consider the following:
fn f1<'a, 'b, 'c>(_x: &'a u32, _y: &'b u32, _z: &'c u32) where 'c: 'a + 'b { }
fn f2<'a, 'b, 'c: 'a + 'b>(_x: &'a u32, _y: &'b u32, _z:&'c u32) { }
fn f3<'a, 'b, T: 'a + 'b>(_x: &'a u32, _y: &'b u32, _z: T) { }
fn f4<'a, 'b, T>(_x: &'a u32, _y: &'b u32, _z: T) where T: 'a + 'b { }
struct S1<'a, 'b, 'c: 'a + 'b>(&'a u32, &'b u32, &'c u32);
struct S2<'a, 'b, T: 'a + 'b>(&'a u32, &'b u32, T);
struct S3<'a, 'b, T>(&'a u32, &'b u32, T) where T: 'a + 'b;
fn main() { }
struct S4<'a, 'b, 'c>(&'a u32, &'b u32, &'c u32) where 'c: 'a + 'b;
If I feed the above to rustc --pretty -Z unstable-options
, it prints out (note the first and last lines in particular):
fn f1<'a, 'b, 'c>(_x: &'a u32, _y: &'b u32, _z: &'c u32) where 'c:'a'b: { }
fn f2<'a, 'b, 'c:'a+'b>(_x: &'a u32, _y: &'b u32, _z: &'c u32) { }
fn f3<'a, 'b, T: 'a + 'b>(_x: &'a u32, _y: &'b u32, _z: T) { }
fn f4<'a, 'b, T>(_x: &'a u32, _y: &'b u32, _z: T) where T: 'a + 'b { }
struct S1<'a, 'b, 'c:'a+'b>(&'a u32, &'b u32, &'c u32);
struct S2<'a, 'b, T: 'a + 'b>(&'a u32, &'b u32, T);
struct S3<'a, 'b, T>(&'a u32, &'b u32, T) where T: 'a + 'b;
fn main() { }
struct S4<'a, 'b, 'c>(&'a u32, &'b u32, &'c u32) where 'c:'a'b:;
In the first and last lines, we are printing out 'c: 'a'b:
, when we should be printing 'c: 'a + 'b
.
So we are:
- Missing an infix
+
, and - Adding an erroneous
:
to the end.
Metadata
Metadata
Assignees
Labels
No labels