diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-05-27 09:56:47 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-05-27 09:56:47 +0530 |
| commit | a70880fea967715e964f459746a77aa9e93dc35f (patch) | |
| tree | 8c7dba2132a5612c19e8dd01a58b3b4f650fa5ff /src/libsyntax/print | |
| parent | 97e3a2401e4b2f659d69ed0c0822cae04e3495b7 (diff) | |
| parent | 2e812e10f4ece10d90ae3315aba16b88c5e870eb (diff) | |
| download | rust-a70880fea967715e964f459746a77aa9e93dc35f.tar.gz rust-a70880fea967715e964f459746a77aa9e93dc35f.zip | |
Rollup merge of #33351 - birkenfeld:loop-label-spans, r=pnkfelix
This makes the \"shadowing labels\" warning *not* print the entire loop as a span, but only the lifetime. Also makes #31719 go away, but does not fix its root cause (the span of the expanded loop is still wonky, but not used anymore).
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index ebb4927d69c..fec84e912d4 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -2021,7 +2021,7 @@ impl<'a> State<'a> { } ast::ExprKind::While(ref test, ref blk, opt_ident) => { if let Some(ident) = opt_ident { - self.print_ident(ident)?; + self.print_ident(ident.node)?; self.word_space(":")?; } self.head("while")?; @@ -2031,7 +2031,7 @@ impl<'a> State<'a> { } ast::ExprKind::WhileLet(ref pat, ref expr, ref blk, opt_ident) => { if let Some(ident) = opt_ident { - self.print_ident(ident)?; + self.print_ident(ident.node)?; self.word_space(":")?; } self.head("while let")?; @@ -2044,7 +2044,7 @@ impl<'a> State<'a> { } ast::ExprKind::ForLoop(ref pat, ref iter, ref blk, opt_ident) => { if let Some(ident) = opt_ident { - self.print_ident(ident)?; + self.print_ident(ident.node)?; self.word_space(":")?; } self.head("for")?; @@ -2057,7 +2057,7 @@ impl<'a> State<'a> { } ast::ExprKind::Loop(ref blk, opt_ident) => { if let Some(ident) = opt_ident { - self.print_ident(ident)?; + self.print_ident(ident.node)?; self.word_space(":")?; } self.head("loop")?; |
