Skip to content

Commit

Permalink
Address request changes
Browse files Browse the repository at this point in the history
  • Loading branch information
matprec committed Oct 7, 2017
1 parent 3dda0ac commit 0233796
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,7 @@ pub struct PatternName {

#[derive(Debug, HasExtent, Visit, Decompose)]
pub enum PatternKind {
Box(PatternBox),
Byte(PatternByte),
ByteString(PatternByteString),
Character(PatternCharacter),
Expand All @@ -1631,7 +1632,6 @@ pub enum PatternKind {
String(PatternString),
Struct(PatternStruct),
Tuple(PatternTuple),
Box(PatternBox)
}

#[derive(Debug, HasExtent, Visit)]
Expand Down Expand Up @@ -2865,7 +2865,6 @@ shims! [
(asterisk, Token::into_asterisk, Error::ExpectedAsterisk),
(at, Token::into_at, Error::ExpectedAt),
(bang, Token::into_bang, Error::ExpectedBang),
(box_pattern, Token::into_box, Error::ExpectedBox),
(caret, Token::into_caret, Error::ExpectedCaret),
(caret_equals, Token::into_caret_equals, Error::ExpectedCaretEquals),
(colon, Token::into_colon, Error::ExpectedColon),
Expand Down Expand Up @@ -3624,7 +3623,7 @@ fn pattern_reference<'s>(pm: &mut Master<'s>, pt: Point<'s>) -> Progress<'s, Pat
fn pattern_box<'s>(pm: &mut Master<'s>, pt: Point<'s>) -> Progress<'s, PatternBox> {
sequence!(pm, pt, {
spt = point;
_ = box_pattern;
_ = kw_box;
pattern = pattern;
}, |pm: &mut Master, pt| PatternBox {
extent: pm.state.ex(spt, pt),
Expand Down Expand Up @@ -5360,12 +5359,6 @@ mod test {
assert_extent!(p, (0, 15))
}

#[test]
fn fn_with_arguments_with_box_pattern() {
let p = qp(function_header, "fn foo(box a: Box<u8>)");
assert_extent!(p, (0, 22))
}

#[test]
fn fn_with_return_type() {
let p = qp(function_header, "fn foo() -> bool");
Expand Down

0 comments on commit 0233796

Please sign in to comment.