diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-05-17 21:28:50 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-05-19 20:34:42 +0300 |
| commit | 26aad254875464ff352a4e18d16f668b5bd9b7cb (patch) | |
| tree | 82c41e684745a322d3a33156dd00016136a5ce45 /src/libsyntax/print | |
| parent | 072b0f617fdd2ccb3bc6dd08718acf9504b7ed3a (diff) | |
| download | rust-26aad254875464ff352a4e18d16f668b5bd9b7cb.tar.gz rust-26aad254875464ff352a4e18d16f668b5bd9b7cb.zip | |
rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded constants".
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 17f83a09c77..be3408ce565 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1076,16 +1076,16 @@ impl<'a> State<'a> { ast::TyKind::ImplTrait(ref bounds) => { self.print_bounds("impl", &bounds[..])?; } - ast::TyKind::Array(ref ty, ref v) => { + ast::TyKind::Array(ref ty, ref length) => { self.s.word("[")?; self.print_type(ty)?; self.s.word("; ")?; - self.print_expr(v)?; + self.print_expr(&length.value)?; self.s.word("]")?; } ast::TyKind::Typeof(ref e) => { self.s.word("typeof(")?; - self.print_expr(e)?; + self.print_expr(&e.value)?; self.s.word(")")?; } ast::TyKind::Infer => { @@ -1552,7 +1552,7 @@ impl<'a> State<'a> { Some(ref d) => { self.s.space()?; self.word_space("=")?; - self.print_expr(d) + self.print_expr(&d.value) } _ => Ok(()) } @@ -1905,14 +1905,14 @@ impl<'a> State<'a> { fn print_expr_repeat(&mut self, element: &ast::Expr, - count: &ast::Expr, + count: &ast::AnonConst, attrs: &[Attribute]) -> io::Result<()> { self.ibox(INDENT_UNIT)?; self.s.word("[")?; self.print_inner_attributes_inline(attrs)?; self.print_expr(element)?; self.word_space(";")?; - self.print_expr(count)?; + self.print_expr(&count.value)?; self.s.word("]")?; self.end() } |
