mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 23:03:06 +03:00
Merge pull request #1888 from kraai/fix-build
Use token_to_string instead of binop_to_string
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
use std::fmt::Display;
|
||||
use std;
|
||||
use syntax::codemap::{CharPos, Span};
|
||||
use syntax::print::pprust::binop_to_string;
|
||||
use syntax::parse::token;
|
||||
use syntax::print::pprust::token_to_string;
|
||||
use syntax::util::parser::AssocOp;
|
||||
use syntax::ast;
|
||||
use utils::{higher, snippet, snippet_opt};
|
||||
@@ -287,7 +288,7 @@ fn needs_paren(op: &AssocOp, other: &AssocOp, dir: Associativity) -> bool {
|
||||
},
|
||||
AssocOp::Inplace => format!("in ({}) {}", lhs, rhs),
|
||||
AssocOp::Assign => format!("{} = {}", lhs, rhs),
|
||||
AssocOp::AssignOp(op) => format!("{} {}= {}", lhs, binop_to_string(op), rhs),
|
||||
AssocOp::AssignOp(op) => format!("{} {}= {}", lhs, token_to_string(&token::BinOp(op)), rhs),
|
||||
AssocOp::As => format!("{} as {}", lhs, rhs),
|
||||
AssocOp::DotDot => format!("{}..{}", lhs, rhs),
|
||||
AssocOp::DotDotDot => format!("{}...{}", lhs, rhs),
|
||||
|
||||
Reference in New Issue
Block a user