We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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):
rustc --pretty -Z unstable-options
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.
'c: 'a'b:
'c: 'a + 'b
So we are:
+
:
The text was updated successfully, but these errors were encountered:
Rollup merge of rust-lang#34547 - sanxiyn:pretty-lifetime, r=pnkfelix
a8751e0
Fix pretty-printing of lifetime bound Fix rust-lang#34527.
No branches or pull requests
Consider the following:
If I feed the above to
rustc --pretty -Z unstable-options
, it prints out (note the first and last lines in particular):In the first and last lines, we are printing out
'c: 'a'b:
, when we should be printing'c: 'a + 'b
.So we are:
+
, and:
to the end.The text was updated successfully, but these errors were encountered: