X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibsyntax%2Futil%2Fparser.rs;h=df72fdc801423a2f2bb1012afcaac4062cc5b572;hb=4ae2728fa8052915414127dce28245eb8f70842a;hp=edb708d7e97b20012b54a58bacadfe862eac8605;hpb=392ebad5c693ee9dab4faa70bf400fff1f523dd7;p=rust.git diff --git a/src/libsyntax/util/parser.rs b/src/libsyntax/util/parser.rs index edb708d7e97..df72fdc8014 100644 --- a/src/libsyntax/util/parser.rs +++ b/src/libsyntax/util/parser.rs @@ -69,7 +69,7 @@ pub enum Fixity { impl AssocOp { /// Creates a new AssocOP from a token - crate fn from_token(t: &Token) -> Option { + pub fn from_token(t: &Token) -> Option { use AssocOp::*; match t.kind { token::BinOpEq(k) => Some(AssignOp(k)), @@ -358,7 +358,7 @@ pub fn order(self) -> i8 { } /// In `let p = e`, operators with precedence `<=` this one requires parenthesis in `e`. -crate fn prec_let_scrutinee_needs_par() -> usize { +pub fn prec_let_scrutinee_needs_par() -> usize { AssocOp::LAnd.precedence() }