mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-27 09:50:41 +00:00
Ignore distinction between DotDotEq and DotDotDot in tests
This commit is contained in:
parent
a27f29fc8d
commit
c6b5e81281
@ -339,7 +339,6 @@ spanless_eq_enum!(Movability; Static Movable);
|
||||
spanless_eq_enum!(Mutability; Mutable Immutable);
|
||||
spanless_eq_enum!(RangeEnd; Included(0) Excluded);
|
||||
spanless_eq_enum!(RangeLimits; HalfOpen Closed);
|
||||
spanless_eq_enum!(RangeSyntax; DotDotDot DotDotEq);
|
||||
spanless_eq_enum!(StmtKind; Local(0) Item(0) Expr(0) Semi(0) Mac(0));
|
||||
spanless_eq_enum!(StrStyle; Cooked Raw(0));
|
||||
spanless_eq_enum!(TokenTree; Token(0 1) Delimited(0 1));
|
||||
@ -388,10 +387,22 @@ impl SpanlessEq for Lit {
|
||||
}
|
||||
}
|
||||
|
||||
impl SpanlessEq for RangeSyntax {
|
||||
fn eq(&self, _other: &Self) -> bool {
|
||||
match self {
|
||||
RangeSyntax::DotDotDot | RangeSyntax::DotDotEq => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl SpanlessEq for Token {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
match (self, other) {
|
||||
(Token::Literal(this, _), Token::Literal(other, _)) => SpanlessEq::eq(this, other),
|
||||
(Token::DotDotEq, _) | (Token::DotDotDot, _) => match other {
|
||||
Token::DotDotEq | Token::DotDotDot => true,
|
||||
_ => false,
|
||||
}
|
||||
_ => self == other,
|
||||
}
|
||||
}
|
||||
|
@ -91,48 +91,17 @@ pub fn base_dir_filter(entry: &DirEntry) -> bool {
|
||||
// use extern::xcrate;
|
||||
"tests/rust/src/test/run-pass/rfc-2126-extern-absolute-paths/extern.rs" |
|
||||
// TODO
|
||||
"tests/rust/src/libcore/ascii.rs" |
|
||||
"tests/rust/src/libcore/char/decode.rs" |
|
||||
"tests/rust/src/libcore/char/methods.rs" |
|
||||
"tests/rust/src/libcore/str/lossy.rs" |
|
||||
"tests/rust/src/libcore/str/mod.rs" |
|
||||
"tests/rust/src/librustc_apfloat/ieee.rs" |
|
||||
"tests/rust/src/librustc_codegen_utils/symbol_names.rs" |
|
||||
"tests/rust/src/librustc_mir/hair/pattern/check_match.rs" |
|
||||
"tests/rust/src/librustc_target/abi/call/mod.rs" |
|
||||
"tests/rust/src/librustc_target/abi/mod.rs" |
|
||||
"tests/rust/src/libserialize/hex.rs" |
|
||||
"tests/rust/src/libserialize/json.rs" |
|
||||
"tests/rust/src/libstd/sys_common/backtrace.rs" |
|
||||
"tests/rust/src/libstd/sys_common/wtf8.rs" |
|
||||
"tests/rust/src/libsyntax/parse/lexer/mod.rs" |
|
||||
"tests/rust/src/libsyntax_ext/format_foreign.rs" |
|
||||
"tests/rust/src/libsyntax_pos/lib.rs" |
|
||||
"tests/rust/src/libterm/terminfo/parm.rs" |
|
||||
"tests/rust/src/test/run-make-fulldeps/save-analysis-rfc2126/extern_in_paths.rs" |
|
||||
"tests/rust/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs" |
|
||||
"tests/rust/src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs" |
|
||||
"tests/rust/src/test/run-pass/async-await.rs" |
|
||||
"tests/rust/src/test/run-pass/byte-literals.rs" |
|
||||
"tests/rust/src/test/run-pass/inferred-suffix-in-pattern-range.rs" |
|
||||
"tests/rust/src/test/run-pass/issue-13867.rs" |
|
||||
"tests/rust/src/test/run-pass/issue-18464.rs" |
|
||||
"tests/rust/src/test/run-pass/issue-21475.rs" |
|
||||
"tests/rust/src/test/run-pass/issue-26251.rs" |
|
||||
"tests/rust/src/test/run-pass/issue-35423.rs" |
|
||||
"tests/rust/src/test/run-pass/issue-49632.rs" |
|
||||
"tests/rust/src/test/run-pass/issue-7222.rs" |
|
||||
"tests/rust/src/test/run-pass/label_break_value.rs" |
|
||||
"tests/rust/src/test/run-pass/macros-in-extern.rs" |
|
||||
"tests/rust/src/test/run-pass/match-range-infer.rs" |
|
||||
"tests/rust/src/test/run-pass/match-range-static.rs" |
|
||||
"tests/rust/src/test/run-pass/match-range.rs" |
|
||||
"tests/rust/src/test/run-pass/rfc-2005-default-binding-mode/range.rs" |
|
||||
"tests/rust/src/test/run-pass/rfc-2421-unreserve-pure-offsetof-sizeof-alignof.rs" |
|
||||
"tests/rust/src/test/rustfix/missing-comma-in-match.rs" |
|
||||
"tests/rust/src/test/rustfix/str-as-char.rs" |
|
||||
"tests/rust/src/test/rustfix/tuple-float-index.rs" |
|
||||
"tests/rust/src/test/ui/const-eval/const_signed_pat.rs" |
|
||||
"tests/rust/src/test/ui/obsolete-in-place/bad.rs" |
|
||||
"tests/rust/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs" |
|
||||
// not actually test cases
|
||||
|
Loading…
Reference in New Issue
Block a user