]> git.lizzy.rs Git - rust.git/commitdiff
Move parse-fail tests to UI
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Sat, 20 Oct 2018 20:36:17 +0000 (23:36 +0300)
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Sun, 21 Oct 2018 11:06:28 +0000 (14:06 +0300)
814 files changed:
src/test/parse-fail/ascii-only-character-escape.rs [deleted file]
src/test/parse-fail/assoc-oddities-1.rs [deleted file]
src/test/parse-fail/assoc-oddities-2.rs [deleted file]
src/test/parse-fail/associated-types-project-from-hrtb-explicit.rs [deleted file]
src/test/parse-fail/attr-bad-meta-2.rs [deleted file]
src/test/parse-fail/attr-bad-meta-3.rs [deleted file]
src/test/parse-fail/attr-bad-meta.rs [deleted file]
src/test/parse-fail/attr-before-eof.rs [deleted file]
src/test/parse-fail/attr-dangling-in-fn.rs [deleted file]
src/test/parse-fail/attr-dangling-in-mod.rs [deleted file]
src/test/parse-fail/attr.rs [deleted file]
src/test/parse-fail/attrs-after-extern-mod.rs [deleted file]
src/test/parse-fail/bad-char-literals.rs [deleted file]
src/test/parse-fail/bad-lit-suffixes.rs [deleted file]
src/test/parse-fail/bad-match.rs [deleted file]
src/test/parse-fail/bad-name.rs [deleted file]
src/test/parse-fail/bad-pointer-type.rs [deleted file]
src/test/parse-fail/bad-value-ident-false.rs [deleted file]
src/test/parse-fail/bad-value-ident-true.rs [deleted file]
src/test/parse-fail/better-expected.rs [deleted file]
src/test/parse-fail/bind-struct-early-modifiers.rs [deleted file]
src/test/parse-fail/bound-single-question-mark.rs [deleted file]
src/test/parse-fail/bounds-lifetime-1.rs [deleted file]
src/test/parse-fail/bounds-lifetime-2.rs [deleted file]
src/test/parse-fail/bounds-lifetime-where-1.rs [deleted file]
src/test/parse-fail/bounds-lifetime-where.rs [deleted file]
src/test/parse-fail/bounds-lifetime.rs [deleted file]
src/test/parse-fail/bounds-type-where.rs [deleted file]
src/test/parse-fail/bounds-type.rs [deleted file]
src/test/parse-fail/brace-after-qualified-path-in-match.rs [deleted file]
src/test/parse-fail/byte-literals.rs [deleted file]
src/test/parse-fail/byte-string-literals.rs [deleted file]
src/test/parse-fail/circular_modules_hello.rs [deleted file]
src/test/parse-fail/circular_modules_main.rs [deleted file]
src/test/parse-fail/class-implements-bad-trait.rs [deleted file]
src/test/parse-fail/closure-return-syntax.rs [deleted file]
src/test/parse-fail/column-offset-1-based.rs [deleted file]
src/test/parse-fail/default.rs [deleted file]
src/test/parse-fail/do-catch-suggests-try.rs [deleted file]
src/test/parse-fail/doc-after-struct-field.rs [deleted file]
src/test/parse-fail/doc-before-attr.rs [deleted file]
src/test/parse-fail/doc-before-eof.rs [deleted file]
src/test/parse-fail/doc-before-extern-rbrace.rs [deleted file]
src/test/parse-fail/doc-before-fn-rbrace.rs [deleted file]
src/test/parse-fail/doc-before-identifier.rs [deleted file]
src/test/parse-fail/doc-before-mod-rbrace.rs [deleted file]
src/test/parse-fail/doc-before-rbrace.rs [deleted file]
src/test/parse-fail/doc-before-semi.rs [deleted file]
src/test/parse-fail/doc-before-struct-rbrace-1.rs [deleted file]
src/test/parse-fail/doc-before-struct-rbrace-2.rs [deleted file]
src/test/parse-fail/duplicate-visibility.rs [deleted file]
src/test/parse-fail/empty-impl-semicolon.rs [deleted file]
src/test/parse-fail/extern-crate-unexpected-token.rs [deleted file]
src/test/parse-fail/extern-expected-fn-or-brace.rs [deleted file]
src/test/parse-fail/extern-foreign-crate.rs [deleted file]
src/test/parse-fail/extern-no-fn.rs [deleted file]
src/test/parse-fail/impl-qpath.rs [deleted file]
src/test/parse-fail/import-from-path.rs [deleted file]
src/test/parse-fail/import-from-rename.rs [deleted file]
src/test/parse-fail/import-glob-path.rs [deleted file]
src/test/parse-fail/import-glob-rename.rs [deleted file]
src/test/parse-fail/inner-attr-after-doc-comment.rs [deleted file]
src/test/parse-fail/inner-attr.rs [deleted file]
src/test/parse-fail/int-literal-too-large-span.rs [deleted file]
src/test/parse-fail/issue-10392-2.rs [deleted file]
src/test/parse-fail/issue-10392.rs [deleted file]
src/test/parse-fail/issue-14303-enum.rs [deleted file]
src/test/parse-fail/issue-14303-fn-def.rs [deleted file]
src/test/parse-fail/issue-14303-fncall.rs [deleted file]
src/test/parse-fail/issue-14303-impl.rs [deleted file]
src/test/parse-fail/issue-14303-path.rs [deleted file]
src/test/parse-fail/issue-14303-struct.rs [deleted file]
src/test/parse-fail/issue-14303-trait.rs [deleted file]
src/test/parse-fail/issue-15914.rs [deleted file]
src/test/parse-fail/issue-1655.rs [deleted file]
src/test/parse-fail/issue-17383.rs [deleted file]
src/test/parse-fail/issue-17718-const-mut.rs [deleted file]
src/test/parse-fail/issue-17904-2.rs [deleted file]
src/test/parse-fail/issue-17904.rs [deleted file]
src/test/parse-fail/issue-1802-1.rs [deleted file]
src/test/parse-fail/issue-1802-2.rs [deleted file]
src/test/parse-fail/issue-19096.rs [deleted file]
src/test/parse-fail/issue-19398.rs [deleted file]
src/test/parse-fail/issue-20711-2.rs [deleted file]
src/test/parse-fail/issue-20711.rs [deleted file]
src/test/parse-fail/issue-21153.rs [deleted file]
src/test/parse-fail/issue-22647.rs [deleted file]
src/test/parse-fail/issue-22712.rs [deleted file]
src/test/parse-fail/issue-2354-1.rs [deleted file]
src/test/parse-fail/issue-23620-invalid-escapes.rs [deleted file]
src/test/parse-fail/issue-24197.rs [deleted file]
src/test/parse-fail/issue-24375.rs [deleted file]
src/test/parse-fail/issue-24780.rs [deleted file]
src/test/parse-fail/issue-27255.rs [deleted file]
src/test/parse-fail/issue-30318.rs [deleted file]
src/test/parse-fail/issue-3036.rs [deleted file]
src/test/parse-fail/issue-32214.rs [deleted file]
src/test/parse-fail/issue-32446.rs [deleted file]
src/test/parse-fail/issue-32501.rs [deleted file]
src/test/parse-fail/issue-32505.rs [deleted file]
src/test/parse-fail/issue-33262.rs [deleted file]
src/test/parse-fail/issue-33413.rs [deleted file]
src/test/parse-fail/issue-33455.rs [deleted file]
src/test/parse-fail/issue-33569.rs [deleted file]
src/test/parse-fail/issue-37113.rs [deleted file]
src/test/parse-fail/issue-37234.rs [deleted file]
src/test/parse-fail/issue-43692.rs [deleted file]
src/test/parse-fail/issue-5544-a.rs [deleted file]
src/test/parse-fail/issue-5544-b.rs [deleted file]
src/test/parse-fail/issue-5806.rs [deleted file]
src/test/parse-fail/issue-6610.rs [deleted file]
src/test/parse-fail/issue-8537.rs [deleted file]
src/test/parse-fail/keyword-abstract.rs [deleted file]
src/test/parse-fail/keyword-as-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-box-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-break-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-const-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-continue-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-else-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-enum-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-final.rs [deleted file]
src/test/parse-fail/keyword-fn-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-for-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-if-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-impl-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-in-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-let-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-loop-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-match-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-mod-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-move-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-mut-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-override.rs [deleted file]
src/test/parse-fail/keyword-pub-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-ref-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-return-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-static-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-struct-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-trait-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-try-as-identifier-edition2018.rs [deleted file]
src/test/parse-fail/keyword-type-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-typeof.rs [deleted file]
src/test/parse-fail/keyword-unsafe-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-use-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-where-as-identifier.rs [deleted file]
src/test/parse-fail/keyword-while-as-identifier.rs [deleted file]
src/test/parse-fail/keyword.rs [deleted file]
src/test/parse-fail/keywords-followed-by-double-colon.rs [deleted file]
src/test/parse-fail/lex-bad-binary-literal.rs [deleted file]
src/test/parse-fail/lex-bad-char-literals-1.rs [deleted file]
src/test/parse-fail/lex-bad-char-literals-2.rs [deleted file]
src/test/parse-fail/lex-bad-char-literals-3.rs [deleted file]
src/test/parse-fail/lex-bad-char-literals-4.rs [deleted file]
src/test/parse-fail/lex-bad-char-literals-5.rs [deleted file]
src/test/parse-fail/lex-bad-numeric-literals.rs [deleted file]
src/test/parse-fail/lex-bad-octal-literal.rs [deleted file]
src/test/parse-fail/lex-bad-token.rs [deleted file]
src/test/parse-fail/lex-bare-cr-string-literal-doc-comment.rs [deleted file]
src/test/parse-fail/lex-stray-backslash.rs [deleted file]
src/test/parse-fail/lifetime-in-pattern.rs [deleted file]
src/test/parse-fail/lifetime-semicolon.rs [deleted file]
src/test/parse-fail/macro-bad-delimiter-ident.rs [deleted file]
src/test/parse-fail/macro-doc-comments-1.rs [deleted file]
src/test/parse-fail/macro-doc-comments-2.rs [deleted file]
src/test/parse-fail/macro-keyword.rs [deleted file]
src/test/parse-fail/macro-mismatched-delim-brace-paren.rs [deleted file]
src/test/parse-fail/macro-mismatched-delim-paren-brace.rs [deleted file]
src/test/parse-fail/macro-repeat.rs [deleted file]
src/test/parse-fail/macros-no-semicolon-items.rs [deleted file]
src/test/parse-fail/macros-no-semicolon.rs [deleted file]
src/test/parse-fail/match-arrows-block-then-binop.rs [deleted file]
src/test/parse-fail/match-vec-invalid.rs [deleted file]
src/test/parse-fail/mod_file_not_exist.rs [deleted file]
src/test/parse-fail/mod_file_not_exist_windows.rs [deleted file]
src/test/parse-fail/mod_file_with_path_attr.rs [deleted file]
src/test/parse-fail/multiline-comment-line-tracking.rs [deleted file]
src/test/parse-fail/multitrait.rs [deleted file]
src/test/parse-fail/mut-patterns.rs [deleted file]
src/test/parse-fail/new-unicode-escapes-1.rs [deleted file]
src/test/parse-fail/new-unicode-escapes-2.rs [deleted file]
src/test/parse-fail/new-unicode-escapes-3.rs [deleted file]
src/test/parse-fail/new-unicode-escapes-4.rs [deleted file]
src/test/parse-fail/no-binary-float-literal.rs [deleted file]
src/test/parse-fail/no-hex-float-literal.rs [deleted file]
src/test/parse-fail/no-unsafe-self.rs [deleted file]
src/test/parse-fail/not-a-pred.rs [deleted file]
src/test/parse-fail/omitted-arg-in-item-fn.rs [deleted file]
src/test/parse-fail/paamayim-nekudotayim.rs [deleted file]
src/test/parse-fail/paren-after-qualified-path-in-match.rs [deleted file]
src/test/parse-fail/pat-lt-bracket-1.rs [deleted file]
src/test/parse-fail/pat-lt-bracket-2.rs [deleted file]
src/test/parse-fail/pat-lt-bracket-3.rs [deleted file]
src/test/parse-fail/pat-lt-bracket-4.rs [deleted file]
src/test/parse-fail/pat-lt-bracket-5.rs [deleted file]
src/test/parse-fail/pat-lt-bracket-6.rs [deleted file]
src/test/parse-fail/pat-lt-bracket-7.rs [deleted file]
src/test/parse-fail/pat-ranges-1.rs [deleted file]
src/test/parse-fail/pat-ranges-2.rs [deleted file]
src/test/parse-fail/pat-ranges-3.rs [deleted file]
src/test/parse-fail/pat-ranges-4.rs [deleted file]
src/test/parse-fail/pat-ref-enum.rs [deleted file]
src/test/parse-fail/pat-tuple-1.rs [deleted file]
src/test/parse-fail/pat-tuple-2.rs [deleted file]
src/test/parse-fail/pat-tuple-3.rs [deleted file]
src/test/parse-fail/pat-tuple-4.rs [deleted file]
src/test/parse-fail/pat-tuple-5.rs [deleted file]
src/test/parse-fail/pub-item-macro.rs [deleted file]
src/test/parse-fail/pub-method-macro.rs [deleted file]
src/test/parse-fail/range-3.rs [deleted file]
src/test/parse-fail/range-4.rs [deleted file]
src/test/parse-fail/range_inclusive.rs [deleted file]
src/test/parse-fail/range_inclusive_dotdotdot.rs [deleted file]
src/test/parse-fail/raw-byte-string-eof.rs [deleted file]
src/test/parse-fail/raw-byte-string-literals.rs [deleted file]
src/test/parse-fail/raw-str-delim.rs [deleted file]
src/test/parse-fail/raw-str-unbalanced.rs [deleted file]
src/test/parse-fail/raw-str-unterminated.rs [deleted file]
src/test/parse-fail/recover-enum.rs [deleted file]
src/test/parse-fail/recover-enum2.rs [deleted file]
src/test/parse-fail/recover-struct.rs [deleted file]
src/test/parse-fail/regions-out-of-scope-slice.rs [deleted file]
src/test/parse-fail/removed-syntax-closure-lifetime.rs [deleted file]
src/test/parse-fail/removed-syntax-enum-newtype.rs [deleted file]
src/test/parse-fail/removed-syntax-extern-const.rs [deleted file]
src/test/parse-fail/removed-syntax-field-let.rs [deleted file]
src/test/parse-fail/removed-syntax-field-semicolon.rs [deleted file]
src/test/parse-fail/removed-syntax-fixed-vec.rs [deleted file]
src/test/parse-fail/removed-syntax-fn-sigil.rs [deleted file]
src/test/parse-fail/removed-syntax-mode.rs [deleted file]
src/test/parse-fail/removed-syntax-mut-vec-expr.rs [deleted file]
src/test/parse-fail/removed-syntax-mut-vec-ty.rs [deleted file]
src/test/parse-fail/removed-syntax-ptr-lifetime.rs [deleted file]
src/test/parse-fail/removed-syntax-record.rs [deleted file]
src/test/parse-fail/removed-syntax-static-fn.rs [deleted file]
src/test/parse-fail/removed-syntax-uniq-mut-expr.rs [deleted file]
src/test/parse-fail/removed-syntax-uniq-mut-ty.rs [deleted file]
src/test/parse-fail/removed-syntax-with-1.rs [deleted file]
src/test/parse-fail/removed-syntax-with-2.rs [deleted file]
src/test/parse-fail/require-parens-for-chained-comparison.rs [deleted file]
src/test/parse-fail/struct-field-numeric-shorthand.rs [deleted file]
src/test/parse-fail/struct-literal-in-for.rs [deleted file]
src/test/parse-fail/struct-literal-in-if.rs [deleted file]
src/test/parse-fail/struct-literal-in-match-discriminant.rs [deleted file]
src/test/parse-fail/struct-literal-in-while.rs [deleted file]
src/test/parse-fail/struct-literal-restrictions-in-lamda.rs [deleted file]
src/test/parse-fail/tag-variant-disr-non-nullary.rs [deleted file]
src/test/parse-fail/trailing-carriage-return-in-string.rs [deleted file]
src/test/parse-fail/trait-bounds-not-on-impl.rs [deleted file]
src/test/parse-fail/trait-non-item-macros.rs [deleted file]
src/test/parse-fail/trait-object-bad-parens.rs [deleted file]
src/test/parse-fail/trait-object-lifetime-parens.rs [deleted file]
src/test/parse-fail/trait-object-macro-matcher.rs [deleted file]
src/test/parse-fail/trait-object-polytrait-priority.rs [deleted file]
src/test/parse-fail/trait-object-trait-parens.rs [deleted file]
src/test/parse-fail/trait-plusequal-splitting.rs [deleted file]
src/test/parse-fail/trait-pub-assoc-const.rs [deleted file]
src/test/parse-fail/trait-pub-assoc-ty.rs [deleted file]
src/test/parse-fail/trait-pub-method.rs [deleted file]
src/test/parse-fail/type-parameters-in-field-exprs.rs [deleted file]
src/test/parse-fail/unbalanced-doublequote.rs [deleted file]
src/test/parse-fail/underscore-suffix-for-float.rs [deleted file]
src/test/parse-fail/underscore-suffix-for-string.rs [deleted file]
src/test/parse-fail/unicode-chars.rs [deleted file]
src/test/parse-fail/unsized.rs [deleted file]
src/test/parse-fail/unsized2.rs [deleted file]
src/test/parse-fail/use-as-where-use-ends-with-mod-sep.rs [deleted file]
src/test/parse-fail/use-ends-with-mod-sep.rs [deleted file]
src/test/parse-fail/variadic-ffi-3.rs [deleted file]
src/test/parse-fail/variadic-ffi-4.rs [deleted file]
src/test/parse-fail/virtual-structs.rs [deleted file]
src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs [deleted file]
src/test/parse-fail/where_with_bound.rs [deleted file]
src/test/parse-fail/wrong-escape-of-curly-braces.rs [deleted file]
src/test/ui/parser/ascii-only-character-escape.rs [new file with mode: 0644]
src/test/ui/parser/ascii-only-character-escape.stderr [new file with mode: 0644]
src/test/ui/parser/assoc-oddities-1.rs [new file with mode: 0644]
src/test/ui/parser/assoc-oddities-1.stderr [new file with mode: 0644]
src/test/ui/parser/assoc-oddities-2.rs [new file with mode: 0644]
src/test/ui/parser/assoc-oddities-2.stderr [new file with mode: 0644]
src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs [new file with mode: 0644]
src/test/ui/parser/associated-types-project-from-hrtb-explicit.stderr [new file with mode: 0644]
src/test/ui/parser/attr-bad-meta-2.rs [new file with mode: 0644]
src/test/ui/parser/attr-bad-meta-2.stderr [new file with mode: 0644]
src/test/ui/parser/attr-bad-meta-3.rs [new file with mode: 0644]
src/test/ui/parser/attr-bad-meta-3.stderr [new file with mode: 0644]
src/test/ui/parser/attr-bad-meta.rs [new file with mode: 0644]
src/test/ui/parser/attr-bad-meta.stderr [new file with mode: 0644]
src/test/ui/parser/attr-before-eof.rs [new file with mode: 0644]
src/test/ui/parser/attr-before-eof.stderr [new file with mode: 0644]
src/test/ui/parser/attr-dangling-in-fn.rs [new file with mode: 0644]
src/test/ui/parser/attr-dangling-in-fn.stderr [new file with mode: 0644]
src/test/ui/parser/attr-dangling-in-mod.rs [new file with mode: 0644]
src/test/ui/parser/attr-dangling-in-mod.stderr [new file with mode: 0644]
src/test/ui/parser/attr.rs [new file with mode: 0644]
src/test/ui/parser/attr.stderr [new file with mode: 0644]
src/test/ui/parser/attrs-after-extern-mod.rs [new file with mode: 0644]
src/test/ui/parser/attrs-after-extern-mod.stderr [new file with mode: 0644]
src/test/ui/parser/bad-char-literals.rs [new file with mode: 0644]
src/test/ui/parser/bad-char-literals.stderr [new file with mode: 0644]
src/test/ui/parser/bad-lit-suffixes.rs [new file with mode: 0644]
src/test/ui/parser/bad-lit-suffixes.stderr [new file with mode: 0644]
src/test/ui/parser/bad-match.rs [new file with mode: 0644]
src/test/ui/parser/bad-match.stderr [new file with mode: 0644]
src/test/ui/parser/bad-name.rs [new file with mode: 0644]
src/test/ui/parser/bad-name.stderr [new file with mode: 0644]
src/test/ui/parser/bad-pointer-type.rs [new file with mode: 0644]
src/test/ui/parser/bad-pointer-type.stderr [new file with mode: 0644]
src/test/ui/parser/bad-value-ident-false.rs [new file with mode: 0644]
src/test/ui/parser/bad-value-ident-false.stderr [new file with mode: 0644]
src/test/ui/parser/bad-value-ident-true.rs [new file with mode: 0644]
src/test/ui/parser/bad-value-ident-true.stderr [new file with mode: 0644]
src/test/ui/parser/better-expected.rs [new file with mode: 0644]
src/test/ui/parser/better-expected.stderr [new file with mode: 0644]
src/test/ui/parser/bind-struct-early-modifiers.rs [new file with mode: 0644]
src/test/ui/parser/bind-struct-early-modifiers.stderr [new file with mode: 0644]
src/test/ui/parser/bound-single-question-mark.rs [new file with mode: 0644]
src/test/ui/parser/bound-single-question-mark.stderr [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime-1.rs [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime-1.stderr [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime-2.rs [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime-2.stderr [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime-where-1.rs [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime-where-1.stderr [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime-where.rs [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime-where.stderr [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime.rs [new file with mode: 0644]
src/test/ui/parser/bounds-lifetime.stderr [new file with mode: 0644]
src/test/ui/parser/bounds-type-where.rs [new file with mode: 0644]
src/test/ui/parser/bounds-type-where.stderr [new file with mode: 0644]
src/test/ui/parser/bounds-type.rs [new file with mode: 0644]
src/test/ui/parser/bounds-type.stderr [new file with mode: 0644]
src/test/ui/parser/brace-after-qualified-path-in-match.rs [new file with mode: 0644]
src/test/ui/parser/brace-after-qualified-path-in-match.stderr [new file with mode: 0644]
src/test/ui/parser/byte-literals.rs [new file with mode: 0644]
src/test/ui/parser/byte-literals.stderr [new file with mode: 0644]
src/test/ui/parser/byte-string-literals.rs [new file with mode: 0644]
src/test/ui/parser/byte-string-literals.stderr [new file with mode: 0644]
src/test/ui/parser/circular_modules_hello.rs [new file with mode: 0644]
src/test/ui/parser/circular_modules_main.rs [new file with mode: 0644]
src/test/ui/parser/circular_modules_main.stderr [new file with mode: 0644]
src/test/ui/parser/class-implements-bad-trait.rs [new file with mode: 0644]
src/test/ui/parser/class-implements-bad-trait.stderr [new file with mode: 0644]
src/test/ui/parser/closure-return-syntax.rs [new file with mode: 0644]
src/test/ui/parser/closure-return-syntax.stderr [new file with mode: 0644]
src/test/ui/parser/column-offset-1-based.rs [new file with mode: 0644]
src/test/ui/parser/column-offset-1-based.stderr [new file with mode: 0644]
src/test/ui/parser/default.rs [new file with mode: 0644]
src/test/ui/parser/default.stderr [new file with mode: 0644]
src/test/ui/parser/do-catch-suggests-try.rs [new file with mode: 0644]
src/test/ui/parser/do-catch-suggests-try.stderr [new file with mode: 0644]
src/test/ui/parser/doc-after-struct-field.rs [new file with mode: 0644]
src/test/ui/parser/doc-after-struct-field.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-attr.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-attr.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-eof.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-eof.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-extern-rbrace.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-extern-rbrace.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-fn-rbrace.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-fn-rbrace.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-identifier.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-mod-rbrace.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-mod-rbrace.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-rbrace.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-rbrace.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-semi.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-semi.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-struct-rbrace-1.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-struct-rbrace-1.stderr [new file with mode: 0644]
src/test/ui/parser/doc-before-struct-rbrace-2.rs [new file with mode: 0644]
src/test/ui/parser/doc-before-struct-rbrace-2.stderr [new file with mode: 0644]
src/test/ui/parser/duplicate-visibility.rs [new file with mode: 0644]
src/test/ui/parser/duplicate-visibility.stderr [new file with mode: 0644]
src/test/ui/parser/empty-impl-semicolon.rs [new file with mode: 0644]
src/test/ui/parser/empty-impl-semicolon.stderr [new file with mode: 0644]
src/test/ui/parser/extern-crate-unexpected-token.rs [new file with mode: 0644]
src/test/ui/parser/extern-crate-unexpected-token.stderr [new file with mode: 0644]
src/test/ui/parser/extern-expected-fn-or-brace.rs [new file with mode: 0644]
src/test/ui/parser/extern-expected-fn-or-brace.stderr [new file with mode: 0644]
src/test/ui/parser/extern-foreign-crate.rs [new file with mode: 0644]
src/test/ui/parser/extern-foreign-crate.stderr [new file with mode: 0644]
src/test/ui/parser/extern-no-fn.rs [new file with mode: 0644]
src/test/ui/parser/extern-no-fn.stderr [new file with mode: 0644]
src/test/ui/parser/impl-qpath.rs [new file with mode: 0644]
src/test/ui/parser/impl-qpath.stderr [new file with mode: 0644]
src/test/ui/parser/import-from-path.rs [new file with mode: 0644]
src/test/ui/parser/import-from-path.stderr [new file with mode: 0644]
src/test/ui/parser/import-from-rename.rs [new file with mode: 0644]
src/test/ui/parser/import-from-rename.stderr [new file with mode: 0644]
src/test/ui/parser/import-glob-path.rs [new file with mode: 0644]
src/test/ui/parser/import-glob-path.stderr [new file with mode: 0644]
src/test/ui/parser/import-glob-rename.rs [new file with mode: 0644]
src/test/ui/parser/import-glob-rename.stderr [new file with mode: 0644]
src/test/ui/parser/inner-attr-after-doc-comment.rs [new file with mode: 0644]
src/test/ui/parser/inner-attr-after-doc-comment.stderr [new file with mode: 0644]
src/test/ui/parser/inner-attr.rs [new file with mode: 0644]
src/test/ui/parser/inner-attr.stderr [new file with mode: 0644]
src/test/ui/parser/int-literal-too-large-span.rs [new file with mode: 0644]
src/test/ui/parser/int-literal-too-large-span.stderr [new file with mode: 0644]
src/test/ui/parser/issue-10392-2.rs [new file with mode: 0644]
src/test/ui/parser/issue-10392-2.stderr [new file with mode: 0644]
src/test/ui/parser/issue-10392.rs [new file with mode: 0644]
src/test/ui/parser/issue-10392.stderr [new file with mode: 0644]
src/test/ui/parser/issue-14303-enum.rs [new file with mode: 0644]
src/test/ui/parser/issue-14303-enum.stderr [new file with mode: 0644]
src/test/ui/parser/issue-14303-fn-def.rs [new file with mode: 0644]
src/test/ui/parser/issue-14303-fn-def.stderr [new file with mode: 0644]
src/test/ui/parser/issue-14303-fncall.rs [new file with mode: 0644]
src/test/ui/parser/issue-14303-fncall.stderr [new file with mode: 0644]
src/test/ui/parser/issue-14303-impl.rs [new file with mode: 0644]
src/test/ui/parser/issue-14303-impl.stderr [new file with mode: 0644]
src/test/ui/parser/issue-14303-path.rs [new file with mode: 0644]
src/test/ui/parser/issue-14303-path.stderr [new file with mode: 0644]
src/test/ui/parser/issue-14303-struct.rs [new file with mode: 0644]
src/test/ui/parser/issue-14303-struct.stderr [new file with mode: 0644]
src/test/ui/parser/issue-14303-trait.rs [new file with mode: 0644]
src/test/ui/parser/issue-14303-trait.stderr [new file with mode: 0644]
src/test/ui/parser/issue-15914.rs [new file with mode: 0644]
src/test/ui/parser/issue-15914.stderr [new file with mode: 0644]
src/test/ui/parser/issue-1655.rs [new file with mode: 0644]
src/test/ui/parser/issue-1655.stderr [new file with mode: 0644]
src/test/ui/parser/issue-17383.rs [new file with mode: 0644]
src/test/ui/parser/issue-17383.stderr [new file with mode: 0644]
src/test/ui/parser/issue-17718-const-mut.rs [new file with mode: 0644]
src/test/ui/parser/issue-17718-const-mut.stderr [new file with mode: 0644]
src/test/ui/parser/issue-17904-2.rs [new file with mode: 0644]
src/test/ui/parser/issue-17904-2.stderr [new file with mode: 0644]
src/test/ui/parser/issue-17904.rs [new file with mode: 0644]
src/test/ui/parser/issue-17904.stderr [new file with mode: 0644]
src/test/ui/parser/issue-1802-1.rs [new file with mode: 0644]
src/test/ui/parser/issue-1802-1.stderr [new file with mode: 0644]
src/test/ui/parser/issue-1802-2.rs [new file with mode: 0644]
src/test/ui/parser/issue-1802-2.stderr [new file with mode: 0644]
src/test/ui/parser/issue-19096.rs [new file with mode: 0644]
src/test/ui/parser/issue-19096.stderr [new file with mode: 0644]
src/test/ui/parser/issue-19398.rs [new file with mode: 0644]
src/test/ui/parser/issue-19398.stderr [new file with mode: 0644]
src/test/ui/parser/issue-20711-2.rs [new file with mode: 0644]
src/test/ui/parser/issue-20711-2.stderr [new file with mode: 0644]
src/test/ui/parser/issue-20711.rs [new file with mode: 0644]
src/test/ui/parser/issue-20711.stderr [new file with mode: 0644]
src/test/ui/parser/issue-21153.rs [new file with mode: 0644]
src/test/ui/parser/issue-21153.stderr [new file with mode: 0644]
src/test/ui/parser/issue-22647.rs [new file with mode: 0644]
src/test/ui/parser/issue-22647.stderr [new file with mode: 0644]
src/test/ui/parser/issue-22712.rs [new file with mode: 0644]
src/test/ui/parser/issue-22712.stderr [new file with mode: 0644]
src/test/ui/parser/issue-2354-1.rs [new file with mode: 0644]
src/test/ui/parser/issue-2354-1.stderr [new file with mode: 0644]
src/test/ui/parser/issue-23620-invalid-escapes.rs [new file with mode: 0644]
src/test/ui/parser/issue-23620-invalid-escapes.stderr [new file with mode: 0644]
src/test/ui/parser/issue-24197.rs [new file with mode: 0644]
src/test/ui/parser/issue-24197.stderr [new file with mode: 0644]
src/test/ui/parser/issue-24375.rs [new file with mode: 0644]
src/test/ui/parser/issue-24375.stderr [new file with mode: 0644]
src/test/ui/parser/issue-24780.rs [new file with mode: 0644]
src/test/ui/parser/issue-24780.stderr [new file with mode: 0644]
src/test/ui/parser/issue-27255.rs [new file with mode: 0644]
src/test/ui/parser/issue-27255.stderr [new file with mode: 0644]
src/test/ui/parser/issue-30318.rs [new file with mode: 0644]
src/test/ui/parser/issue-30318.stderr [new file with mode: 0644]
src/test/ui/parser/issue-3036.rs [new file with mode: 0644]
src/test/ui/parser/issue-3036.stderr [new file with mode: 0644]
src/test/ui/parser/issue-32214.rs [new file with mode: 0644]
src/test/ui/parser/issue-32214.stderr [new file with mode: 0644]
src/test/ui/parser/issue-32446.rs [new file with mode: 0644]
src/test/ui/parser/issue-32446.stderr [new file with mode: 0644]
src/test/ui/parser/issue-32501.rs [new file with mode: 0644]
src/test/ui/parser/issue-32501.stderr [new file with mode: 0644]
src/test/ui/parser/issue-32505.rs [new file with mode: 0644]
src/test/ui/parser/issue-32505.stderr [new file with mode: 0644]
src/test/ui/parser/issue-33262.rs [new file with mode: 0644]
src/test/ui/parser/issue-33262.stderr [new file with mode: 0644]
src/test/ui/parser/issue-33413.rs [new file with mode: 0644]
src/test/ui/parser/issue-33413.stderr [new file with mode: 0644]
src/test/ui/parser/issue-33455.rs [new file with mode: 0644]
src/test/ui/parser/issue-33455.stderr [new file with mode: 0644]
src/test/ui/parser/issue-33569.rs [new file with mode: 0644]
src/test/ui/parser/issue-33569.stderr [new file with mode: 0644]
src/test/ui/parser/issue-37113.rs [new file with mode: 0644]
src/test/ui/parser/issue-37113.stderr [new file with mode: 0644]
src/test/ui/parser/issue-37234.rs [new file with mode: 0644]
src/test/ui/parser/issue-37234.stderr [new file with mode: 0644]
src/test/ui/parser/issue-43692.rs [new file with mode: 0644]
src/test/ui/parser/issue-43692.stderr [new file with mode: 0644]
src/test/ui/parser/issue-5544-a.rs [new file with mode: 0644]
src/test/ui/parser/issue-5544-a.stderr [new file with mode: 0644]
src/test/ui/parser/issue-5544-b.rs [new file with mode: 0644]
src/test/ui/parser/issue-5544-b.stderr [new file with mode: 0644]
src/test/ui/parser/issue-5806.rs [new file with mode: 0644]
src/test/ui/parser/issue-6610.rs [new file with mode: 0644]
src/test/ui/parser/issue-6610.stderr [new file with mode: 0644]
src/test/ui/parser/issue-8537.rs [new file with mode: 0644]
src/test/ui/parser/issue-8537.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-abstract.rs [new file with mode: 0644]
src/test/ui/parser/keyword-abstract.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-as-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-as-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-box-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-box-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-break-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-break-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-const-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-const-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-continue-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-continue-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-else-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-else-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-enum-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-enum-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-final.rs [new file with mode: 0644]
src/test/ui/parser/keyword-final.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-fn-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-fn-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-for-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-for-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-if-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-if-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-impl-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-impl-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-in-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-in-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-let-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-let-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-loop-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-loop-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-match-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-match-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-mod-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-mod-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-move-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-move-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-mut-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-mut-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-override.rs [new file with mode: 0644]
src/test/ui/parser/keyword-override.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-pub-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-pub-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-ref-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-ref-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-return-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-return-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-static-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-static-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-struct-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-struct-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-trait-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-trait-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-try-as-identifier-edition2018.rs [new file with mode: 0644]
src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-type-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-type-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-typeof.rs [new file with mode: 0644]
src/test/ui/parser/keyword-typeof.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-unsafe-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-unsafe-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-use-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-use-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-where-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-where-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword-while-as-identifier.rs [new file with mode: 0644]
src/test/ui/parser/keyword-while-as-identifier.stderr [new file with mode: 0644]
src/test/ui/parser/keyword.rs [new file with mode: 0644]
src/test/ui/parser/keyword.stderr [new file with mode: 0644]
src/test/ui/parser/keywords-followed-by-double-colon.rs [new file with mode: 0644]
src/test/ui/parser/keywords-followed-by-double-colon.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bad-binary-literal.rs [new file with mode: 0644]
src/test/ui/parser/lex-bad-binary-literal.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-1.rs [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-1.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-2.rs [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-2.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-3.rs [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-3.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-4.rs [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-4.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-5.rs [new file with mode: 0644]
src/test/ui/parser/lex-bad-char-literals-5.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bad-numeric-literals.rs [new file with mode: 0644]
src/test/ui/parser/lex-bad-numeric-literals.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bad-octal-literal.rs [new file with mode: 0644]
src/test/ui/parser/lex-bad-octal-literal.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bad-token.rs [new file with mode: 0644]
src/test/ui/parser/lex-bad-token.stderr [new file with mode: 0644]
src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs [new file with mode: 0644]
src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr [new file with mode: 0644]
src/test/ui/parser/lex-stray-backslash.rs [new file with mode: 0644]
src/test/ui/parser/lex-stray-backslash.stderr [new file with mode: 0644]
src/test/ui/parser/lifetime-in-pattern.rs [new file with mode: 0644]
src/test/ui/parser/lifetime-in-pattern.stderr [new file with mode: 0644]
src/test/ui/parser/lifetime-semicolon.rs [new file with mode: 0644]
src/test/ui/parser/lifetime-semicolon.stderr [new file with mode: 0644]
src/test/ui/parser/macro-bad-delimiter-ident.rs [new file with mode: 0644]
src/test/ui/parser/macro-bad-delimiter-ident.stderr [new file with mode: 0644]
src/test/ui/parser/macro-doc-comments-1.rs [new file with mode: 0644]
src/test/ui/parser/macro-doc-comments-1.stderr [new file with mode: 0644]
src/test/ui/parser/macro-doc-comments-2.rs [new file with mode: 0644]
src/test/ui/parser/macro-doc-comments-2.stderr [new file with mode: 0644]
src/test/ui/parser/macro-keyword.rs [new file with mode: 0644]
src/test/ui/parser/macro-keyword.stderr [new file with mode: 0644]
src/test/ui/parser/macro-mismatched-delim-brace-paren.rs [new file with mode: 0644]
src/test/ui/parser/macro-mismatched-delim-brace-paren.stderr [new file with mode: 0644]
src/test/ui/parser/macro-mismatched-delim-paren-brace.rs [new file with mode: 0644]
src/test/ui/parser/macro-mismatched-delim-paren-brace.stderr [new file with mode: 0644]
src/test/ui/parser/macro-repeat.rs [new file with mode: 0644]
src/test/ui/parser/macro-repeat.stderr [new file with mode: 0644]
src/test/ui/parser/macros-no-semicolon-items.rs [new file with mode: 0644]
src/test/ui/parser/macros-no-semicolon-items.stderr [new file with mode: 0644]
src/test/ui/parser/macros-no-semicolon.rs [new file with mode: 0644]
src/test/ui/parser/macros-no-semicolon.stderr [new file with mode: 0644]
src/test/ui/parser/match-arrows-block-then-binop.rs [new file with mode: 0644]
src/test/ui/parser/match-arrows-block-then-binop.stderr [new file with mode: 0644]
src/test/ui/parser/match-vec-invalid.rs [new file with mode: 0644]
src/test/ui/parser/match-vec-invalid.stderr [new file with mode: 0644]
src/test/ui/parser/mod_file_not_exist.rs [new file with mode: 0644]
src/test/ui/parser/mod_file_not_exist_windows.rs [new file with mode: 0644]
src/test/ui/parser/mod_file_with_path_attr.rs [new file with mode: 0644]
src/test/ui/parser/mod_file_with_path_attr.stderr [new file with mode: 0644]
src/test/ui/parser/multiline-comment-line-tracking.rs [new file with mode: 0644]
src/test/ui/parser/multiline-comment-line-tracking.stderr [new file with mode: 0644]
src/test/ui/parser/multitrait.rs [new file with mode: 0644]
src/test/ui/parser/multitrait.stderr [new file with mode: 0644]
src/test/ui/parser/mut-patterns.rs [new file with mode: 0644]
src/test/ui/parser/mut-patterns.stderr [new file with mode: 0644]
src/test/ui/parser/new-unicode-escapes-1.rs [new file with mode: 0644]
src/test/ui/parser/new-unicode-escapes-1.stderr [new file with mode: 0644]
src/test/ui/parser/new-unicode-escapes-2.rs [new file with mode: 0644]
src/test/ui/parser/new-unicode-escapes-2.stderr [new file with mode: 0644]
src/test/ui/parser/new-unicode-escapes-3.rs [new file with mode: 0644]
src/test/ui/parser/new-unicode-escapes-3.stderr [new file with mode: 0644]
src/test/ui/parser/new-unicode-escapes-4.rs [new file with mode: 0644]
src/test/ui/parser/new-unicode-escapes-4.stderr [new file with mode: 0644]
src/test/ui/parser/no-binary-float-literal.rs [new file with mode: 0644]
src/test/ui/parser/no-binary-float-literal.stderr [new file with mode: 0644]
src/test/ui/parser/no-hex-float-literal.rs [new file with mode: 0644]
src/test/ui/parser/no-hex-float-literal.stderr [new file with mode: 0644]
src/test/ui/parser/no-unsafe-self.rs [new file with mode: 0644]
src/test/ui/parser/no-unsafe-self.stderr [new file with mode: 0644]
src/test/ui/parser/not-a-pred.rs [new file with mode: 0644]
src/test/ui/parser/not-a-pred.stderr [new file with mode: 0644]
src/test/ui/parser/omitted-arg-in-item-fn.rs [new file with mode: 0644]
src/test/ui/parser/omitted-arg-in-item-fn.stderr [new file with mode: 0644]
src/test/ui/parser/paamayim-nekudotayim.rs [new file with mode: 0644]
src/test/ui/parser/paamayim-nekudotayim.stderr [new file with mode: 0644]
src/test/ui/parser/paren-after-qualified-path-in-match.rs [new file with mode: 0644]
src/test/ui/parser/paren-after-qualified-path-in-match.stderr [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-1.rs [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-1.stderr [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-2.rs [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-2.stderr [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-3.rs [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-3.stderr [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-4.rs [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-4.stderr [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-5.rs [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-5.stderr [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-6.rs [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-6.stderr [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-7.rs [new file with mode: 0644]
src/test/ui/parser/pat-lt-bracket-7.stderr [new file with mode: 0644]
src/test/ui/parser/pat-ranges-1.rs [new file with mode: 0644]
src/test/ui/parser/pat-ranges-1.stderr [new file with mode: 0644]
src/test/ui/parser/pat-ranges-2.rs [new file with mode: 0644]
src/test/ui/parser/pat-ranges-2.stderr [new file with mode: 0644]
src/test/ui/parser/pat-ranges-3.rs [new file with mode: 0644]
src/test/ui/parser/pat-ranges-3.stderr [new file with mode: 0644]
src/test/ui/parser/pat-ranges-4.rs [new file with mode: 0644]
src/test/ui/parser/pat-ranges-4.stderr [new file with mode: 0644]
src/test/ui/parser/pat-ref-enum.rs [new file with mode: 0644]
src/test/ui/parser/pat-ref-enum.stderr [new file with mode: 0644]
src/test/ui/parser/pat-tuple-1.rs [new file with mode: 0644]
src/test/ui/parser/pat-tuple-1.stderr [new file with mode: 0644]
src/test/ui/parser/pat-tuple-2.rs [new file with mode: 0644]
src/test/ui/parser/pat-tuple-2.stderr [new file with mode: 0644]
src/test/ui/parser/pat-tuple-3.rs [new file with mode: 0644]
src/test/ui/parser/pat-tuple-3.stderr [new file with mode: 0644]
src/test/ui/parser/pat-tuple-4.rs [new file with mode: 0644]
src/test/ui/parser/pat-tuple-4.stderr [new file with mode: 0644]
src/test/ui/parser/pat-tuple-5.rs [new file with mode: 0644]
src/test/ui/parser/pat-tuple-5.stderr [new file with mode: 0644]
src/test/ui/parser/pub-item-macro.rs [new file with mode: 0644]
src/test/ui/parser/pub-item-macro.stderr [new file with mode: 0644]
src/test/ui/parser/pub-method-macro.rs [new file with mode: 0644]
src/test/ui/parser/pub-method-macro.stderr [new file with mode: 0644]
src/test/ui/parser/range-3.rs [new file with mode: 0644]
src/test/ui/parser/range-3.stderr [new file with mode: 0644]
src/test/ui/parser/range-4.rs [new file with mode: 0644]
src/test/ui/parser/range-4.stderr [new file with mode: 0644]
src/test/ui/parser/range_inclusive.rs [new file with mode: 0644]
src/test/ui/parser/range_inclusive.stderr [new file with mode: 0644]
src/test/ui/parser/range_inclusive_dotdotdot.rs [new file with mode: 0644]
src/test/ui/parser/range_inclusive_dotdotdot.stderr [new file with mode: 0644]
src/test/ui/parser/raw-byte-string-eof.rs [new file with mode: 0644]
src/test/ui/parser/raw-byte-string-eof.stderr [new file with mode: 0644]
src/test/ui/parser/raw-byte-string-literals.rs [new file with mode: 0644]
src/test/ui/parser/raw-byte-string-literals.stderr [new file with mode: 0644]
src/test/ui/parser/raw-str-delim.rs [new file with mode: 0644]
src/test/ui/parser/raw-str-delim.stderr [new file with mode: 0644]
src/test/ui/parser/raw-str-unbalanced.rs [new file with mode: 0644]
src/test/ui/parser/raw-str-unbalanced.stderr [new file with mode: 0644]
src/test/ui/parser/raw-str-unterminated.rs [new file with mode: 0644]
src/test/ui/parser/raw-str-unterminated.stderr [new file with mode: 0644]
src/test/ui/parser/recover-enum.rs [new file with mode: 0644]
src/test/ui/parser/recover-enum.stderr [new file with mode: 0644]
src/test/ui/parser/recover-enum2.rs [new file with mode: 0644]
src/test/ui/parser/recover-enum2.stderr [new file with mode: 0644]
src/test/ui/parser/recover-struct.rs [new file with mode: 0644]
src/test/ui/parser/recover-struct.stderr [new file with mode: 0644]
src/test/ui/parser/regions-out-of-scope-slice.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-closure-lifetime.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-closure-lifetime.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-enum-newtype.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-enum-newtype.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-extern-const.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-extern-const.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-field-let.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-field-let.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-field-semicolon.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-field-semicolon.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-fixed-vec.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-fixed-vec.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-fn-sigil.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-fn-sigil.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-mode.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-mode.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-mut-vec-expr.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-mut-vec-expr.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-mut-vec-ty.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-mut-vec-ty.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-ptr-lifetime.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-ptr-lifetime.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-record.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-record.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-static-fn.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-static-fn.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-uniq-mut-expr.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-uniq-mut-expr.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-uniq-mut-ty.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-with-1.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-with-1.stderr [new file with mode: 0644]
src/test/ui/parser/removed-syntax-with-2.rs [new file with mode: 0644]
src/test/ui/parser/removed-syntax-with-2.stderr [new file with mode: 0644]
src/test/ui/parser/require-parens-for-chained-comparison.rs [new file with mode: 0644]
src/test/ui/parser/require-parens-for-chained-comparison.stderr [new file with mode: 0644]
src/test/ui/parser/struct-field-numeric-shorthand.rs [new file with mode: 0644]
src/test/ui/parser/struct-field-numeric-shorthand.stderr [new file with mode: 0644]
src/test/ui/parser/struct-literal-in-for.rs [new file with mode: 0644]
src/test/ui/parser/struct-literal-in-for.stderr [new file with mode: 0644]
src/test/ui/parser/struct-literal-in-if.rs [new file with mode: 0644]
src/test/ui/parser/struct-literal-in-if.stderr [new file with mode: 0644]
src/test/ui/parser/struct-literal-in-match-discriminant.rs [new file with mode: 0644]
src/test/ui/parser/struct-literal-in-match-discriminant.stderr [new file with mode: 0644]
src/test/ui/parser/struct-literal-in-while.rs [new file with mode: 0644]
src/test/ui/parser/struct-literal-in-while.stderr [new file with mode: 0644]
src/test/ui/parser/struct-literal-restrictions-in-lamda.rs [new file with mode: 0644]
src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr [new file with mode: 0644]
src/test/ui/parser/tag-variant-disr-non-nullary.rs [new file with mode: 0644]
src/test/ui/parser/tag-variant-disr-non-nullary.stderr [new file with mode: 0644]
src/test/ui/parser/trailing-carriage-return-in-string.rs [new file with mode: 0644]
src/test/ui/parser/trailing-carriage-return-in-string.stderr [new file with mode: 0644]
src/test/ui/parser/trait-bounds-not-on-impl.rs [new file with mode: 0644]
src/test/ui/parser/trait-bounds-not-on-impl.stderr [new file with mode: 0644]
src/test/ui/parser/trait-non-item-macros.rs [new file with mode: 0644]
src/test/ui/parser/trait-non-item-macros.stderr [new file with mode: 0644]
src/test/ui/parser/trait-object-bad-parens.rs [new file with mode: 0644]
src/test/ui/parser/trait-object-bad-parens.stderr [new file with mode: 0644]
src/test/ui/parser/trait-object-lifetime-parens.rs [new file with mode: 0644]
src/test/ui/parser/trait-object-lifetime-parens.stderr [new file with mode: 0644]
src/test/ui/parser/trait-object-macro-matcher.rs [new file with mode: 0644]
src/test/ui/parser/trait-object-macro-matcher.stderr [new file with mode: 0644]
src/test/ui/parser/trait-object-polytrait-priority.rs [new file with mode: 0644]
src/test/ui/parser/trait-object-polytrait-priority.stderr [new file with mode: 0644]
src/test/ui/parser/trait-object-trait-parens.rs [new file with mode: 0644]
src/test/ui/parser/trait-object-trait-parens.stderr [new file with mode: 0644]
src/test/ui/parser/trait-plusequal-splitting.rs [new file with mode: 0644]
src/test/ui/parser/trait-plusequal-splitting.stderr [new file with mode: 0644]
src/test/ui/parser/trait-pub-assoc-const.rs [new file with mode: 0644]
src/test/ui/parser/trait-pub-assoc-const.stderr [new file with mode: 0644]
src/test/ui/parser/trait-pub-assoc-ty.rs [new file with mode: 0644]
src/test/ui/parser/trait-pub-assoc-ty.stderr [new file with mode: 0644]
src/test/ui/parser/trait-pub-method.rs [new file with mode: 0644]
src/test/ui/parser/trait-pub-method.stderr [new file with mode: 0644]
src/test/ui/parser/type-parameters-in-field-exprs.rs [new file with mode: 0644]
src/test/ui/parser/type-parameters-in-field-exprs.stderr [new file with mode: 0644]
src/test/ui/parser/unbalanced-doublequote.rs [new file with mode: 0644]
src/test/ui/parser/unbalanced-doublequote.stderr [new file with mode: 0644]
src/test/ui/parser/underscore-suffix-for-float.rs [new file with mode: 0644]
src/test/ui/parser/underscore-suffix-for-float.stderr [new file with mode: 0644]
src/test/ui/parser/underscore-suffix-for-string.rs [new file with mode: 0644]
src/test/ui/parser/underscore-suffix-for-string.stderr [new file with mode: 0644]
src/test/ui/parser/unicode-chars.rs [new file with mode: 0644]
src/test/ui/parser/unicode-chars.stderr [new file with mode: 0644]
src/test/ui/parser/unsized.rs [new file with mode: 0644]
src/test/ui/parser/unsized.stderr [new file with mode: 0644]
src/test/ui/parser/unsized2.rs [new file with mode: 0644]
src/test/ui/parser/unsized2.stderr [new file with mode: 0644]
src/test/ui/parser/use-as-where-use-ends-with-mod-sep.rs [new file with mode: 0644]
src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr [new file with mode: 0644]
src/test/ui/parser/use-ends-with-mod-sep.rs [new file with mode: 0644]
src/test/ui/parser/use-ends-with-mod-sep.stderr [new file with mode: 0644]
src/test/ui/parser/variadic-ffi-3.rs [new file with mode: 0644]
src/test/ui/parser/variadic-ffi-3.stderr [new file with mode: 0644]
src/test/ui/parser/variadic-ffi-4.rs [new file with mode: 0644]
src/test/ui/parser/variadic-ffi-4.stderr [new file with mode: 0644]
src/test/ui/parser/virtual-structs.rs [new file with mode: 0644]
src/test/ui/parser/virtual-structs.stderr [new file with mode: 0644]
src/test/ui/parser/where-clauses-no-bounds-or-predicates.rs [new file with mode: 0644]
src/test/ui/parser/where-clauses-no-bounds-or-predicates.stderr [new file with mode: 0644]
src/test/ui/parser/where_with_bound.rs [new file with mode: 0644]
src/test/ui/parser/where_with_bound.stderr [new file with mode: 0644]
src/test/ui/parser/wrong-escape-of-curly-braces.rs [new file with mode: 0644]
src/test/ui/parser/wrong-escape-of-curly-braces.stderr [new file with mode: 0644]

diff --git a/src/test/parse-fail/ascii-only-character-escape.rs b/src/test/parse-fail/ascii-only-character-escape.rs
deleted file mode 100644 (file)
index a8c4022..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn main() {
-    let x = "\x80"; //~ ERROR may only be used
-    let y = "\xff"; //~ ERROR may only be used
-    let z = "\xe2"; //~ ERROR may only be used
-    let a = b"\x00e2";  // ok because byte literal
-}
diff --git a/src/test/parse-fail/assoc-oddities-1.rs b/src/test/parse-fail/assoc-oddities-1.rs
deleted file mode 100644 (file)
index 63408b7..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn that_odd_parse() {
-    // following lines below parse and must not fail
-    x = if c { a } else { b }();
-    x = if true { 1 } else { 0 } as *mut _;
-    // however this does not parse and probably should fail to retain compat?
-    // NB: `..` here is arbitrary, failure happens/should happen ∀ops that aren’t `=`
-    // see assoc-oddities-2 and assoc-oddities-3
-    ..if c { a } else { b }[n]; //~ ERROR expected one of
-}
diff --git a/src/test/parse-fail/assoc-oddities-2.rs b/src/test/parse-fail/assoc-oddities-2.rs
deleted file mode 100644 (file)
index 5679328..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn that_odd_parse() {
-    // see assoc-oddities-1 for explanation
-    x..if c { a } else { b }[n]; //~ ERROR expected one of
-}
diff --git a/src/test/parse-fail/associated-types-project-from-hrtb-explicit.rs b/src/test/parse-fail/associated-types-project-from-hrtb-explicit.rs
deleted file mode 100644 (file)
index 70055a1..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-// Test you can't use a higher-ranked trait bound inside of a qualified
-// path (just won't parse).
-
-pub trait Foo<T> {
-    type A;
-
-    fn get(&self, t: T) -> Self::A;
-}
-
-fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
-    //~^ ERROR expected identifier, found keyword `for`
-    //~| ERROR expected one of `::` or `>`
-{
-}
-
-pub fn main() {}
diff --git a/src/test/parse-fail/attr-bad-meta-2.rs b/src/test/parse-fail/attr-bad-meta-2.rs
deleted file mode 100644 (file)
index ce640a3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[path =] //~ ERROR unexpected token: `]`
-mod m {}
diff --git a/src/test/parse-fail/attr-bad-meta-3.rs b/src/test/parse-fail/attr-bad-meta-3.rs
deleted file mode 100644 (file)
index 92e2a59..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[path() token] //~ ERROR expected `]`, found `token`
-mod m {}
diff --git a/src/test/parse-fail/attr-bad-meta.rs b/src/test/parse-fail/attr-bad-meta.rs
deleted file mode 100644 (file)
index 6f9d794..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(unrestricted_attribute_tokens)]
-
-#[path*] //~ ERROR expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`
-mod m {}
diff --git a/src/test/parse-fail/attr-before-eof.rs b/src/test/parse-fail/attr-before-eof.rs
deleted file mode 100644 (file)
index c75b0ac..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-#[derive(Debug)] //~ERROR expected item after attributes
diff --git a/src/test/parse-fail/attr-dangling-in-fn.rs b/src/test/parse-fail/attr-dangling-in-fn.rs
deleted file mode 100644 (file)
index 7b731b6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:expected statement
-
-fn f() {
-  #[foo = "bar"]
-}
-
-fn main() {
-}
diff --git a/src/test/parse-fail/attr-dangling-in-mod.rs b/src/test/parse-fail/attr-dangling-in-mod.rs
deleted file mode 100644 (file)
index 7960993..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:expected item
-
-fn main() {
-}
-
-#[foo = "bar"]
diff --git a/src/test/parse-fail/attr.rs b/src/test/parse-fail/attr.rs
deleted file mode 100644 (file)
index 1f0a958..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-#![feature(lang_items)]
-
-fn main() {}
-
-#![lang(foo)] //~ ERROR an inner attribute is not permitted in this context
-fn foo() {}
diff --git a/src/test/parse-fail/attrs-after-extern-mod.rs b/src/test/parse-fail/attrs-after-extern-mod.rs
deleted file mode 100644 (file)
index 442eb14..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Constants (static variables) can be used to match in patterns, but mutable
-// statics cannot. This ensures that there's some form of error if this is
-// attempted.
-
-extern crate libc;
-
-extern {
-    static mut rust_dbg_static_mut: libc::c_int;
-    pub fn rust_dbg_static_mut_check_four();
-    #[cfg(stage37)] //~ ERROR expected item after attributes
-}
-
-pub fn main() {}
diff --git a/src/test/parse-fail/bad-char-literals.rs b/src/test/parse-fail/bad-char-literals.rs
deleted file mode 100644 (file)
index 821015e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-// ignore-tidy-cr
-// ignore-tidy-tab
-fn main() {
-    // these literals are just silly.
-    ''';
-    //~^ ERROR: character constant must be escaped: '
-
-    // note that this is a literal "\n" byte
-    '
-';
-    //~^^ ERROR: character constant must be escaped: \n
-
-    // note that this is a literal "\r" byte
-    '\r'; //~ ERROR: character constant must be escaped: \r
-
-    // note that this is a literal tab character here
-    '  ';
-    //~^ ERROR: character constant must be escaped: \t
-}
diff --git a/src/test/parse-fail/bad-lit-suffixes.rs b/src/test/parse-fail/bad-lit-suffixes.rs
deleted file mode 100644 (file)
index 0811a64..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-
-extern
-    "C"suffix //~ ERROR ABI spec with a suffix is invalid
-    fn foo() {}
-
-extern
-    "C"suffix //~ ERROR ABI spec with a suffix is invalid
-{}
-
-fn main() {
-    ""suffix; //~ ERROR string literal with a suffix is invalid
-    b""suffix; //~ ERROR byte string literal with a suffix is invalid
-    r#""#suffix; //~ ERROR string literal with a suffix is invalid
-    br#""#suffix; //~ ERROR byte string literal with a suffix is invalid
-    'a'suffix; //~ ERROR char literal with a suffix is invalid
-    b'a'suffix; //~ ERROR byte literal with a suffix is invalid
-
-    1234u1024; //~ ERROR invalid width `1024` for integer literal
-    1234i1024; //~ ERROR invalid width `1024` for integer literal
-    1234f1024; //~ ERROR invalid width `1024` for float literal
-    1234.5f1024; //~ ERROR invalid width `1024` for float literal
-
-    1234suffix; //~ ERROR invalid suffix `suffix` for numeric literal
-    0b101suffix; //~ ERROR invalid suffix `suffix` for numeric literal
-    1.0suffix; //~ ERROR invalid suffix `suffix` for float literal
-    1.0e10suffix; //~ ERROR invalid suffix `suffix` for float literal
-}
diff --git a/src/test/parse-fail/bad-match.rs b/src/test/parse-fail/bad-match.rs
deleted file mode 100644 (file)
index b42c04f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern: expected
-
-fn main() {
-  let isize x = 5;
-  match x;
-}
-
-fn main() {
-}
diff --git a/src/test/parse-fail/bad-name.rs b/src/test/parse-fail/bad-name.rs
deleted file mode 100644 (file)
index 201e6ce..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern: expected
-
-fn main() {
-  let x.y::<isize>.z foo;
-}
diff --git a/src/test/parse-fail/bad-pointer-type.rs b/src/test/parse-fail/bad-pointer-type.rs
deleted file mode 100644 (file)
index cdb4d16..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn foo(_: *()) {
-    //~^ expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)
-}
diff --git a/src/test/parse-fail/bad-value-ident-false.rs b/src/test/parse-fail/bad-value-ident-false.rs
deleted file mode 100644 (file)
index 96325a2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn false() { } //~ ERROR expected identifier, found keyword `false`
-fn main() { }
diff --git a/src/test/parse-fail/bad-value-ident-true.rs b/src/test/parse-fail/bad-value-ident-true.rs
deleted file mode 100644 (file)
index 7ff16b8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn true() { } //~ ERROR expected identifier, found keyword `true`
-fn main() { }
diff --git a/src/test/parse-fail/better-expected.rs b/src/test/parse-fail/better-expected.rs
deleted file mode 100644 (file)
index b60201c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
-}
diff --git a/src/test/parse-fail/bind-struct-early-modifiers.rs b/src/test/parse-fail/bind-struct-early-modifiers.rs
deleted file mode 100644 (file)
index e9e76af..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    struct Foo { x: isize }
-    match (Foo { x: 10 }) {
-        Foo { ref x: ref x } => {}, //~ ERROR expected `,`
-        _ => {}
-    }
-}
diff --git a/src/test/parse-fail/bound-single-question-mark.rs b/src/test/parse-fail/bound-single-question-mark.rs
deleted file mode 100644 (file)
index 9dde526..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn f<T: ?>() {} //~ ERROR expected identifier, found `>`
diff --git a/src/test/parse-fail/bounds-lifetime-1.rs b/src/test/parse-fail/bounds-lifetime-1.rs
deleted file mode 100644 (file)
index 824d243..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type A = for<'a 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `'b`
-
-fn main() {}
diff --git a/src/test/parse-fail/bounds-lifetime-2.rs b/src/test/parse-fail/bounds-lifetime-2.rs
deleted file mode 100644 (file)
index 3c67dda..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type A = for<'a + 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `+`
-
-fn main() {}
diff --git a/src/test/parse-fail/bounds-lifetime-where-1.rs b/src/test/parse-fail/bounds-lifetime-where-1.rs
deleted file mode 100644 (file)
index aae9d72..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type A where 'a; //~ ERROR expected `:`, found `;`
-
-fn main() {}
diff --git a/src/test/parse-fail/bounds-lifetime-where.rs b/src/test/parse-fail/bounds-lifetime-where.rs
deleted file mode 100644 (file)
index 0a30818..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type A where 'a: 'b + 'c = u8; // OK
-type A where 'a: 'b, = u8; // OK
-type A where 'a: = u8; // OK
-type A where 'a:, = u8; // OK
-type A where 'a: 'b + 'c = u8; // OK
-type A where = u8; // OK
-type A where 'a: 'b + = u8; // OK
-type A where , = u8; //~ ERROR expected one of `=`, lifetime, or type, found `,`
-
-fn main() {}
diff --git a/src/test/parse-fail/bounds-lifetime.rs b/src/test/parse-fail/bounds-lifetime.rs
deleted file mode 100644 (file)
index 88db205..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type A = for<'a:> fn(); // OK
-type A = for<'a:,> fn(); // OK
-type A = for<'a> fn(); // OK
-type A = for<> fn(); // OK
-type A = for<'a: 'b + 'c> fn(); // OK (rejected later by ast_validation)
-type A = for<'a: 'b,> fn(); // OK(rejected later by ast_validation)
-type A = for<'a: 'b +> fn(); // OK (rejected later by ast_validation)
-type A = for<'a, T> fn(); // OK (rejected later by ast_validation)
-type A = for<,> fn(); //~ ERROR expected one of `>`, identifier, or lifetime, found `,`
-
-fn main() {}
diff --git a/src/test/parse-fail/bounds-type-where.rs b/src/test/parse-fail/bounds-type-where.rs
deleted file mode 100644 (file)
index 9dc5d82..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type A where for<'a> for<'b> Trait1 + ?Trait2: 'a + Trait = u8; // OK
-type A where T: Trait, = u8; // OK
-type A where T: = u8; // OK
-type A where T:, = u8; // OK
-type A where T: Trait + Trait = u8; // OK
-type A where = u8; // OK
-type A where T: Trait + = u8; // OK
-type A where T, = u8;
-//~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,`
-
-fn main() {}
diff --git a/src/test/parse-fail/bounds-type.rs b/src/test/parse-fail/bounds-type.rs
deleted file mode 100644 (file)
index 0ebe7fd..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-struct S<
-    T: 'a + Tr, // OK
-    T: Tr + 'a, // OK
-    T: 'a, // OK
-    T:, // OK
-    T: ?for<'a> Trait, // OK
-    T: Tr +, // OK
-    T: ?'a, //~ ERROR `?` may only modify trait bounds, not lifetime bounds
->;
-
-fn main() {}
diff --git a/src/test/parse-fail/brace-after-qualified-path-in-match.rs b/src/test/parse-fail/brace-after-qualified-path-in-match.rs
deleted file mode 100644 (file)
index ff434d8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn foo() {
-    match x {
-        <T as Trait>::Type{key: value} => (),
-        //~^ ERROR unexpected `{` after qualified path
-        _ => (),
-    }
-}
diff --git a/src/test/parse-fail/byte-literals.rs b/src/test/parse-fail/byte-literals.rs
deleted file mode 100644 (file)
index 3ecd778..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-
-// ignore-tidy-tab
-
-static FOO: u8 = b'\f';  //~ ERROR unknown byte escape
-
-pub fn main() {
-    b'\f';  //~ ERROR unknown byte escape
-    b'\x0Z';  //~ ERROR invalid character in numeric character escape: Z
-    b' ';  //~ ERROR byte constant must be escaped
-    b''';  //~ ERROR byte constant must be escaped
-    b'é';  //~ ERROR byte constant must be ASCII
-    b'a  //~ ERROR unterminated byte constant
-}
diff --git a/src/test/parse-fail/byte-string-literals.rs b/src/test/parse-fail/byte-string-literals.rs
deleted file mode 100644 (file)
index 4eba9e9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-
-// ignore-tidy-tab
-
-static FOO: &'static [u8] = b"\f";  //~ ERROR unknown byte escape
-
-pub fn main() {
-    b"\f";  //~ ERROR unknown byte escape
-    b"\x0Z";  //~ ERROR invalid character in numeric character escape: Z
-    b"é";  //~ ERROR byte constant must be ASCII
-    b"a  //~ ERROR unterminated double quote byte string
-}
diff --git a/src/test/parse-fail/circular_modules_hello.rs b/src/test/parse-fail/circular_modules_hello.rs
deleted file mode 100644 (file)
index 94770aa..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// ignore-test: this is an auxiliary file for circular-modules-main.rs
-
-#[path = "circular_modules_main.rs"]
-mod circular_modules_main;
-
-pub fn say_hello() {
-    println!("{}", circular_modules_main::hi_str());
-}
diff --git a/src/test/parse-fail/circular_modules_main.rs b/src/test/parse-fail/circular_modules_main.rs
deleted file mode 100644 (file)
index 861d4cd..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-#[path = "circular_modules_hello.rs"]
-mod circular_modules_hello; //~ ERROR: circular modules
-
-pub fn hi_str() -> String {
-    "Hi!".to_string()
-}
-
-fn main() {
-    circular_modules_hello::say_hello();
-}
diff --git a/src/test/parse-fail/class-implements-bad-trait.rs b/src/test/parse-fail/class-implements-bad-trait.rs
deleted file mode 100644 (file)
index ea263d9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:nonexistent
-class cat : nonexistent {
-  let meows: usize;
-  new(in_x : usize) { self.meows = in_x; }
-}
-
-fn main() {
-  let nyan = cat(0);
-}
diff --git a/src/test/parse-fail/closure-return-syntax.rs b/src/test/parse-fail/closure-return-syntax.rs
deleted file mode 100644 (file)
index 4c77ede..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Test that we cannot parse a closure with an explicit return type
-// unless it uses braces.
-
-fn main() {
-    let x = || -> i32 22;
-    //~^ ERROR expected one of `!`, `(`, `+`, `::`, `<`, or `{`, found `22`
-}
diff --git a/src/test/parse-fail/column-offset-1-based.rs b/src/test/parse-fail/column-offset-1-based.rs
deleted file mode 100644 (file)
index 8caf2e0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-# //~ ERROR 13:1: 13:2: expected `[`, found `<eof>`
diff --git a/src/test/parse-fail/default.rs b/src/test/parse-fail/default.rs
deleted file mode 100644 (file)
index 6c3bc45..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Test successful and unsuccessful parsing of the `default` contextual keyword
-
-trait Foo {
-    fn foo<T: Default>() -> T;
-}
-
-impl Foo for u8 {
-    default fn foo<T: Default>() -> T {
-        T::default()
-    }
-}
-
-impl Foo for u16 {
-    pub default fn foo<T: Default>() -> T {
-        T::default()
-    }
-}
-
-impl Foo for u32 {
-    default pub fn foo<T: Default>() -> T { T::default() } //~ ERROR expected one of
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/do-catch-suggests-try.rs b/src/test/parse-fail/do-catch-suggests-try.rs
deleted file mode 100644 (file)
index 449135e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let _: Option<()> = do catch {};
-    //~^ ERROR found removed `do catch` syntax
-    //~^^ HELP Following RFC #2388, the new non-placeholder syntax is `try`
-}
diff --git a/src/test/parse-fail/doc-after-struct-field.rs b/src/test/parse-fail/doc-after-struct-field.rs
deleted file mode 100644 (file)
index a2c6015..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z continue-parse-after-error
-
-struct X {
-    a: u8 /** document a */,
-    //~^ ERROR found a documentation comment that doesn't document anything
-    //~| HELP maybe a comment was intended
-}
-
-struct Y {
-    a: u8 /// document a
-    //~^ ERROR found a documentation comment that doesn't document anything
-    //~| HELP maybe a comment was intended
-}
-
-fn main() {
-    let x = X { a: 1 };
-    let y = Y { a: 1 };
-}
diff --git a/src/test/parse-fail/doc-before-attr.rs b/src/test/parse-fail/doc-before-attr.rs
deleted file mode 100644 (file)
index 4548ceb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-/// hi
-#[derive(Debug)] //~ERROR expected item after attributes
diff --git a/src/test/parse-fail/doc-before-eof.rs b/src/test/parse-fail/doc-before-eof.rs
deleted file mode 100644 (file)
index 728972e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-/// hi //~ERROR expected item after doc comment
diff --git a/src/test/parse-fail/doc-before-extern-rbrace.rs b/src/test/parse-fail/doc-before-extern-rbrace.rs
deleted file mode 100644 (file)
index 70da47b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-extern {
-    /// hi
-    //~^ ERROR expected item after doc comment
-}
diff --git a/src/test/parse-fail/doc-before-fn-rbrace.rs b/src/test/parse-fail/doc-before-fn-rbrace.rs
deleted file mode 100644 (file)
index bcf3261..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z continue-parse-after-error
-fn main() {
-    /// document
-    //~^ ERROR found a documentation comment that doesn't document anything
-    //~| HELP maybe a comment was intended
-}
diff --git a/src/test/parse-fail/doc-before-identifier.rs b/src/test/parse-fail/doc-before-identifier.rs
deleted file mode 100644 (file)
index 8f1fad9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z continue-parse-after-error
-fn /// document
-foo() {}
-//~^^ ERROR expected identifier, found `/// document`
-
-fn main() {
-    foo();
-}
diff --git a/src/test/parse-fail/doc-before-mod-rbrace.rs b/src/test/parse-fail/doc-before-mod-rbrace.rs
deleted file mode 100644 (file)
index d38d187..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z continue-parse-after-error
-mod Foo {
-    /// document
-    //~^ ERROR expected item after doc comment
-}
diff --git a/src/test/parse-fail/doc-before-rbrace.rs b/src/test/parse-fail/doc-before-rbrace.rs
deleted file mode 100644 (file)
index 48ea2b5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    println!("Hi"); /// hi
-    //~^ ERROR found a documentation comment that doesn't document anything
-    //~| HELP maybe a comment was intended
-}
diff --git a/src/test/parse-fail/doc-before-semi.rs b/src/test/parse-fail/doc-before-semi.rs
deleted file mode 100644 (file)
index 71104b8..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    /// hi
-    //~^ ERROR found a documentation comment that doesn't document anything
-    //~| HELP maybe a comment was intended
-    ;
-}
diff --git a/src/test/parse-fail/doc-before-struct-rbrace-1.rs b/src/test/parse-fail/doc-before-struct-rbrace-1.rs
deleted file mode 100644 (file)
index 6d9b4b0..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z continue-parse-after-error
-struct X {
-    a: u8,
-    /// document
-    //~^ ERROR found a documentation comment that doesn't document anything
-    //~| HELP maybe a comment was intended
-}
-
-fn main() {
-    let y = X {a: 1};
-}
diff --git a/src/test/parse-fail/doc-before-struct-rbrace-2.rs b/src/test/parse-fail/doc-before-struct-rbrace-2.rs
deleted file mode 100644 (file)
index 63b2f96..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z continue-parse-after-error
-struct X {
-    a: u8 /// document
-    //~^ ERROR found a documentation comment that doesn't document anything
-    //~| HELP maybe a comment was intended
-}
-
-fn main() {
-    let y = X {a: 1};
-}
diff --git a/src/test/parse-fail/duplicate-visibility.rs b/src/test/parse-fail/duplicate-visibility.rs
deleted file mode 100644 (file)
index cc3286f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:expected one of `(`, `fn`, `static`, or `type`
-extern {
-    pub pub fn foo();
-}
diff --git a/src/test/parse-fail/empty-impl-semicolon.rs b/src/test/parse-fail/empty-impl-semicolon.rs
deleted file mode 100644 (file)
index 9939f1e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`
diff --git a/src/test/parse-fail/extern-crate-unexpected-token.rs b/src/test/parse-fail/extern-crate-unexpected-token.rs
deleted file mode 100644 (file)
index 2518686..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crte foo; //~ ERROR expected one of `crate`, `fn`, or `{`, found `crte`
diff --git a/src/test/parse-fail/extern-expected-fn-or-brace.rs b/src/test/parse-fail/extern-expected-fn-or-brace.rs
deleted file mode 100644 (file)
index 21cca12..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Verifies that the expected token errors for `extern crate` are
-// raised
-
-extern "C" mod foo; //~ERROR expected one of `fn` or `{`, found `mod`
diff --git a/src/test/parse-fail/extern-foreign-crate.rs b/src/test/parse-fail/extern-foreign-crate.rs
deleted file mode 100644 (file)
index 9adbd87..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Verifies that the expected token errors for `extern crate` are
-// raised
-
-extern crate foo {} //~ERROR expected one of `;` or `as`, found `{`
diff --git a/src/test/parse-fail/extern-no-fn.rs b/src/test/parse-fail/extern-no-fn.rs
deleted file mode 100644 (file)
index aa0dbd4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-extern { //~ ERROR missing `fn`, `type`, or `static` for extern-item declaration
-    f();
-}
-
-fn main() {
-}
diff --git a/src/test/parse-fail/impl-qpath.rs b/src/test/parse-fail/impl-qpath.rs
deleted file mode 100644 (file)
index 48dd888..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-impl <*const u8>::AssocTy {} // OK
-impl <Type as Trait>::AssocTy {} // OK
-impl <'a + Trait>::AssocTy {} // OK
-impl <<Type>::AssocTy>::AssocTy {} // OK
-
-FAIL //~ ERROR
diff --git a/src/test/parse-fail/import-from-path.rs b/src/test/parse-fail/import-from-path.rs
deleted file mode 100644 (file)
index fbd59d2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:expected
-use foo::{bar}::baz
diff --git a/src/test/parse-fail/import-from-rename.rs b/src/test/parse-fail/import-from-rename.rs
deleted file mode 100644 (file)
index c4d8ba2..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:expected
-
-use foo::{bar} as baz;
-
-mod foo {
-    pub fn bar() {}
-}
-
-fn main() {
-}
diff --git a/src/test/parse-fail/import-glob-path.rs b/src/test/parse-fail/import-glob-path.rs
deleted file mode 100644 (file)
index 2faf833..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:expected
-use foo::*::bar
diff --git a/src/test/parse-fail/import-glob-rename.rs b/src/test/parse-fail/import-glob-rename.rs
deleted file mode 100644 (file)
index 7e17e1f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:expected
-
-use foo::* as baz;
-
-mod foo {
-    pub fn bar() {}
-}
-
-fn main() {
-}
diff --git a/src/test/parse-fail/inner-attr-after-doc-comment.rs b/src/test/parse-fail/inner-attr-after-doc-comment.rs
deleted file mode 100644 (file)
index ed8342d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-#![feature(lang_items)]
-/**
- * My module
- */
-
-#![recursion_limit="100"]
-//~^ ERROR an inner attribute is not permitted following an outer doc comment
-fn main() {}
diff --git a/src/test/parse-fail/inner-attr.rs b/src/test/parse-fail/inner-attr.rs
deleted file mode 100644 (file)
index 8cebda6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-#[feature(lang_items)]
-
-#![recursion_limit="100"] //~ ERROR an inner attribute is not permitted following an outer attribute
-fn main() {}
diff --git a/src/test/parse-fail/int-literal-too-large-span.rs b/src/test/parse-fail/int-literal-too-large-span.rs
deleted file mode 100644 (file)
index 1af8df7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// issue #17123
-
-fn main() {
-    9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
-    //~^ ERROR int literal is too large
-        ; // the span shouldn't point to this.
-}
diff --git a/src/test/parse-fail/issue-10392-2.rs b/src/test/parse-fail/issue-10392-2.rs
deleted file mode 100644 (file)
index 2817912..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct A { foo: isize }
-
-fn a() -> A { panic!() }
-
-fn main() {
-    let A { .., } = a(); //~ ERROR: expected `}`
-}
diff --git a/src/test/parse-fail/issue-10392.rs b/src/test/parse-fail/issue-10392.rs
deleted file mode 100644 (file)
index 9c67575..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct A { foo: isize }
-
-fn a() -> A { panic!() }
-
-fn main() {
-    let A { , } = a(); //~ ERROR: expected ident
-}
diff --git a/src/test/parse-fail/issue-14303-enum.rs b/src/test/parse-fail/issue-14303-enum.rs
deleted file mode 100644 (file)
index 6bcf588..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-enum X<'a, T, 'b> {
-//~^ ERROR lifetime parameters must be declared prior to type parameters
-    A(&'a T)
-}
diff --git a/src/test/parse-fail/issue-14303-fn-def.rs b/src/test/parse-fail/issue-14303-fn-def.rs
deleted file mode 100644 (file)
index ae8e38c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn foo<'a, T, 'b>(x: &'a T) {}
-//~^ ERROR lifetime parameters must be declared prior to type parameters
diff --git a/src/test/parse-fail/issue-14303-fncall.rs b/src/test/parse-fail/issue-14303-fncall.rs
deleted file mode 100644 (file)
index 80a9b3d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    (0..4)
-    .map(|x| x * 2)
-    .collect::<Vec<'a, usize, 'b>>()
-    //~^ ERROR lifetime parameters must be declared prior to type parameters
-}
diff --git a/src/test/parse-fail/issue-14303-impl.rs b/src/test/parse-fail/issue-14303-impl.rs
deleted file mode 100644 (file)
index f06d5f2..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct X { x: isize }
-
-impl<'a, T, 'b> X {}
-//~^ ERROR lifetime parameters must be declared prior to type parameters
diff --git a/src/test/parse-fail/issue-14303-path.rs b/src/test/parse-fail/issue-14303-path.rs
deleted file mode 100644 (file)
index f0d1fef..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
-//~^ ERROR lifetime parameters must be declared prior to type parameters
diff --git a/src/test/parse-fail/issue-14303-struct.rs b/src/test/parse-fail/issue-14303-struct.rs
deleted file mode 100644 (file)
index 5673e4f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct X<'a, T, 'b> {
-//~^ ERROR lifetime parameters must be declared prior to type parameters
-    x: &'a T
-}
diff --git a/src/test/parse-fail/issue-14303-trait.rs b/src/test/parse-fail/issue-14303-trait.rs
deleted file mode 100644 (file)
index 8af5af9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-trait Foo<'a, T, 'b> {}
-//~^ ERROR lifetime parameters must be declared prior to type parameters
diff --git a/src/test/parse-fail/issue-15914.rs b/src/test/parse-fail/issue-15914.rs
deleted file mode 100644 (file)
index 0b8f0ac..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let ref
-        (); //~ ERROR expected identifier, found `(`
-}
diff --git a/src/test/parse-fail/issue-1655.rs b/src/test/parse-fail/issue-1655.rs
deleted file mode 100644 (file)
index a044dff..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:expected `[`, found `vec`
-mod blade_runner {
-    #vec[doc(
-        brief = "Blade Runner is probably the best movie ever",
-        desc = "I like that in the world of Blade Runner it is always
-                raining, and that it's always night time. And Aliens
-                was also a really good movie.
-
-                Alien 3 was crap though."
-    )]
-}
diff --git a/src/test/parse-fail/issue-17383.rs b/src/test/parse-fail/issue-17383.rs
deleted file mode 100644 (file)
index 48f629f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-enum X {
-    A =
-        b'a' //~ ERROR discriminator values can only be used with a field-less enum
-    ,
-    B(isize)
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-17718-const-mut.rs b/src/test/parse-fail/issue-17718-const-mut.rs
deleted file mode 100644 (file)
index b450cb2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-const
-mut //~ ERROR: const globals cannot be mutable
-//~^ HELP did you mean to declare a static?
-FOO: usize = 3;
-
-fn main() {
-}
diff --git a/src/test/parse-fail/issue-17904-2.rs b/src/test/parse-fail/issue-17904-2.rs
deleted file mode 100644 (file)
index 3f41c0e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-struct Bar<T> { x: T } where T: Copy //~ ERROR expected item, found `where`
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-17904.rs b/src/test/parse-fail/issue-17904.rs
deleted file mode 100644 (file)
index a54d89f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-struct Baz<U> where U: Eq(U); //This is parsed as the new Fn* style parenthesis syntax.
-struct Baz<U> where U: Eq(U) -> R; // Notice this parses as well.
-struct Baz<U>(U) where U: Eq; // This rightfully signals no error as well.
-struct Foo<T> where T: Copy, (T); //~ ERROR expected one of `:`, `==`, or `=`, found `;`
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-1802-1.rs b/src/test/parse-fail/issue-1802-1.rs
deleted file mode 100644 (file)
index fc3d071..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:no valid digits found for number
-fn main() {
-    log(error, 0b);
-}
diff --git a/src/test/parse-fail/issue-1802-2.rs b/src/test/parse-fail/issue-1802-2.rs
deleted file mode 100644 (file)
index 05c5a4b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:no valid digits found for number
-fn main() {
-    log(error, 0b_usize);
-}
diff --git a/src/test/parse-fail/issue-19096.rs b/src/test/parse-fail/issue-19096.rs
deleted file mode 100644 (file)
index 6ba0fb5..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let t = (42, 42);
-    t.0::<isize>; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `::`
-}
diff --git a/src/test/parse-fail/issue-19398.rs b/src/test/parse-fail/issue-19398.rs
deleted file mode 100644 (file)
index a91d513..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-trait T {
-    extern "Rust" unsafe fn foo(); //~ ERROR expected `fn`, found `unsafe`
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-20711-2.rs b/src/test/parse-fail/issue-20711-2.rs
deleted file mode 100644 (file)
index d0836d4..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-// ignore-tidy-linelength
-
-struct Foo;
-
-impl Foo {
-    fn foo() {}
-
-    #[stable(feature = "rust1", since = "1.0.0")]
-} //~ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-20711.rs b/src/test/parse-fail/issue-20711.rs
deleted file mode 100644 (file)
index d944224..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-// ignore-tidy-linelength
-
-struct Foo;
-
-impl Foo {
-    #[stable(feature = "rust1", since = "1.0.0")]
-} //~ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-21153.rs b/src/test/parse-fail/issue-21153.rs
deleted file mode 100644 (file)
index b6d95ff..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-trait MyTrait<T>: Iterator { //~ ERROR missing `fn`, `type`, or `const`
-    Item = T;
-}
diff --git a/src/test/parse-fail/issue-22647.rs b/src/test/parse-fail/issue-22647.rs
deleted file mode 100644 (file)
index 1ace57e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let caller<F> = |f: F|  //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `<`
-    where F: Fn() -> i32
-    {
-        let x = f();
-        println!("Y {}",x);
-        return x;
-    };
-
-    caller(bar_handler);
-}
-
-fn bar_handler() -> i32 {
-    5
-}
diff --git a/src/test/parse-fail/issue-22712.rs b/src/test/parse-fail/issue-22712.rs
deleted file mode 100644 (file)
index ed936cd..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo<B> {
-    buffer: B
-}
-
-fn bar() {
-    let Foo<Vec<u8>>  //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `<`
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-2354-1.rs b/src/test/parse-fail/issue-2354-1.rs
deleted file mode 100644 (file)
index f24c544..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-static foo: isize = 2; } //~ ERROR unexpected close delimiter:
diff --git a/src/test/parse-fail/issue-23620-invalid-escapes.rs b/src/test/parse-fail/issue-23620-invalid-escapes.rs
deleted file mode 100644 (file)
index dfeaae4..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn main() {
-    let _ = b"\u{a66e}";
-    //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
-
-    let _ = b'\u{a66e}';
-    //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
-
-    let _ = b'\u';
-    //~^ ERROR incorrect unicode escape sequence
-    //~^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
-
-    let _ = b'\x5';
-    //~^ ERROR numeric character escape is too short
-
-    let _ = b'\xxy';
-    //~^ ERROR invalid character in numeric character escape: x
-    //~^^ ERROR invalid character in numeric character escape: y
-
-    let _ = '\x5';
-    //~^ ERROR numeric character escape is too short
-
-    let _ = '\xxy';
-    //~^ ERROR invalid character in numeric character escape: x
-    //~^^ ERROR invalid character in numeric character escape: y
-
-    let _ = b"\u{a4a4} \xf \u";
-    //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
-    //~^^ ERROR invalid character in numeric character escape:
-    //~^^^ ERROR incorrect unicode escape sequence
-    //~^^^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
-
-    let _ = "\xf \u";
-    //~^ ERROR invalid character in numeric character escape:
-    //~^^ ERROR form of character escape may only be used with characters in the range [\x00-\x7f]
-    //~^^^ ERROR incorrect unicode escape sequence
-}
diff --git a/src/test/parse-fail/issue-24197.rs b/src/test/parse-fail/issue-24197.rs
deleted file mode 100644 (file)
index 37d6218..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let buf[0] = 0; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `[`
-}
diff --git a/src/test/parse-fail/issue-24375.rs b/src/test/parse-fail/issue-24375.rs
deleted file mode 100644 (file)
index 8723423..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-static tmp : [&'static str; 2]  = ["hello", "he"];
-
-fn main() {
-    let z = "hello";
-    match z {
-        tmp[0] => {} //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `[`
-        _ => {}
-    }
-}
diff --git a/src/test/parse-fail/issue-24780.rs b/src/test/parse-fail/issue-24780.rs
deleted file mode 100644 (file)
index 6fd4ee3..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Verify that '>' is not both expected and found at the same time, as it used
-// to happen in #24780. For example, following should be an error:
-// expected one of ..., `>`, ... found `>`
-//
-// compile-flags: -Z parse-only
-
-fn foo() -> Vec<usize>> {
-    //~^ ERROR expected one of `!`, `+`, `::`, `where`, or `{`, found `>`
-    Vec::new()
-}
diff --git a/src/test/parse-fail/issue-27255.rs b/src/test/parse-fail/issue-27255.rs
deleted file mode 100644 (file)
index a751c4a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-impl A .. {} //~ ERROR
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-30318.rs b/src/test/parse-fail/issue-30318.rs
deleted file mode 100644 (file)
index 9ea0bb7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn foo() { }
-
-//! Misplaced comment...
-//~^ ERROR expected outer doc comment
-//~| NOTE inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
-
-fn main() { }
diff --git a/src/test/parse-fail/issue-3036.rs b/src/test/parse-fail/issue-3036.rs
deleted file mode 100644 (file)
index 229b121..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Testing that semicolon tokens are printed correctly in errors
-
-fn main()
-{
-    let x = 3
-} //~ ERROR: expected one of `.`, `;`, `?`, or an operator, found `}`
diff --git a/src/test/parse-fail/issue-32214.rs b/src/test/parse-fail/issue-32214.rs
deleted file mode 100644 (file)
index 9e20009..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-pub fn test<W, I: Iterator<Item=(), W> >() {}
-//~^ ERROR type parameters must be declared prior to associated type bindings
-
-fn main() { }
diff --git a/src/test/parse-fail/issue-32446.rs b/src/test/parse-fail/issue-32446.rs
deleted file mode 100644 (file)
index 90b9a4a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {}
-
-// This used to end up in an infite loop trying to bump past EOF.
-trait T { ... } //~ ERROR
diff --git a/src/test/parse-fail/issue-32501.rs b/src/test/parse-fail/issue-32501.rs
deleted file mode 100644 (file)
index 21db2f5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let a = 0;
-    let _b = 0;
-    let _ = 0;
-    let mut b = 0;
-    let mut _b = 0;
-    let mut _ = 0; //~ ERROR expected identifier, found reserved identifier `_`
-}
diff --git a/src/test/parse-fail/issue-32505.rs b/src/test/parse-fail/issue-32505.rs
deleted file mode 100644 (file)
index 246941f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-pub fn test() {
-    foo(|_|) //~ ERROR expected expression, found `)`
-}
-
-fn main() { }
diff --git a/src/test/parse-fail/issue-33262.rs b/src/test/parse-fail/issue-33262.rs
deleted file mode 100644 (file)
index d6bbfdc..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Issue #33262
-
-pub fn main() {
-    for i in 0..a as { }
-    //~^ ERROR expected type, found `{`
-}
diff --git a/src/test/parse-fail/issue-33413.rs b/src/test/parse-fail/issue-33413.rs
deleted file mode 100644 (file)
index 25ae7b4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-impl S {
-    fn f(*, a: u8) -> u8 {} //~ ERROR expected pattern, found `*`
-}
diff --git a/src/test/parse-fail/issue-33455.rs b/src/test/parse-fail/issue-33455.rs
deleted file mode 100644 (file)
index 9607033..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use foo.bar; //~ ERROR expected one of `::`, `;`, or `as`, found `.`
diff --git a/src/test/parse-fail/issue-33569.rs b/src/test/parse-fail/issue-33569.rs
deleted file mode 100644 (file)
index 15d4917..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z no-analysis
-
-macro_rules! foo {
-    { $+ } => { //~ ERROR expected identifier, found `+`
-                //~^ ERROR missing fragment specifier
-        $(x)(y) //~ ERROR expected `*` or `+`
-    }
-}
-
-foo!();
diff --git a/src/test/parse-fail/issue-37113.rs b/src/test/parse-fail/issue-37113.rs
deleted file mode 100644 (file)
index 14c6f39..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-macro_rules! test_macro {
-    ( $( $t:ty ),* $(),*) => {
-        enum SomeEnum {
-            $( $t, )* //~ ERROR expected identifier, found `String`
-        };
-    };
-}
-
-fn main() {
-    test_macro!(String,);
-}
diff --git a/src/test/parse-fail/issue-37234.rs b/src/test/parse-fail/issue-37234.rs
deleted file mode 100644 (file)
index 93a1468..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-macro_rules! failed {
-    () => {{
-        let x = 5 ""; //~ ERROR found `""`
-    }}
-}
-
-fn main() {
-    failed!();
-}
diff --git a/src/test/parse-fail/issue-43692.rs b/src/test/parse-fail/issue-43692.rs
deleted file mode 100644 (file)
index eb5d050..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    '\u{_10FFFF}'; //~ ERROR invalid start of unicode escape
-}
diff --git a/src/test/parse-fail/issue-5544-a.rs b/src/test/parse-fail/issue-5544-a.rs
deleted file mode 100644 (file)
index cf1500e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let __isize = 340282366920938463463374607431768211456; // 2^128
-    //~^ ERROR int literal is too large
-}
diff --git a/src/test/parse-fail/issue-5544-b.rs b/src/test/parse-fail/issue-5544-b.rs
deleted file mode 100644 (file)
index 8c0b674..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let __isize = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ff;
-    //~^ ERROR int literal is too large
-}
diff --git a/src/test/parse-fail/issue-5806.rs b/src/test/parse-fail/issue-5806.rs
deleted file mode 100644 (file)
index f6606a5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-windows
-// ignore-freebsd
-// ignore-openbsd
-// ignore-netbsd
-// ignore-bitrig
-
-// compile-flags: -Z parse-only
-
-#[path = "../compile-fail"]
-mod foo; //~ ERROR: a directory
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-6610.rs b/src/test/parse-fail/issue-6610.rs
deleted file mode 100644 (file)
index f5113ef..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-trait Foo { fn a() } //~ ERROR expected `;` or `{`, found `}`
-
-fn main() {}
diff --git a/src/test/parse-fail/issue-8537.rs b/src/test/parse-fail/issue-8537.rs
deleted file mode 100644 (file)
index e152a36..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-pub extern
-  "invalid-ab_isize" //~ ERROR invalid ABI
-fn foo() {}
-
-fn main() {}
diff --git a/src/test/parse-fail/keyword-abstract.rs b/src/test/parse-fail/keyword-abstract.rs
deleted file mode 100644 (file)
index 2db5a5c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let abstract = (); //~ ERROR expected pattern, found reserved keyword `abstract`
-}
diff --git a/src/test/parse-fail/keyword-as-as-identifier.rs b/src/test/parse-fail/keyword-as-as-identifier.rs
deleted file mode 100644 (file)
index c6070c4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py as'
-
-fn main() {
-    let as = "foo"; //~ error: expected pattern, found keyword `as`
-}
diff --git a/src/test/parse-fail/keyword-box-as-identifier.rs b/src/test/parse-fail/keyword-box-as-identifier.rs
deleted file mode 100644 (file)
index b5abe14..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let box = "foo"; //~ error: expected pattern, found `=`
-}
diff --git a/src/test/parse-fail/keyword-break-as-identifier.rs b/src/test/parse-fail/keyword-break-as-identifier.rs
deleted file mode 100644 (file)
index 65c775f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py break'
-
-fn main() {
-    let break = "foo"; //~ error: expected pattern, found keyword `break`
-}
diff --git a/src/test/parse-fail/keyword-const-as-identifier.rs b/src/test/parse-fail/keyword-const-as-identifier.rs
deleted file mode 100644 (file)
index 6ecf149..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py const'
-
-fn main() {
-    let const = "foo"; //~ error: expected pattern, found keyword `const`
-}
diff --git a/src/test/parse-fail/keyword-continue-as-identifier.rs b/src/test/parse-fail/keyword-continue-as-identifier.rs
deleted file mode 100644 (file)
index 87377ac..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py continue'
-
-fn main() {
-    let continue = "foo"; //~ error: expected pattern, found keyword `continue`
-}
diff --git a/src/test/parse-fail/keyword-else-as-identifier.rs b/src/test/parse-fail/keyword-else-as-identifier.rs
deleted file mode 100644 (file)
index 6878f7f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py else'
-
-fn main() {
-    let else = "foo"; //~ error: expected pattern, found keyword `else`
-}
diff --git a/src/test/parse-fail/keyword-enum-as-identifier.rs b/src/test/parse-fail/keyword-enum-as-identifier.rs
deleted file mode 100644 (file)
index 042a02d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py enum'
-
-fn main() {
-    let enum = "foo"; //~ error: expected pattern, found keyword `enum`
-}
diff --git a/src/test/parse-fail/keyword-final.rs b/src/test/parse-fail/keyword-final.rs
deleted file mode 100644 (file)
index be29a73..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let final = (); //~ ERROR expected pattern, found reserved keyword `final`
-}
diff --git a/src/test/parse-fail/keyword-fn-as-identifier.rs b/src/test/parse-fail/keyword-fn-as-identifier.rs
deleted file mode 100644 (file)
index 0d454f6..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py fn'
-
-fn main() {
-    let fn = "foo"; //~ error: expected pattern, found keyword `fn`
-}
diff --git a/src/test/parse-fail/keyword-for-as-identifier.rs b/src/test/parse-fail/keyword-for-as-identifier.rs
deleted file mode 100644 (file)
index d341669..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py for'
-
-fn main() {
-    let for = "foo"; //~ error: expected pattern, found keyword `for`
-}
diff --git a/src/test/parse-fail/keyword-if-as-identifier.rs b/src/test/parse-fail/keyword-if-as-identifier.rs
deleted file mode 100644 (file)
index 417e404..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py if'
-
-fn main() {
-    let if = "foo"; //~ error: expected pattern, found keyword `if`
-}
diff --git a/src/test/parse-fail/keyword-impl-as-identifier.rs b/src/test/parse-fail/keyword-impl-as-identifier.rs
deleted file mode 100644 (file)
index fe97c19..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py impl'
-
-fn main() {
-    let impl = "foo"; //~ error: expected pattern, found keyword `impl`
-}
diff --git a/src/test/parse-fail/keyword-in-as-identifier.rs b/src/test/parse-fail/keyword-in-as-identifier.rs
deleted file mode 100644 (file)
index c0f9396..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py in'
-
-fn main() {
-    let in = "foo"; //~ error: expected pattern, found keyword `in`
-}
diff --git a/src/test/parse-fail/keyword-let-as-identifier.rs b/src/test/parse-fail/keyword-let-as-identifier.rs
deleted file mode 100644 (file)
index 5d6dca7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py let'
-
-fn main() {
-    let let = "foo"; //~ error: expected pattern, found keyword `let`
-}
diff --git a/src/test/parse-fail/keyword-loop-as-identifier.rs b/src/test/parse-fail/keyword-loop-as-identifier.rs
deleted file mode 100644 (file)
index 7c3d11d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py loop'
-
-fn main() {
-    let loop = "foo"; //~ error: expected pattern, found keyword `loop`
-}
diff --git a/src/test/parse-fail/keyword-match-as-identifier.rs b/src/test/parse-fail/keyword-match-as-identifier.rs
deleted file mode 100644 (file)
index 7c727f4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py match'
-
-fn main() {
-    let match = "foo"; //~ error: expected pattern, found keyword `match`
-}
diff --git a/src/test/parse-fail/keyword-mod-as-identifier.rs b/src/test/parse-fail/keyword-mod-as-identifier.rs
deleted file mode 100644 (file)
index 85b4cc2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py mod'
-
-fn main() {
-    let mod = "foo"; //~ error: expected pattern, found keyword `mod`
-}
diff --git a/src/test/parse-fail/keyword-move-as-identifier.rs b/src/test/parse-fail/keyword-move-as-identifier.rs
deleted file mode 100644 (file)
index b785ac0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py move'
-
-fn main() {
-    let move = "foo"; //~ error: expected pattern, found keyword `move`
-}
diff --git a/src/test/parse-fail/keyword-mut-as-identifier.rs b/src/test/parse-fail/keyword-mut-as-identifier.rs
deleted file mode 100644 (file)
index 0aeca9b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let mut = "foo"; //~ error: expected identifier, found `=`
-}
diff --git a/src/test/parse-fail/keyword-override.rs b/src/test/parse-fail/keyword-override.rs
deleted file mode 100644 (file)
index 6033376..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let override = (); //~ ERROR expected pattern, found reserved keyword `override`
-}
diff --git a/src/test/parse-fail/keyword-pub-as-identifier.rs b/src/test/parse-fail/keyword-pub-as-identifier.rs
deleted file mode 100644 (file)
index 9233728..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py pub'
-
-fn main() {
-    let pub = "foo"; //~ error: expected pattern, found keyword `pub`
-}
diff --git a/src/test/parse-fail/keyword-ref-as-identifier.rs b/src/test/parse-fail/keyword-ref-as-identifier.rs
deleted file mode 100644 (file)
index a689c4e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let ref = "foo"; //~ error: expected identifier, found `=`
-}
diff --git a/src/test/parse-fail/keyword-return-as-identifier.rs b/src/test/parse-fail/keyword-return-as-identifier.rs
deleted file mode 100644 (file)
index bcf7f13..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py return'
-
-fn main() {
-    let return = "foo"; //~ error: expected pattern, found keyword `return`
-}
diff --git a/src/test/parse-fail/keyword-static-as-identifier.rs b/src/test/parse-fail/keyword-static-as-identifier.rs
deleted file mode 100644 (file)
index 7932622..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py static'
-
-fn main() {
-    let static = "foo"; //~ error: expected pattern, found keyword `static`
-}
diff --git a/src/test/parse-fail/keyword-struct-as-identifier.rs b/src/test/parse-fail/keyword-struct-as-identifier.rs
deleted file mode 100644 (file)
index 591bd25..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py struct'
-
-fn main() {
-    let struct = "foo"; //~ error: expected pattern, found keyword `struct`
-}
diff --git a/src/test/parse-fail/keyword-trait-as-identifier.rs b/src/test/parse-fail/keyword-trait-as-identifier.rs
deleted file mode 100644 (file)
index bdb5d26..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py trait'
-
-fn main() {
-    let trait = "foo"; //~ error: expected pattern, found keyword `trait`
-}
diff --git a/src/test/parse-fail/keyword-try-as-identifier-edition2018.rs b/src/test/parse-fail/keyword-try-as-identifier-edition2018.rs
deleted file mode 100644 (file)
index 1e4f85c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only --edition 2018
-
-fn main() {
-    let try = "foo"; //~ error: expected pattern, found reserved keyword `try`
-}
diff --git a/src/test/parse-fail/keyword-type-as-identifier.rs b/src/test/parse-fail/keyword-type-as-identifier.rs
deleted file mode 100644 (file)
index 2ba99d0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py type'
-
-fn main() {
-    let type = "foo"; //~ error: expected pattern, found keyword `type`
-}
diff --git a/src/test/parse-fail/keyword-typeof.rs b/src/test/parse-fail/keyword-typeof.rs
deleted file mode 100644 (file)
index 40e26bd..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let typeof = (); //~ ERROR expected pattern, found reserved keyword `typeof`
-}
diff --git a/src/test/parse-fail/keyword-unsafe-as-identifier.rs b/src/test/parse-fail/keyword-unsafe-as-identifier.rs
deleted file mode 100644 (file)
index a72723e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py unsafe'
-
-fn main() {
-    let unsafe = "foo"; //~ error: expected pattern, found keyword `unsafe`
-}
diff --git a/src/test/parse-fail/keyword-use-as-identifier.rs b/src/test/parse-fail/keyword-use-as-identifier.rs
deleted file mode 100644 (file)
index de74907..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py use'
-
-fn main() {
-    let use = "foo"; //~ error: expected pattern, found keyword `use`
-}
diff --git a/src/test/parse-fail/keyword-where-as-identifier.rs b/src/test/parse-fail/keyword-where-as-identifier.rs
deleted file mode 100644 (file)
index 4b7c892..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py where'
-
-fn main() {
-    let where = "foo"; //~ error: expected pattern, found keyword `where`
-}
diff --git a/src/test/parse-fail/keyword-while-as-identifier.rs b/src/test/parse-fail/keyword-while-as-identifier.rs
deleted file mode 100644 (file)
index 01793ca..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py while'
-
-fn main() {
-    let while = "foo"; //~ error: expected pattern, found keyword `while`
-}
diff --git a/src/test/parse-fail/keyword.rs b/src/test/parse-fail/keyword.rs
deleted file mode 100644 (file)
index d4ce551..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-pub mod break {
-    //~^ ERROR expected identifier, found keyword `break`
-}
diff --git a/src/test/parse-fail/keywords-followed-by-double-colon.rs b/src/test/parse-fail/keywords-followed-by-double-colon.rs
deleted file mode 100644 (file)
index 7a5b48c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    struct::foo();
-    //~^ ERROR expected identifier
-}
-fn bar() {
-    mut::baz();
-    //~^ ERROR expected expression, found keyword `mut`
-}
diff --git a/src/test/parse-fail/lex-bad-binary-literal.rs b/src/test/parse-fail/lex-bad-binary-literal.rs
deleted file mode 100644 (file)
index caacb12..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn main() {
-    0b121; //~ ERROR invalid digit for a base 2 literal
-    0b10_10301; //~ ERROR invalid digit for a base 2 literal
-    0b30; //~ ERROR invalid digit for a base 2 literal
-    0b41; //~ ERROR invalid digit for a base 2 literal
-    0b5; //~ ERROR invalid digit for a base 2 literal
-    0b6; //~ ERROR invalid digit for a base 2 literal
-    0b7; //~ ERROR invalid digit for a base 2 literal
-    0b8; //~ ERROR invalid digit for a base 2 literal
-    0b9; //~ ERROR invalid digit for a base 2 literal
-}
diff --git a/src/test/parse-fail/lex-bad-char-literals-1.rs b/src/test/parse-fail/lex-bad-char-literals-1.rs
deleted file mode 100644 (file)
index 006e3e6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-static c3: char =
-    '\x1' //~ ERROR: numeric character escape is too short
-;
-
-static s: &'static str =
-    "\x1" //~ ERROR: numeric character escape is too short
-;
-
-static c: char =
-    '\●' //~ ERROR: unknown character escape
-;
-
-static s: &'static str =
-    "\●" //~ ERROR: unknown character escape
-;
-
diff --git a/src/test/parse-fail/lex-bad-char-literals-2.rs b/src/test/parse-fail/lex-bad-char-literals-2.rs
deleted file mode 100644 (file)
index 8bd6808..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This test needs to the last one appearing in this file as it kills the parser
-static c: char =
-    'nope' //~ ERROR: character literal may only contain one codepoint: 'nope'
-;
-
diff --git a/src/test/parse-fail/lex-bad-char-literals-3.rs b/src/test/parse-fail/lex-bad-char-literals-3.rs
deleted file mode 100644 (file)
index 464e75e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// This test needs to the last one appearing in this file as it kills the parser
-static c: char =
-    '●●' //~ ERROR: character literal may only contain one codepoint
-;
diff --git a/src/test/parse-fail/lex-bad-char-literals-4.rs b/src/test/parse-fail/lex-bad-char-literals-4.rs
deleted file mode 100644 (file)
index b230e62..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-//
-// This test needs to the last one appearing in this file as it kills the parser
-static c: char =
-    '●  //~ ERROR: character literal may only contain one codepoint: '●
-;
diff --git a/src/test/parse-fail/lex-bad-char-literals-5.rs b/src/test/parse-fail/lex-bad-char-literals-5.rs
deleted file mode 100644 (file)
index aa16688..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-//
-// This test needs to the last one appearing in this file as it kills the parser
-static c: char =
-    '\x10\x10'  //~ ERROR: character literal may only contain one codepoint
-;
diff --git a/src/test/parse-fail/lex-bad-numeric-literals.rs b/src/test/parse-fail/lex-bad-numeric-literals.rs
deleted file mode 100644 (file)
index d495a8e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn main() {
-    0o1.0; //~ ERROR: octal float literal is not supported
-    0o2f32; //~ ERROR: octal float literal is not supported
-    0o3.0f32; //~ ERROR: octal float literal is not supported
-    0o4e4; //~ ERROR: octal float literal is not supported
-    0o5.0e5; //~ ERROR: octal float literal is not supported
-    0o6e6f32; //~ ERROR: octal float literal is not supported
-    0o7.0e7f64; //~ ERROR: octal float literal is not supported
-    0x8.0e+9; //~ ERROR: hexadecimal float literal is not supported
-    0x9.0e-9; //~ ERROR: hexadecimal float literal is not supported
-    0o; //~ ERROR: no valid digits
-    1e+; //~ ERROR: expected at least one digit in exponent
-    0x539.0; //~ ERROR: hexadecimal float literal is not supported
-    9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
-    9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
-    0x; //~ ERROR: no valid digits
-    0xu32; //~ ERROR: no valid digits
-    0ou32; //~ ERROR: no valid digits
-    0bu32; //~ ERROR: no valid digits
-    0b; //~ ERROR: no valid digits
-    0o123f64; //~ ERROR: octal float literal is not supported
-    0o123.456; //~ ERROR: octal float literal is not supported
-    0b101f64; //~ ERROR: binary float literal is not supported
-    0b111.101; //~ ERROR: binary float literal is not supported
-}
diff --git a/src/test/parse-fail/lex-bad-octal-literal.rs b/src/test/parse-fail/lex-bad-octal-literal.rs
deleted file mode 100644 (file)
index c8406af..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn main() {
-    0o18; //~ ERROR invalid digit for a base 8 literal
-    0o1234_9_5670;  //~ ERROR invalid digit for a base 8 literal
-}
diff --git a/src/test/parse-fail/lex-bad-token.rs b/src/test/parse-fail/lex-bad-token.rs
deleted file mode 100644 (file)
index 774b10a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-● //~ ERROR: unknown start of token
diff --git a/src/test/parse-fail/lex-bare-cr-string-literal-doc-comment.rs b/src/test/parse-fail/lex-bare-cr-string-literal-doc-comment.rs
deleted file mode 100644 (file)
index ac085d4..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-// ignore-tidy-cr
-
-/// doc comment with bare CR: '\r'
-pub fn foo() {}
-//~^^ ERROR: bare CR not allowed in doc-comment
-
-/** block doc comment with bare CR: '\r' */
-pub fn bar() {}
-//~^^ ERROR: bare CR not allowed in block doc-comment
-
-fn main() {
-    //! doc comment with bare CR: '\r'
-    //~^ ERROR: bare CR not allowed in doc-comment
-
-    /*! block doc comment with bare CR: '\r' */
-    //~^ ERROR: bare CR not allowed in block doc-comment
-
-    // the following string literal has a bare CR in it
-    let _s = "foo\rbar"; //~ ERROR: bare CR not allowed in string
-
-    // the following string literal has a bare CR in it
-    let _s = r"bar\rfoo"; //~ ERROR: bare CR not allowed in raw string
-
-    // the following string literal has a bare CR in it
-    let _s = "foo\\rbar"; //~ ERROR: unknown character escape: \r
-}
diff --git a/src/test/parse-fail/lex-stray-backslash.rs b/src/test/parse-fail/lex-stray-backslash.rs
deleted file mode 100644 (file)
index b6042bb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-\ //~ ERROR: unknown start of token: \
diff --git a/src/test/parse-fail/lifetime-in-pattern.rs b/src/test/parse-fail/lifetime-in-pattern.rs
deleted file mode 100644 (file)
index 8802497..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn test(&'a str) {
-    //~^ ERROR unexpected lifetime `'a` in pattern
-}
-
-fn main() {
-}
diff --git a/src/test/parse-fail/lifetime-semicolon.rs b/src/test/parse-fail/lifetime-semicolon.rs
deleted file mode 100644 (file)
index e197595..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct Foo<'a, 'b> {
-    a: &'a &'b i32
-}
-
-fn foo<'a, 'b>(x: &mut Foo<'a; 'b>) {}
-//~^ ERROR expected one of `,` or `>`, found `;`
diff --git a/src/test/parse-fail/macro-bad-delimiter-ident.rs b/src/test/parse-fail/macro-bad-delimiter-ident.rs
deleted file mode 100644 (file)
index 2940ade..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    foo! bar < //~ ERROR expected `(` or `{`, found `<`
-}
diff --git a/src/test/parse-fail/macro-doc-comments-1.rs b/src/test/parse-fail/macro-doc-comments-1.rs
deleted file mode 100644 (file)
index 03bcef4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-macro_rules! outer {
-    (#[$outer:meta]) => ()
-}
-
-outer! {
-    //! Inner
-} //~^ ERROR no rules expected the token `!`
-
-fn main() { }
diff --git a/src/test/parse-fail/macro-doc-comments-2.rs b/src/test/parse-fail/macro-doc-comments-2.rs
deleted file mode 100644 (file)
index a1b112c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-macro_rules! inner {
-    (#![$inner:meta]) => ()
-}
-
-inner! {
-    /// Outer
-} //~^ ERROR no rules expected the token `[`
-
-fn main() { }
diff --git a/src/test/parse-fail/macro-keyword.rs b/src/test/parse-fail/macro-keyword.rs
deleted file mode 100644 (file)
index c7dcaf4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn macro() {  //~ ERROR expected identifier, found reserved keyword `macro`
-}
-
-pub fn main() {
-}
diff --git a/src/test/parse-fail/macro-mismatched-delim-brace-paren.rs b/src/test/parse-fail/macro-mismatched-delim-brace-paren.rs
deleted file mode 100644 (file)
index 84cf900..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    foo! {
-        bar, "baz", 1, 2.0
-    ) //~ ERROR incorrect close delimiter
-}
diff --git a/src/test/parse-fail/macro-mismatched-delim-paren-brace.rs b/src/test/parse-fail/macro-mismatched-delim-paren-brace.rs
deleted file mode 100644 (file)
index cbc0ed0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    foo! (
-        bar, "baz", 1, 2.0
-    } //~ ERROR incorrect close delimiter
-} //~ ERROR unexpected close delimiter: `}`
diff --git a/src/test/parse-fail/macro-repeat.rs b/src/test/parse-fail/macro-repeat.rs
deleted file mode 100644 (file)
index 3abadd8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-macro_rules! mac {
-    ( $($v:tt)* ) => (
-        $v  //~ ERROR still repeating at this depth
-    )
-}
-
-fn main() {
-    mac!(0);
-}
diff --git a/src/test/parse-fail/macros-no-semicolon-items.rs b/src/test/parse-fail/macros-no-semicolon-items.rs
deleted file mode 100644 (file)
index faf6b4a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-macro_rules! foo()  //~ ERROR semicolon
-
-fn main() {
-}
diff --git a/src/test/parse-fail/macros-no-semicolon.rs b/src/test/parse-fail/macros-no-semicolon.rs
deleted file mode 100644 (file)
index 1c55d70..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    assert_eq!(1, 2)
-    assert_eq!(3, 4) //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `assert_eq`
-    println!("hello");
-}
diff --git a/src/test/parse-fail/match-arrows-block-then-binop.rs b/src/test/parse-fail/match-arrows-block-then-binop.rs
deleted file mode 100644 (file)
index e8cfb77..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-
-    match 0 {
-      0 => {
-      } + 5 //~ ERROR expected pattern, found `+`
-    }
-}
diff --git a/src/test/parse-fail/match-vec-invalid.rs b/src/test/parse-fail/match-vec-invalid.rs
deleted file mode 100644 (file)
index 72501ba..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let a = Vec::new();
-    match a {
-        [1, tail.., tail..] => {}, //~ ERROR: expected one of `,` or `@`, found `..`
-        _ => ()
-    }
-}
diff --git a/src/test/parse-fail/mod_file_not_exist.rs b/src/test/parse-fail/mod_file_not_exist.rs
deleted file mode 100644 (file)
index 4bc6e70..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-windows
-
-// compile-flags: -Z parse-only
-
-mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file`
-//~^ HELP name the file either not_a_real_file.rs or not_a_real_file/mod.rs inside the directory
-
-fn main() {
-    assert_eq!(mod_file_aux::bar(), 10);
-}
diff --git a/src/test/parse-fail/mod_file_not_exist_windows.rs b/src/test/parse-fail/mod_file_not_exist_windows.rs
deleted file mode 100644 (file)
index 5cf8217..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-android
-// ignore-bitrig
-// ignore-cloudabi
-// ignore-dragonfly
-// ignore-emscripten
-// ignore-freebsd
-// ignore-gnu
-// ignore-haiku
-// ignore-ios
-// ignore-linux
-// ignore-macos
-// ignore-netbsd
-// ignore-openbsd
-// ignore-solaris
-
-// compile-flags: -Z parse-only
-
-mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file`
-//~^ HELP name the file either not_a_real_file.rs or not_a_real_file\mod.rs inside the directory
-
-fn main() {
-    assert_eq!(mod_file_aux::bar(), 10);
-}
diff --git a/src/test/parse-fail/mod_file_with_path_attr.rs b/src/test/parse-fail/mod_file_with_path_attr.rs
deleted file mode 100644 (file)
index 993232e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-#[path = "not_a_real_file.rs"]
-mod m; //~ ERROR not_a_real_file.rs
-
-fn main() {
-    assert_eq!(m::foo(), 10);
-}
diff --git a/src/test/parse-fail/multiline-comment-line-tracking.rs b/src/test/parse-fail/multiline-comment-line-tracking.rs
deleted file mode 100644 (file)
index 11abe67..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// error-pattern:18:3
-
-/* 1
- * 2
- * 3
- */
-fn main() {
-  %; // parse error on line 18, but is reported on line 6 instead.
-}
diff --git a/src/test/parse-fail/multitrait.rs b/src/test/parse-fail/multitrait.rs
deleted file mode 100644 (file)
index b7c9b16..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct S {
- y: isize
-}
-
-impl Cmp, ToString for S {
-//~^ ERROR: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `,`
-  fn eq(&&other: S) { false }
-  fn to_string(&self) -> String { "hi".to_string() }
-}
diff --git a/src/test/parse-fail/mut-patterns.rs b/src/test/parse-fail/mut-patterns.rs
deleted file mode 100644 (file)
index 71d826c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Can't put mut in non-ident pattern
-
-pub fn main() {
-    struct Foo { x: isize }
-    let mut Foo { x: x } = Foo { x: 3 }; //~ ERROR: expected one of `:`, `;`, `=`, or `@`, found `{`
-}
diff --git a/src/test/parse-fail/new-unicode-escapes-1.rs b/src/test/parse-fail/new-unicode-escapes-1.rs
deleted file mode 100644 (file)
index 78a68e8..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-pub fn main() {
-    let s = "\u{2603"; //~ ERROR unterminated unicode escape (needed a `}`)
-}
diff --git a/src/test/parse-fail/new-unicode-escapes-2.rs b/src/test/parse-fail/new-unicode-escapes-2.rs
deleted file mode 100644 (file)
index cdadaef..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-pub fn main() {
-    let s = "\u{260311111111}"; //~ ERROR overlong unicode escape (must have at most 6 hex digits)
-}
diff --git a/src/test/parse-fail/new-unicode-escapes-3.rs b/src/test/parse-fail/new-unicode-escapes-3.rs
deleted file mode 100644 (file)
index 8189bf6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-pub fn main() {
-    let s1 = "\u{d805}"; //~ ERROR invalid unicode character escape
-    let s2 = "\u{ffffff}"; //~ ERROR invalid unicode character escape
-}
diff --git a/src/test/parse-fail/new-unicode-escapes-4.rs b/src/test/parse-fail/new-unicode-escapes-4.rs
deleted file mode 100644 (file)
index 8770fb3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-pub fn main() {
-    let s = "\u{lol}";
-     //~^ ERROR invalid character in unicode escape: l
-}
diff --git a/src/test/parse-fail/no-binary-float-literal.rs b/src/test/parse-fail/no-binary-float-literal.rs
deleted file mode 100644 (file)
index 528a2b1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:binary float literal is not supported
-
-fn main() {
-    0b101010f64;
-    0b101.010;
-    0b101p4f64;
-}
diff --git a/src/test/parse-fail/no-hex-float-literal.rs b/src/test/parse-fail/no-hex-float-literal.rs
deleted file mode 100644 (file)
index df40fdd..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern:hexadecimal float literal is not supported
-
-fn main() {
-    0xABC.Df;
-    0x567.89;
-    0xDEAD.BEEFp-2f;
-}
diff --git a/src/test/parse-fail/no-unsafe-self.rs b/src/test/parse-fail/no-unsafe-self.rs
deleted file mode 100644 (file)
index 22baf88..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-trait A {
-    fn foo(*mut self); //~ ERROR cannot pass `self` by raw pointer
-    fn baz(*const self); //~ ERROR cannot pass `self` by raw pointer
-    fn bar(*self); //~ ERROR cannot pass `self` by raw pointer
-}
-
-struct X;
-impl A for X {
-    fn foo(*mut self) { } //~ ERROR cannot pass `self` by raw pointer
-    fn baz(*const self) { } //~ ERROR cannot pass `self` by raw pointer
-    fn bar(*self) { } //~ ERROR cannot pass `self` by raw pointer
-}
-
-fn main() { }
diff --git a/src/test/parse-fail/not-a-pred.rs b/src/test/parse-fail/not-a-pred.rs
deleted file mode 100644 (file)
index d880c06..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// error-pattern: lt
-
-fn f(a: isize, b: isize) : lt(a, b) { }
-
-fn lt(a: isize, b: isize) { }
-
-fn main() { let a: isize = 10; let b: isize = 23; check (lt(a, b)); f(a, b); }
diff --git a/src/test/parse-fail/omitted-arg-in-item-fn.rs b/src/test/parse-fail/omitted-arg-in-item-fn.rs
deleted file mode 100644 (file)
index 388b7c8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn foo(x) { //~ ERROR expected one of `:` or `@`, found `)`
-}
diff --git a/src/test/parse-fail/paamayim-nekudotayim.rs b/src/test/parse-fail/paamayim-nekudotayim.rs
deleted file mode 100644 (file)
index 3466fc6..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// http://phpsadness.com/sad/1
-
-fn main() {
-    ::; //~ ERROR expected identifier, found `;`
-}
diff --git a/src/test/parse-fail/paren-after-qualified-path-in-match.rs b/src/test/parse-fail/paren-after-qualified-path-in-match.rs
deleted file mode 100644 (file)
index d3aa4b7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn foo() {
-    match x {
-        <T as Trait>::Type(2) => (),
-        //~^ ERROR unexpected `(` after qualified path
-        _ => (),
-    }
-}
diff --git a/src/test/parse-fail/pat-lt-bracket-1.rs b/src/test/parse-fail/pat-lt-bracket-1.rs
deleted file mode 100644 (file)
index 6d3d120..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-  match 42 {
-    x < 7 => (),
-   //~^ error: expected one of `=>`, `@`, `if`, or `|`, found `<`
-    _ => ()
-  }
-}
diff --git a/src/test/parse-fail/pat-lt-bracket-2.rs b/src/test/parse-fail/pat-lt-bracket-2.rs
deleted file mode 100644 (file)
index 6a06530..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn a(B<) {}
-   //~^ error: expected one of `:` or `@`, found `<`
diff --git a/src/test/parse-fail/pat-lt-bracket-3.rs b/src/test/parse-fail/pat-lt-bracket-3.rs
deleted file mode 100644 (file)
index 8ea2bcf..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo<T>(T, T);
-
-impl<T> Foo<T> {
-    fn foo(&self) {
-        match *self {
-            Foo<T>(x, y) => {
-            //~^ error: expected one of `=>`, `@`, `if`, or `|`, found `<`
-              println!("Goodbye, World!")
-            }
-        }
-    }
-}
diff --git a/src/test/parse-fail/pat-lt-bracket-4.rs b/src/test/parse-fail/pat-lt-bracket-4.rs
deleted file mode 100644 (file)
index a163b38..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-enum BtNode {
-    Node(u32,Box<BtNode>,Box<BtNode>),
-    Leaf(u32),
-}
-
-fn main() {
-    let y = match x {
-        Foo<T>::A(value) => value, //~ error: expected one of `=>`, `@`, `if`, or `|`, found `<`
-        Foo<T>::B => 7,
-    };
-}
diff --git a/src/test/parse-fail/pat-lt-bracket-5.rs b/src/test/parse-fail/pat-lt-bracket-5.rs
deleted file mode 100644 (file)
index 421d7a0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let v[0] = v[1]; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `[`
-}
diff --git a/src/test/parse-fail/pat-lt-bracket-6.rs b/src/test/parse-fail/pat-lt-bracket-6.rs
deleted file mode 100644 (file)
index fb78e55..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let Test(&desc[..]) = x; //~ ERROR: expected one of `)`, `,`, or `@`, found `[`
-}
diff --git a/src/test/parse-fail/pat-lt-bracket-7.rs b/src/test/parse-fail/pat-lt-bracket-7.rs
deleted file mode 100644 (file)
index d75589d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    for thing(x[]) in foo {} //~ ERROR: expected one of `)`, `,`, or `@`, found `[`
-}
diff --git a/src/test/parse-fail/pat-ranges-1.rs b/src/test/parse-fail/pat-ranges-1.rs
deleted file mode 100644 (file)
index 857a392..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Parsing of range patterns
-
-fn main() {
-    let macropus!() ..= 11 = 12; //~ error: expected one of `:`, `;`, or `=`, found `..=`
-}
diff --git a/src/test/parse-fail/pat-ranges-2.rs b/src/test/parse-fail/pat-ranges-2.rs
deleted file mode 100644 (file)
index 64c7493..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Parsing of range patterns
-
-fn main() {
-    let 10 ..= makropulos!() = 12; //~ error: expected one of `::`, `:`, `;`, or `=`, found `!`
-}
diff --git a/src/test/parse-fail/pat-ranges-3.rs b/src/test/parse-fail/pat-ranges-3.rs
deleted file mode 100644 (file)
index 1327a9f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Parsing of range patterns
-
-fn main() {
-    let 10 ..= 10 + 3 = 12; //~ expected one of `:`, `;`, or `=`, found `+`
-}
diff --git a/src/test/parse-fail/pat-ranges-4.rs b/src/test/parse-fail/pat-ranges-4.rs
deleted file mode 100644 (file)
index c159c77..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Parsing of range patterns
-
-fn main() {
-    let 10 - 3 ..= 10 = 8;
-    //~^ error: expected one of `...`, `..=`, `..`, `:`, `;`, or `=`, found `-`
-}
diff --git a/src/test/parse-fail/pat-ref-enum.rs b/src/test/parse-fail/pat-ref-enum.rs
deleted file mode 100644 (file)
index cf80257..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn matcher(x: Option<isize>) {
-    match x {
-      ref Some(i) => {} //~ ERROR expected identifier, found enum pattern
-      None => {}
-    }
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/pat-tuple-1.rs b/src/test/parse-fail/pat-tuple-1.rs
deleted file mode 100644 (file)
index 945d074..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    match 0 {
-        (, ..) => {} //~ ERROR expected pattern, found `,`
-    }
-}
diff --git a/src/test/parse-fail/pat-tuple-2.rs b/src/test/parse-fail/pat-tuple-2.rs
deleted file mode 100644 (file)
index 07b391d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    match 0 {
-        (pat, ..,) => {} //~ ERROR trailing comma is not permitted after `..`
-    }
-}
diff --git a/src/test/parse-fail/pat-tuple-3.rs b/src/test/parse-fail/pat-tuple-3.rs
deleted file mode 100644 (file)
index 029dc7a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    match 0 {
-        (.., pat, ..) => {} //~ ERROR `..` can only be used once per tuple or tuple struct pattern
-    }
-}
diff --git a/src/test/parse-fail/pat-tuple-4.rs b/src/test/parse-fail/pat-tuple-4.rs
deleted file mode 100644 (file)
index f4c3afa..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    match 0 {
-        (.. pat) => {} //~ ERROR expected one of `)` or `,`, found `pat`
-    }
-}
diff --git a/src/test/parse-fail/pat-tuple-5.rs b/src/test/parse-fail/pat-tuple-5.rs
deleted file mode 100644 (file)
index d528b97..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    match 0 {
-        (pat ..) => {} //~ ERROR unexpected token: `)`
-    }
-}
diff --git a/src/test/parse-fail/pub-item-macro.rs b/src/test/parse-fail/pub-item-macro.rs
deleted file mode 100644 (file)
index 8809e9a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Issue #14660
-
-macro_rules! priv_x { () => {
-    static x: u32 = 0;
-}}
-
-macro_rules! pub_x { () => {
-    pub priv_x!(); //~ ERROR can't qualify macro invocation with `pub`
-    //~^ HELP try adjusting the macro to put `pub` inside the invocation
-}}
-
-mod foo {
-    pub_x!();
-}
-
-fn main() {
-    let y: u32 = foo::x;
-}
diff --git a/src/test/parse-fail/pub-method-macro.rs b/src/test/parse-fail/pub-method-macro.rs
deleted file mode 100644 (file)
index 83db24b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Issue #18317
-
-mod bleh {
-    macro_rules! defn {
-        ($n:ident) => (
-            fn $n (&self) -> i32 {
-                println!("{}", stringify!($n));
-                1
-            }
-        )
-    }
-
-    #[derive(Copy, Clone)]
-    pub struct S;
-
-    impl S {
-        pub defn!(f); //~ ERROR can't qualify macro invocation with `pub`
-        //~^ HELP try adjusting the macro to put `pub` inside the invocation
-    }
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/range-3.rs b/src/test/parse-fail/range-3.rs
deleted file mode 100644 (file)
index 95aa71b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Test range syntax - syntax errors.
-
-pub fn main() {
-    let r = 1..2..3;
-    //~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..`
-}
diff --git a/src/test/parse-fail/range-4.rs b/src/test/parse-fail/range-4.rs
deleted file mode 100644 (file)
index 4500df1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Test range syntax - syntax errors.
-
-pub fn main() {
-    let r = ..1..2;
-    //~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..`
-}
diff --git a/src/test/parse-fail/range_inclusive.rs b/src/test/parse-fail/range_inclusive.rs
deleted file mode 100644 (file)
index 2aa7d6d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Make sure that inclusive ranges with no end point don't parse.
-
-pub fn main() {
-    for _ in 1..= {} //~ERROR inclusive range with no end
-                     //~^HELP bounded at the end
-}
-
diff --git a/src/test/parse-fail/range_inclusive_dotdotdot.rs b/src/test/parse-fail/range_inclusive_dotdotdot.rs
deleted file mode 100644 (file)
index 34b96a5..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-// Make sure that inclusive ranges with `...` syntax don't parse.
-
-use std::ops::RangeToInclusive;
-
-fn return_range_to() -> RangeToInclusive<i32> {
-    return ...1; //~ERROR unexpected token: `...`
-                 //~^HELP  use `..` for an exclusive range
-                 //~^^HELP or `..=` for an inclusive range
-}
-
-pub fn main() {
-    let x = ...0;    //~ERROR unexpected token: `...`
-                     //~^HELP  use `..` for an exclusive range
-                     //~^^HELP or `..=` for an inclusive range
-
-    let x = 5...5;   //~ERROR unexpected token: `...`
-                     //~^HELP  use `..` for an exclusive range
-                     //~^^HELP or `..=` for an inclusive range
-
-    for _ in 0...1 {} //~ERROR unexpected token: `...`
-                     //~^HELP  use `..` for an exclusive range
-                     //~^^HELP or `..=` for an inclusive range
-}
diff --git a/src/test/parse-fail/raw-byte-string-eof.rs b/src/test/parse-fail/raw-byte-string-eof.rs
deleted file mode 100644 (file)
index 4b8bb31..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-
-pub fn main() {
-    br##"a"#;  //~ unterminated raw string
-}
diff --git a/src/test/parse-fail/raw-byte-string-literals.rs b/src/test/parse-fail/raw-byte-string-literals.rs
deleted file mode 100644 (file)
index 2e33f98..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-
-pub fn main() {
-    br"é";  //~ ERROR raw byte string must be ASCII
-    br##~"a"~##;  //~ ERROR only `#` is allowed in raw string delimitation
-}
diff --git a/src/test/parse-fail/raw-str-delim.rs b/src/test/parse-fail/raw-str-delim.rs
deleted file mode 100644 (file)
index 8c00272..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-static s: &'static str =
-    r#~"#"~# //~ ERROR found invalid character; only `#` is allowed in raw string delimitation
-;
diff --git a/src/test/parse-fail/raw-str-unbalanced.rs b/src/test/parse-fail/raw-str-unbalanced.rs
deleted file mode 100644 (file)
index 5c09f68..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-static s: &'static str =
-    r#"
-      "## //~ ERROR expected one of `.`, `;`, `?`, or an operator, found `#`
-;
diff --git a/src/test/parse-fail/raw-str-unterminated.rs b/src/test/parse-fail/raw-str-unterminated.rs
deleted file mode 100644 (file)
index c37239a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-static s: &'static str =
-    r#" string literal goes on
-        and on
-    //~^^ ERROR unterminated raw string
diff --git a/src/test/parse-fail/recover-enum.rs b/src/test/parse-fail/recover-enum.rs
deleted file mode 100644 (file)
index 7de3ed1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn main() {
-    enum Test {
-        Very
-        Bad //~ ERROR found `Bad`
-        Stuff
-    }
-}
diff --git a/src/test/parse-fail/recover-enum2.rs b/src/test/parse-fail/recover-enum2.rs
deleted file mode 100644 (file)
index 6fd32f8..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn main() {
-    enum Test {
-        Var1,
-        Var2(String),
-        Var3 {
-            abc: {}, //~ ERROR: expected type, found `{`
-        },
-    }
-
-    // recover...
-    let a = 1;
-    enum Test2 {
-        Fine,
-    }
-
-    enum Test3 {
-        StillFine {
-            def: i32,
-        },
-    }
-
-    {
-        // fail again
-        enum Test4 {
-            Nope(i32 {}) //~ ERROR: found `{`
-                         //~^ ERROR: found `{`
-        }
-    }
-    // still recover later
-    let bad_syntax = _; //~ ERROR: expected expression, found reserved identifier `_`
-}
diff --git a/src/test/parse-fail/recover-struct.rs b/src/test/parse-fail/recover-struct.rs
deleted file mode 100644 (file)
index 535dd52..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn main() {
-    struct Test {
-        Very
-        Bad //~ ERROR found `Bad`
-        Stuff
-    }
-}
diff --git a/src/test/parse-fail/regions-out-of-scope-slice.rs b/src/test/parse-fail/regions-out-of-scope-slice.rs
deleted file mode 100644 (file)
index c4601b4..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// ignore-test blk region isn't supported in the front-end
-
-fn foo(cond: bool) {
-    // Here we will infer a type that uses the
-    // region of the if stmt then block, but in the scope:
-    let mut x; //~ ERROR foo
-
-    if cond {
-        x = &'blk [1,2,3];
-    }
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/removed-syntax-closure-lifetime.rs b/src/test/parse-fail/removed-syntax-closure-lifetime.rs
deleted file mode 100644 (file)
index b305b18..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type closure = Box<lt/fn()>;
-//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `/`
diff --git a/src/test/parse-fail/removed-syntax-enum-newtype.rs b/src/test/parse-fail/removed-syntax-enum-newtype.rs
deleted file mode 100644 (file)
index 6a7f706..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-enum e = isize; //~ ERROR expected one of `<`, `where`, or `{`, found `=`
diff --git a/src/test/parse-fail/removed-syntax-extern-const.rs b/src/test/parse-fail/removed-syntax-extern-const.rs
deleted file mode 100644 (file)
index 2768886..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-extern {
-    const i: isize;
-    //~^ ERROR extern items cannot be `const`
-}
diff --git a/src/test/parse-fail/removed-syntax-field-let.rs b/src/test/parse-fail/removed-syntax-field-let.rs
deleted file mode 100644 (file)
index 6deb3bb..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-struct s {
-    let foo: (),
-    //~^  ERROR expected identifier, found keyword `let`
-    //~^^ ERROR expected `:`, found `foo`
-}
diff --git a/src/test/parse-fail/removed-syntax-field-semicolon.rs b/src/test/parse-fail/removed-syntax-field-semicolon.rs
deleted file mode 100644 (file)
index 409b950..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct s {
-    bar: ();
-    //~^ ERROR expected `,`, or `}`, found `;`
-}
diff --git a/src/test/parse-fail/removed-syntax-fixed-vec.rs b/src/test/parse-fail/removed-syntax-fixed-vec.rs
deleted file mode 100644 (file)
index 0f34db0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*`
diff --git a/src/test/parse-fail/removed-syntax-fn-sigil.rs b/src/test/parse-fail/removed-syntax-fn-sigil.rs
deleted file mode 100644 (file)
index f47ad01..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn f() {
-    let x: fn~() = || (); //~ ERROR expected `(`, found `~`
-}
diff --git a/src/test/parse-fail/removed-syntax-mode.rs b/src/test/parse-fail/removed-syntax-mode.rs
deleted file mode 100644 (file)
index 6e99f8b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn f(+x: isize) {} //~ ERROR expected pattern, found `+`
diff --git a/src/test/parse-fail/removed-syntax-mut-vec-expr.rs b/src/test/parse-fail/removed-syntax-mut-vec-expr.rs
deleted file mode 100644 (file)
index 7e5bd27..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn f() {
-    let v = [mut 1, 2, 3, 4]; //~ ERROR expected expression, found keyword `mut`
-}
diff --git a/src/test/parse-fail/removed-syntax-mut-vec-ty.rs b/src/test/parse-fail/removed-syntax-mut-vec-ty.rs
deleted file mode 100644 (file)
index 0cdf198..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type v = [mut isize]; //~ ERROR expected type, found keyword `mut`
diff --git a/src/test/parse-fail/removed-syntax-ptr-lifetime.rs b/src/test/parse-fail/removed-syntax-ptr-lifetime.rs
deleted file mode 100644 (file)
index b91ab87..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, `;`, or `<`, found `/`
diff --git a/src/test/parse-fail/removed-syntax-record.rs b/src/test/parse-fail/removed-syntax-record.rs
deleted file mode 100644 (file)
index fd6f99b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type t = { f: () }; //~ ERROR expected type, found `{`
diff --git a/src/test/parse-fail/removed-syntax-static-fn.rs b/src/test/parse-fail/removed-syntax-static-fn.rs
deleted file mode 100644 (file)
index 4c0cd33..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-// ignore-tidy-linelength
-
-struct S;
-
-impl S {
-    static fn f() {}
-}
-//~^^ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`,
diff --git a/src/test/parse-fail/removed-syntax-uniq-mut-expr.rs b/src/test/parse-fail/removed-syntax-uniq-mut-expr.rs
deleted file mode 100644 (file)
index b16c77a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn f() {
-    let a_box = box mut 42; //~ ERROR expected expression, found keyword `mut`
-}
diff --git a/src/test/parse-fail/removed-syntax-uniq-mut-ty.rs b/src/test/parse-fail/removed-syntax-uniq-mut-ty.rs
deleted file mode 100644 (file)
index 8a47376..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type mut_box = Box<mut isize>; //~ ERROR expected one of `>`, lifetime, or type, found `mut`
diff --git a/src/test/parse-fail/removed-syntax-with-1.rs b/src/test/parse-fail/removed-syntax-with-1.rs
deleted file mode 100644 (file)
index 156b172..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn removed_with() {
-    struct S {
-        foo: (),
-        bar: (),
-    }
-
-    let a = S { foo: (), bar: () };
-    let b = S { foo: () with a };
-    //~^ ERROR expected one of `,`, `.`, `?`, `}`, or an operator, found `with`
-}
diff --git a/src/test/parse-fail/removed-syntax-with-2.rs b/src/test/parse-fail/removed-syntax-with-2.rs
deleted file mode 100644 (file)
index c4354c0..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn removed_with() {
-    struct S {
-        foo: (),
-        bar: (),
-    }
-
-    let a = S { foo: (), bar: () };
-    let b = S { foo: (), with a };
-    //~^ ERROR expected one of `,` or `}`, found `a`
-}
diff --git a/src/test/parse-fail/require-parens-for-chained-comparison.rs b/src/test/parse-fail/require-parens-for-chained-comparison.rs
deleted file mode 100644 (file)
index 1ee6996..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn f<T>() {}
-
-fn main() {
-    false == false == false;
-    //~^ ERROR: chained comparison operators require parentheses
-
-    false == 0 < 2;
-    //~^ ERROR: chained comparison operators require parentheses
-
-    f<X>();
-    //~^ ERROR: chained comparison operators require parentheses
-    //~| HELP: use `::<...>` instead of `<...>`
-    //~| HELP: or use `(...)`
-}
diff --git a/src/test/parse-fail/struct-field-numeric-shorthand.rs b/src/test/parse-fail/struct-field-numeric-shorthand.rs
deleted file mode 100644 (file)
index 49ba0d8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct Rgb(u8, u8, u8);
-
-fn main() {
-    let _ = Rgb { 0, 1, 2 }; //~ ERROR expected identifier, found `0`
-}
diff --git a/src/test/parse-fail/struct-literal-in-for.rs b/src/test/parse-fail/struct-literal-in-for.rs
deleted file mode 100644 (file)
index 9309845..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct Foo {
-    x: isize,
-}
-
-impl Foo {
-    fn hi(&self) -> bool {
-        true
-    }
-}
-
-fn main() {
-    for x in Foo {
-        x: 3    //~ ERROR expected type, found `3`
-    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
-        println!("yo");
-    }
-}
diff --git a/src/test/parse-fail/struct-literal-in-if.rs b/src/test/parse-fail/struct-literal-in-if.rs
deleted file mode 100644 (file)
index db6a360..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct Foo {
-    x: isize,
-}
-
-impl Foo {
-    fn hi(&self) -> bool {
-        true
-    }
-}
-
-fn main() {
-    if Foo {
-        x: 3    //~ ERROR expected type, found `3`
-    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
-        println!("yo");
-    }
-}
diff --git a/src/test/parse-fail/struct-literal-in-match-discriminant.rs b/src/test/parse-fail/struct-literal-in-match-discriminant.rs
deleted file mode 100644 (file)
index 7038cc7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct Foo {
-    x: isize,
-}
-
-fn main() {
-    match Foo {
-        x: 3    //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `:`
-    } {
-        Foo {
-            x: x
-        } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
-    }
-}
diff --git a/src/test/parse-fail/struct-literal-in-while.rs b/src/test/parse-fail/struct-literal-in-while.rs
deleted file mode 100644 (file)
index 75e4eb3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct Foo {
-    x: isize,
-}
-
-impl Foo {
-    fn hi(&self) -> bool {
-        true
-    }
-}
-
-fn main() {
-    while Foo {
-        x: 3    //~ ERROR expected type, found `3`
-    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
-        println!("yo");
-    }
-}
diff --git a/src/test/parse-fail/struct-literal-restrictions-in-lamda.rs b/src/test/parse-fail/struct-literal-restrictions-in-lamda.rs
deleted file mode 100644 (file)
index 6b7a265..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct Foo {
-    x: isize,
-}
-
-impl Foo {
-    fn hi(&self) -> bool {
-        true
-    }
-}
-
-fn main() {
-    while || Foo {
-        x: 3    //~ ERROR expected type, found `3`
-    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
-        println!("yo");
-    }
-}
diff --git a/src/test/parse-fail/tag-variant-disr-non-nullary.rs b/src/test/parse-fail/tag-variant-disr-non-nullary.rs
deleted file mode 100644 (file)
index 2d86589..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-//error-pattern: discriminator values can only be used with a field-less enum
-
-enum color {
-    red = 0xff0000,
-    green = 0x00ff00,
-    blue = 0x0000ff,
-    black = 0x000000,
-    white = 0xffffff,
-    other (str),
-}
diff --git a/src/test/parse-fail/trailing-carriage-return-in-string.rs b/src/test/parse-fail/trailing-carriage-return-in-string.rs
deleted file mode 100644 (file)
index dd763dc..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// ignore-tidy-cr
-// Issue #11669
-
-fn main() {
-    // \r\n
-    let ok = "This is \
- a test";
-    // \r only
-    let bad = "This is \\r a test";
-    //~^ ERROR unknown character escape: \r
-    //~^^ HELP this is an isolated carriage return
-
-}
diff --git a/src/test/parse-fail/trait-bounds-not-on-impl.rs b/src/test/parse-fail/trait-bounds-not-on-impl.rs
deleted file mode 100644 (file)
index 7cd2774..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-trait Foo {
-}
-
-struct Bar;
-
-impl Foo + Owned for Bar { //~ ERROR expected a trait, found type
-}
-
-fn main() { }
diff --git a/src/test/parse-fail/trait-non-item-macros.rs b/src/test/parse-fail/trait-non-item-macros.rs
deleted file mode 100644 (file)
index 9f94d5d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-macro_rules! bah {
-    ($a:expr) => ($a)
-    //~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, or `unsafe`, found `2`
-}
-
-trait bar {
-    bah!(2);
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/trait-object-bad-parens.rs b/src/test/parse-fail/trait-object-bad-parens.rs
deleted file mode 100644 (file)
index 25e9c30..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn main() {
-    let _: Box<((Copy)) + Copy>;
-    //~^ ERROR expected a path on the left-hand side of `+`, not `((Copy))`
-    let _: Box<(Copy + Copy) + Copy>;
-    //~^ ERROR expected a path on the left-hand side of `+`, not `(Copy + Copy)`
-    let _: Box<(Copy +) + Copy>;
-    //~^ ERROR expected a path on the left-hand side of `+`, not `(Copy)`
-    let _: Box<(dyn Copy) + Copy>;
-    //~^ ERROR expected a path on the left-hand side of `+`, not `(dyn Copy)`
-}
diff --git a/src/test/parse-fail/trait-object-lifetime-parens.rs b/src/test/parse-fail/trait-object-lifetime-parens.rs
deleted file mode 100644 (file)
index 6be62d9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-fn f<T: Copy + ('a)>() {} //~ ERROR parenthesized lifetime bounds are not supported
-
-fn main() {
-    let _: Box<Copy + ('a)>; //~ ERROR parenthesized lifetime bounds are not supported
-    let _: Box<('a) + Copy>; //~ ERROR expected type, found `'a`
-}
diff --git a/src/test/parse-fail/trait-object-macro-matcher.rs b/src/test/parse-fail/trait-object-macro-matcher.rs
deleted file mode 100644 (file)
index 3a5bce5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// A single lifetime is not parsed as a type.
-// `ty` matcher in particular doesn't accept a single lifetime
-
-macro_rules! m {
-    ($t: ty) => ( let _: $t; )
-}
-
-fn main() {
-    m!('static); //~ ERROR expected type, found `'static`
-}
diff --git a/src/test/parse-fail/trait-object-polytrait-priority.rs b/src/test/parse-fail/trait-object-polytrait-priority.rs
deleted file mode 100644 (file)
index b5fc06d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Trait<'a> {}
-
-fn main() {
-    let _: &for<'a> Trait<'a> + 'static;
-    //~^ ERROR expected a path on the left-hand side of `+`, not `&for<'a> Trait<'a>`
-    //~| HELP try adding parentheses
-    //~| SUGGESTION &(for<'a> Trait<'a> + 'static)
-}
diff --git a/src/test/parse-fail/trait-object-trait-parens.rs b/src/test/parse-fail/trait-object-trait-parens.rs
deleted file mode 100644 (file)
index dc44f4f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {}
-
-fn main() {
-    let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
-    let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
-    let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
-}
-
-FAIL //~ ERROR
diff --git a/src/test/parse-fail/trait-plusequal-splitting.rs b/src/test/parse-fail/trait-plusequal-splitting.rs
deleted file mode 100644 (file)
index cbb955f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-// Fixes issue where `+` in generics weren't parsed if they were part of a `+=`.
-
-struct Whitespace<T: Clone + = ()> { t: T }
-struct TokenSplit<T: Clone +=  ()> { t: T }
-
-fn main() {
-}
-
-FAIL //~ ERROR
diff --git a/src/test/parse-fail/trait-pub-assoc-const.rs b/src/test/parse-fail/trait-pub-assoc-const.rs
deleted file mode 100644 (file)
index cce6b5c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    pub const Foo: u32;
-    //~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/trait-pub-assoc-ty.rs b/src/test/parse-fail/trait-pub-assoc-ty.rs
deleted file mode 100644 (file)
index d6a4e5e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    pub type Foo;
-    //~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/trait-pub-method.rs b/src/test/parse-fail/trait-pub-method.rs
deleted file mode 100644 (file)
index 286cb4d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {
-    pub fn foo();
-    //~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/type-parameters-in-field-exprs.rs b/src/test/parse-fail/type-parameters-in-field-exprs.rs
deleted file mode 100644 (file)
index cb018ff..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-struct Foo {
-    x: isize,
-    y: isize,
-}
-
-fn main() {
-    let f = Foo {
-        x: 1,
-        y: 2,
-    };
-    f.x::<isize>;
-    //~^ ERROR field expressions may not have generic arguments
-    f.x::<>;
-    //~^ ERROR field expressions may not have generic arguments
-    f.x::();
-    //~^ ERROR field expressions may not have generic arguments
-}
diff --git a/src/test/parse-fail/unbalanced-doublequote.rs b/src/test/parse-fail/unbalanced-doublequote.rs
deleted file mode 100644 (file)
index 8d10f64..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-
-// error-pattern: unterminated double quote string
-
-
-fn main() {
-    "
-}
diff --git a/src/test/parse-fail/underscore-suffix-for-float.rs b/src/test/parse-fail/underscore-suffix-for-float.rs
deleted file mode 100644 (file)
index 8327217..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let a = 42._; //~ ERROR expected identifier, found reserved identifier `_`
-                  //~^ ERROR `{integer}` is a primitive type and therefore doesn't have fields
-}
diff --git a/src/test/parse-fail/underscore-suffix-for-string.rs b/src/test/parse-fail/underscore-suffix-for-string.rs
deleted file mode 100644 (file)
index 05de5f8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let _ = "Foo"_;
-    //~^ WARNING underscore literal suffix is not allowed
-    //~| WARNING this was previously accepted
-    //~| NOTE issue #42326
-}
-
-FAIL
-//~^ ERROR
-//~| NOTE
diff --git a/src/test/parse-fail/unicode-chars.rs b/src/test/parse-fail/unicode-chars.rs
deleted file mode 100644 (file)
index f590a7f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let y = 0;
-    //~^ ERROR unknown start of token: \u{37e}
-    //~^^ HELP Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not
-}
diff --git a/src/test/parse-fail/unsized.rs b/src/test/parse-fail/unsized.rs
deleted file mode 100644 (file)
index 1bcb520..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Test syntax checks for `type` keyword.
-
-struct S1 for type; //~ ERROR expected `where`, `{`, `(`, or `;` after struct name, found `for`
-
-pub fn main() {
-}
diff --git a/src/test/parse-fail/unsized2.rs b/src/test/parse-fail/unsized2.rs
deleted file mode 100644 (file)
index f3af874..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Test syntax checks for `type` keyword.
-
-fn f<X>() {}
-
-pub fn main() {
-    f<type>(); //~ ERROR expected expression, found keyword `type`
-}
diff --git a/src/test/parse-fail/use-as-where-use-ends-with-mod-sep.rs b/src/test/parse-fail/use-as-where-use-ends-with-mod-sep.rs
deleted file mode 100644 (file)
index 9e16e29..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-use std::any:: as foo; //~ ERROR expected identifier, found keyword `as`
-//~^ ERROR: expected one of `::`, `;`, or `as`, found `foo`
diff --git a/src/test/parse-fail/use-ends-with-mod-sep.rs b/src/test/parse-fail/use-ends-with-mod-sep.rs
deleted file mode 100644 (file)
index e6a10d4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-use std::any::; //~ ERROR expected identifier, found `;`
diff --git a/src/test/parse-fail/variadic-ffi-3.rs b/src/test/parse-fail/variadic-ffi-3.rs
deleted file mode 100644 (file)
index d202fa3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn foo(x: isize, ...) {
-    //~^ ERROR: only foreign functions are allowed to be variadic
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/variadic-ffi-4.rs b/src/test/parse-fail/variadic-ffi-4.rs
deleted file mode 100644 (file)
index ef9d455..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-extern "C" fn foo(x: isize, ...) {
-    //~^ ERROR: only foreign functions are allowed to be variadic
-}
-
-fn main() {}
diff --git a/src/test/parse-fail/virtual-structs.rs b/src/test/parse-fail/virtual-structs.rs
deleted file mode 100644 (file)
index f34eddc..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-// Test diagnostics for the removed struct inheritance feature.
-
-virtual struct SuperStruct { //~ ERROR expected item, found `virtual`
-    f1: isize,
-}
-
-struct Struct : SuperStruct;
-
-pub fn main() {}
diff --git a/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs b/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs
deleted file mode 100644 (file)
index cf67b51..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-// Empty predicate list is OK
-fn equal1<T>(_: &T, _: &T) -> bool where {
-    true
-}
-
-// Empty bound list is OK
-fn equal2<T>(_: &T, _: &T) -> bool where T: {
-    true
-}
-
-fn foo<'a>() where 'a {}
-//~^ ERROR expected `:`, found `{`
-
-fn main() {
-}
diff --git a/src/test/parse-fail/where_with_bound.rs b/src/test/parse-fail/where_with_bound.rs
deleted file mode 100644 (file)
index 2948619..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn foo<T>() where <T>::Item: ToString, T: Iterator { }
-//~^ ERROR generic parameters on `where` clauses are reserved for future use
-
-fn main() {}
diff --git a/src/test/parse-fail/wrong-escape-of-curly-braces.rs b/src/test/parse-fail/wrong-escape-of-curly-braces.rs
deleted file mode 100644 (file)
index d86bf72..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn f() {
-    let ok = "{{everything fine}}";
-    let bad = "\{it is wrong\}";
-    //~^  ERROR unknown character escape: {
-    //~^^  HELP if used in a formatting string, curly braces are escaped with `{{` and `}}`
-    //~^^^ ERROR unknown character escape: }
-    //~^^^^  HELP if used in a formatting string, curly braces are escaped with `{{` and `}}`
-}
diff --git a/src/test/ui/parser/ascii-only-character-escape.rs b/src/test/ui/parser/ascii-only-character-escape.rs
new file mode 100644 (file)
index 0000000..a8c4022
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn main() {
+    let x = "\x80"; //~ ERROR may only be used
+    let y = "\xff"; //~ ERROR may only be used
+    let z = "\xe2"; //~ ERROR may only be used
+    let a = b"\x00e2";  // ok because byte literal
+}
diff --git a/src/test/ui/parser/ascii-only-character-escape.stderr b/src/test/ui/parser/ascii-only-character-escape.stderr
new file mode 100644 (file)
index 0000000..e09db78
--- /dev/null
@@ -0,0 +1,20 @@
+error: this form of character escape may only be used with characters in the range [/x00-/x7f]
+  --> $DIR/ascii-only-character-escape.rs:14:16
+   |
+LL |     let x = "/x80"; //~ ERROR may only be used
+   |                ^^
+
+error: this form of character escape may only be used with characters in the range [/x00-/x7f]
+  --> $DIR/ascii-only-character-escape.rs:15:16
+   |
+LL |     let y = "/xff"; //~ ERROR may only be used
+   |                ^^
+
+error: this form of character escape may only be used with characters in the range [/x00-/x7f]
+  --> $DIR/ascii-only-character-escape.rs:16:16
+   |
+LL |     let z = "/xe2"; //~ ERROR may only be used
+   |                ^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/parser/assoc-oddities-1.rs b/src/test/ui/parser/assoc-oddities-1.rs
new file mode 100644 (file)
index 0000000..63408b7
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn that_odd_parse() {
+    // following lines below parse and must not fail
+    x = if c { a } else { b }();
+    x = if true { 1 } else { 0 } as *mut _;
+    // however this does not parse and probably should fail to retain compat?
+    // NB: `..` here is arbitrary, failure happens/should happen ∀ops that aren’t `=`
+    // see assoc-oddities-2 and assoc-oddities-3
+    ..if c { a } else { b }[n]; //~ ERROR expected one of
+}
diff --git a/src/test/ui/parser/assoc-oddities-1.stderr b/src/test/ui/parser/assoc-oddities-1.stderr
new file mode 100644 (file)
index 0000000..2d39546
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `.`, `;`, `?`, or `}`, found `[`
+  --> $DIR/assoc-oddities-1.rs:20:28
+   |
+LL |     ..if c { a } else { b }[n]; //~ ERROR expected one of
+   |                            ^ expected one of `.`, `;`, `?`, or `}` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/assoc-oddities-2.rs b/src/test/ui/parser/assoc-oddities-2.rs
new file mode 100644 (file)
index 0000000..5679328
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn that_odd_parse() {
+    // see assoc-oddities-1 for explanation
+    x..if c { a } else { b }[n]; //~ ERROR expected one of
+}
diff --git a/src/test/ui/parser/assoc-oddities-2.stderr b/src/test/ui/parser/assoc-oddities-2.stderr
new file mode 100644 (file)
index 0000000..878ef68
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `.`, `;`, `?`, or `}`, found `[`
+  --> $DIR/assoc-oddities-2.rs:15:29
+   |
+LL |     x..if c { a } else { b }[n]; //~ ERROR expected one of
+   |                             ^ expected one of `.`, `;`, `?`, or `}` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs b/src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs
new file mode 100644 (file)
index 0000000..70055a1
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+// Test you can't use a higher-ranked trait bound inside of a qualified
+// path (just won't parse).
+
+pub trait Foo<T> {
+    type A;
+
+    fn get(&self, t: T) -> Self::A;
+}
+
+fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
+    //~^ ERROR expected identifier, found keyword `for`
+    //~| ERROR expected one of `::` or `>`
+{
+}
+
+pub fn main() {}
diff --git a/src/test/ui/parser/associated-types-project-from-hrtb-explicit.stderr b/src/test/ui/parser/associated-types-project-from-hrtb-explicit.stderr
new file mode 100644 (file)
index 0000000..59b378c
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected identifier, found keyword `for`
+  --> $DIR/associated-types-project-from-hrtb-explicit.rs:22:21
+   |
+LL | fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
+   |                     ^^^ expected identifier, found keyword
+
+error: expected one of `::` or `>`, found `Foo`
+  --> $DIR/associated-types-project-from-hrtb-explicit.rs:22:29
+   |
+LL | fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
+   |                             ^^^ expected one of `::` or `>` here
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/attr-bad-meta-2.rs b/src/test/ui/parser/attr-bad-meta-2.rs
new file mode 100644 (file)
index 0000000..ce640a3
--- /dev/null
@@ -0,0 +1,12 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[path =] //~ ERROR unexpected token: `]`
+mod m {}
diff --git a/src/test/ui/parser/attr-bad-meta-2.stderr b/src/test/ui/parser/attr-bad-meta-2.stderr
new file mode 100644 (file)
index 0000000..3366936
--- /dev/null
@@ -0,0 +1,8 @@
+error: unexpected token: `]`
+  --> $DIR/attr-bad-meta-2.rs:11:9
+   |
+LL | #[path =] //~ ERROR unexpected token: `]`
+   |         ^ unexpected token after this
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/attr-bad-meta-3.rs b/src/test/ui/parser/attr-bad-meta-3.rs
new file mode 100644 (file)
index 0000000..92e2a59
--- /dev/null
@@ -0,0 +1,12 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[path() token] //~ ERROR expected `]`, found `token`
+mod m {}
diff --git a/src/test/ui/parser/attr-bad-meta-3.stderr b/src/test/ui/parser/attr-bad-meta-3.stderr
new file mode 100644 (file)
index 0000000..059e148
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `]`, found `token`
+  --> $DIR/attr-bad-meta-3.rs:11:10
+   |
+LL | #[path() token] //~ ERROR expected `]`, found `token`
+   |          ^^^^^ expected `]`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/attr-bad-meta.rs b/src/test/ui/parser/attr-bad-meta.rs
new file mode 100644 (file)
index 0000000..6f9d794
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(unrestricted_attribute_tokens)]
+
+#[path*] //~ ERROR expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`
+mod m {}
diff --git a/src/test/ui/parser/attr-bad-meta.stderr b/src/test/ui/parser/attr-bad-meta.stderr
new file mode 100644 (file)
index 0000000..c99d822
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`
+  --> $DIR/attr-bad-meta.rs:13:7
+   |
+LL | #[path*] //~ ERROR expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`
+   |       ^ expected one of `(`, `::`, `=`, `[`, `]`, or `{` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/attr-before-eof.rs b/src/test/ui/parser/attr-before-eof.rs
new file mode 100644 (file)
index 0000000..c75b0ac
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+#[derive(Debug)] //~ERROR expected item after attributes
diff --git a/src/test/ui/parser/attr-before-eof.stderr b/src/test/ui/parser/attr-before-eof.stderr
new file mode 100644 (file)
index 0000000..e96b9c4
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected item after attributes
+  --> $DIR/attr-before-eof.rs:13:16
+   |
+LL | #[derive(Debug)] //~ERROR expected item after attributes
+   |                ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/attr-dangling-in-fn.rs b/src/test/ui/parser/attr-dangling-in-fn.rs
new file mode 100644 (file)
index 0000000..7b731b6
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:expected statement
+
+fn f() {
+  #[foo = "bar"]
+}
+
+fn main() {
+}
diff --git a/src/test/ui/parser/attr-dangling-in-fn.stderr b/src/test/ui/parser/attr-dangling-in-fn.stderr
new file mode 100644 (file)
index 0000000..0f530a2
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected statement after outer attribute
+  --> $DIR/attr-dangling-in-fn.rs:17:1
+   |
+LL | }
+   | ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/attr-dangling-in-mod.rs b/src/test/ui/parser/attr-dangling-in-mod.rs
new file mode 100644 (file)
index 0000000..7960993
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:expected item
+
+fn main() {
+}
+
+#[foo = "bar"]
diff --git a/src/test/ui/parser/attr-dangling-in-mod.stderr b/src/test/ui/parser/attr-dangling-in-mod.stderr
new file mode 100644 (file)
index 0000000..1105e06
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected item after attributes
+  --> $DIR/attr-dangling-in-mod.rs:18:14
+   |
+LL | #[foo = "bar"]
+   |              ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/attr.rs b/src/test/ui/parser/attr.rs
new file mode 100644 (file)
index 0000000..1f0a958
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+#![feature(lang_items)]
+
+fn main() {}
+
+#![lang(foo)] //~ ERROR an inner attribute is not permitted in this context
+fn foo() {}
diff --git a/src/test/ui/parser/attr.stderr b/src/test/ui/parser/attr.stderr
new file mode 100644 (file)
index 0000000..a977847
--- /dev/null
@@ -0,0 +1,10 @@
+error: an inner attribute is not permitted in this context
+  --> $DIR/attr.rs:17:3
+   |
+LL | #![lang(foo)] //~ ERROR an inner attribute is not permitted in this context
+   |   ^
+   |
+   = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/attrs-after-extern-mod.rs b/src/test/ui/parser/attrs-after-extern-mod.rs
new file mode 100644 (file)
index 0000000..442eb14
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Constants (static variables) can be used to match in patterns, but mutable
+// statics cannot. This ensures that there's some form of error if this is
+// attempted.
+
+extern crate libc;
+
+extern {
+    static mut rust_dbg_static_mut: libc::c_int;
+    pub fn rust_dbg_static_mut_check_four();
+    #[cfg(stage37)] //~ ERROR expected item after attributes
+}
+
+pub fn main() {}
diff --git a/src/test/ui/parser/attrs-after-extern-mod.stderr b/src/test/ui/parser/attrs-after-extern-mod.stderr
new file mode 100644 (file)
index 0000000..70a7afc
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected item after attributes
+  --> $DIR/attrs-after-extern-mod.rs:22:19
+   |
+LL |     #[cfg(stage37)] //~ ERROR expected item after attributes
+   |                   ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bad-char-literals.rs b/src/test/ui/parser/bad-char-literals.rs
new file mode 100644 (file)
index 0000000..821015e
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+// ignore-tidy-cr
+// ignore-tidy-tab
+fn main() {
+    // these literals are just silly.
+    ''';
+    //~^ ERROR: character constant must be escaped: '
+
+    // note that this is a literal "\n" byte
+    '
+';
+    //~^^ ERROR: character constant must be escaped: \n
+
+    // note that this is a literal "\r" byte
+    '\r'; //~ ERROR: character constant must be escaped: \r
+
+    // note that this is a literal tab character here
+    '  ';
+    //~^ ERROR: character constant must be escaped: \t
+}
diff --git a/src/test/ui/parser/bad-char-literals.stderr b/src/test/ui/parser/bad-char-literals.stderr
new file mode 100644 (file)
index 0000000..40f9665
--- /dev/null
@@ -0,0 +1,28 @@
+error: character constant must be escaped: '
+  --> $DIR/bad-char-literals.rs:17:6
+   |
+LL |     ''';
+   |      ^
+
+error: character constant must be escaped: /n
+  --> $DIR/bad-char-literals.rs:21:6
+   |
+LL |       '
+   |  ______^
+LL | | ';
+   | |_
+
+error: character constant must be escaped: /r
+  --> $DIR/bad-char-literals.rs:26:6
+   |
+LL |     '\r'; //~ ERROR: character constant must be escaped: /r
+   |      ^
+
+error: character constant must be escaped: /t
+  --> $DIR/bad-char-literals.rs:29:6
+   |
+LL |     '    ';
+   |      ^^^^
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/parser/bad-lit-suffixes.rs b/src/test/ui/parser/bad-lit-suffixes.rs
new file mode 100644 (file)
index 0000000..0811a64
--- /dev/null
@@ -0,0 +1,39 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+
+extern
+    "C"suffix //~ ERROR ABI spec with a suffix is invalid
+    fn foo() {}
+
+extern
+    "C"suffix //~ ERROR ABI spec with a suffix is invalid
+{}
+
+fn main() {
+    ""suffix; //~ ERROR string literal with a suffix is invalid
+    b""suffix; //~ ERROR byte string literal with a suffix is invalid
+    r#""#suffix; //~ ERROR string literal with a suffix is invalid
+    br#""#suffix; //~ ERROR byte string literal with a suffix is invalid
+    'a'suffix; //~ ERROR char literal with a suffix is invalid
+    b'a'suffix; //~ ERROR byte literal with a suffix is invalid
+
+    1234u1024; //~ ERROR invalid width `1024` for integer literal
+    1234i1024; //~ ERROR invalid width `1024` for integer literal
+    1234f1024; //~ ERROR invalid width `1024` for float literal
+    1234.5f1024; //~ ERROR invalid width `1024` for float literal
+
+    1234suffix; //~ ERROR invalid suffix `suffix` for numeric literal
+    0b101suffix; //~ ERROR invalid suffix `suffix` for numeric literal
+    1.0suffix; //~ ERROR invalid suffix `suffix` for float literal
+    1.0e10suffix; //~ ERROR invalid suffix `suffix` for float literal
+}
diff --git a/src/test/ui/parser/bad-lit-suffixes.stderr b/src/test/ui/parser/bad-lit-suffixes.stderr
new file mode 100644 (file)
index 0000000..bc15c32
--- /dev/null
@@ -0,0 +1,114 @@
+error: ABI spec with a suffix is invalid
+  --> $DIR/bad-lit-suffixes.rs:15:5
+   |
+LL |     "C"suffix //~ ERROR ABI spec with a suffix is invalid
+   |     ^^^^^^^^^
+
+error: ABI spec with a suffix is invalid
+  --> $DIR/bad-lit-suffixes.rs:19:5
+   |
+LL |     "C"suffix //~ ERROR ABI spec with a suffix is invalid
+   |     ^^^^^^^^^
+
+error: string literal with a suffix is invalid
+  --> $DIR/bad-lit-suffixes.rs:23:5
+   |
+LL |     ""suffix; //~ ERROR string literal with a suffix is invalid
+   |     ^^^^^^^^
+
+error: byte string literal with a suffix is invalid
+  --> $DIR/bad-lit-suffixes.rs:24:5
+   |
+LL |     b""suffix; //~ ERROR byte string literal with a suffix is invalid
+   |     ^^^^^^^^^
+
+error: string literal with a suffix is invalid
+  --> $DIR/bad-lit-suffixes.rs:25:5
+   |
+LL |     r#""#suffix; //~ ERROR string literal with a suffix is invalid
+   |     ^^^^^^^^^^^
+
+error: byte string literal with a suffix is invalid
+  --> $DIR/bad-lit-suffixes.rs:26:5
+   |
+LL |     br#""#suffix; //~ ERROR byte string literal with a suffix is invalid
+   |     ^^^^^^^^^^^^
+
+error: char literal with a suffix is invalid
+  --> $DIR/bad-lit-suffixes.rs:27:5
+   |
+LL |     'a'suffix; //~ ERROR char literal with a suffix is invalid
+   |     ^^^^^^^^^
+
+error: byte literal with a suffix is invalid
+  --> $DIR/bad-lit-suffixes.rs:28:5
+   |
+LL |     b'a'suffix; //~ ERROR byte literal with a suffix is invalid
+   |     ^^^^^^^^^^
+
+error: invalid width `1024` for integer literal
+  --> $DIR/bad-lit-suffixes.rs:30:5
+   |
+LL |     1234u1024; //~ ERROR invalid width `1024` for integer literal
+   |     ^^^^^^^^^
+   |
+   = help: valid widths are 8, 16, 32, 64 and 128
+
+error: invalid width `1024` for integer literal
+  --> $DIR/bad-lit-suffixes.rs:31:5
+   |
+LL |     1234i1024; //~ ERROR invalid width `1024` for integer literal
+   |     ^^^^^^^^^
+   |
+   = help: valid widths are 8, 16, 32, 64 and 128
+
+error: invalid width `1024` for float literal
+  --> $DIR/bad-lit-suffixes.rs:32:5
+   |
+LL |     1234f1024; //~ ERROR invalid width `1024` for float literal
+   |     ^^^^^^^^^
+   |
+   = help: valid widths are 32 and 64
+
+error: invalid width `1024` for float literal
+  --> $DIR/bad-lit-suffixes.rs:33:5
+   |
+LL |     1234.5f1024; //~ ERROR invalid width `1024` for float literal
+   |     ^^^^^^^^^^^
+   |
+   = help: valid widths are 32 and 64
+
+error: invalid suffix `suffix` for numeric literal
+  --> $DIR/bad-lit-suffixes.rs:35:5
+   |
+LL |     1234suffix; //~ ERROR invalid suffix `suffix` for numeric literal
+   |     ^^^^^^^^^^
+   |
+   = help: the suffix must be one of the integral types (`u32`, `isize`, etc)
+
+error: invalid suffix `suffix` for numeric literal
+  --> $DIR/bad-lit-suffixes.rs:36:5
+   |
+LL |     0b101suffix; //~ ERROR invalid suffix `suffix` for numeric literal
+   |     ^^^^^^^^^^^
+   |
+   = help: the suffix must be one of the integral types (`u32`, `isize`, etc)
+
+error: invalid suffix `suffix` for float literal
+  --> $DIR/bad-lit-suffixes.rs:37:5
+   |
+LL |     1.0suffix; //~ ERROR invalid suffix `suffix` for float literal
+   |     ^^^^^^^^^
+   |
+   = help: valid suffixes are `f32` and `f64`
+
+error: invalid suffix `suffix` for float literal
+  --> $DIR/bad-lit-suffixes.rs:38:5
+   |
+LL |     1.0e10suffix; //~ ERROR invalid suffix `suffix` for float literal
+   |     ^^^^^^^^^^^^
+   |
+   = help: valid suffixes are `f32` and `f64`
+
+error: aborting due to 16 previous errors
+
diff --git a/src/test/ui/parser/bad-match.rs b/src/test/ui/parser/bad-match.rs
new file mode 100644 (file)
index 0000000..b42c04f
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern: expected
+
+fn main() {
+  let isize x = 5;
+  match x;
+}
+
+fn main() {
+}
diff --git a/src/test/ui/parser/bad-match.stderr b/src/test/ui/parser/bad-match.stderr
new file mode 100644 (file)
index 0000000..7927a3d
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `;`, `=`, or `@`, found `x`
+  --> $DIR/bad-match.rs:16:13
+   |
+LL |   let isize x = 5;
+   |             ^ expected one of `:`, `;`, `=`, or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bad-name.rs b/src/test/ui/parser/bad-name.rs
new file mode 100644 (file)
index 0000000..201e6ce
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern: expected
+
+fn main() {
+  let x.y::<isize>.z foo;
+}
diff --git a/src/test/ui/parser/bad-name.stderr b/src/test/ui/parser/bad-name.stderr
new file mode 100644 (file)
index 0000000..c4ab3e1
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `;`, `=`, or `@`, found `.`
+  --> $DIR/bad-name.rs:16:8
+   |
+LL |   let x.y::<isize>.z foo;
+   |        ^ expected one of `:`, `;`, `=`, or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bad-pointer-type.rs b/src/test/ui/parser/bad-pointer-type.rs
new file mode 100644 (file)
index 0000000..cdb4d16
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn foo(_: *()) {
+    //~^ expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)
+}
diff --git a/src/test/ui/parser/bad-pointer-type.stderr b/src/test/ui/parser/bad-pointer-type.stderr
new file mode 100644 (file)
index 0000000..d41bbb3
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)
+  --> $DIR/bad-pointer-type.rs:13:11
+   |
+LL | fn foo(_: *()) {
+   |           ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bad-value-ident-false.rs b/src/test/ui/parser/bad-value-ident-false.rs
new file mode 100644 (file)
index 0000000..96325a2
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn false() { } //~ ERROR expected identifier, found keyword `false`
+fn main() { }
diff --git a/src/test/ui/parser/bad-value-ident-false.stderr b/src/test/ui/parser/bad-value-ident-false.stderr
new file mode 100644 (file)
index 0000000..ac5fe78
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found keyword `false`
+  --> $DIR/bad-value-ident-false.rs:13:4
+   |
+LL | fn false() { } //~ ERROR expected identifier, found keyword `false`
+   |    ^^^^^ expected identifier, found keyword
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bad-value-ident-true.rs b/src/test/ui/parser/bad-value-ident-true.rs
new file mode 100644 (file)
index 0000000..7ff16b8
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn true() { } //~ ERROR expected identifier, found keyword `true`
+fn main() { }
diff --git a/src/test/ui/parser/bad-value-ident-true.stderr b/src/test/ui/parser/bad-value-ident-true.stderr
new file mode 100644 (file)
index 0000000..34d0237
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found keyword `true`
+  --> $DIR/bad-value-ident-true.rs:13:4
+   |
+LL | fn true() { } //~ ERROR expected identifier, found keyword `true`
+   |    ^^^^ expected identifier, found keyword
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/better-expected.rs b/src/test/ui/parser/better-expected.rs
new file mode 100644 (file)
index 0000000..b60201c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
+}
diff --git a/src/test/ui/parser/better-expected.stderr b/src/test/ui/parser/better-expected.stderr
new file mode 100644 (file)
index 0000000..028858c
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
+  --> $DIR/better-expected.rs:14:19
+   |
+LL |     let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
+   |         -         ^ expected one of 7 possible tokens here
+   |         |
+   |         while parsing the type for `x`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bind-struct-early-modifiers.rs b/src/test/ui/parser/bind-struct-early-modifiers.rs
new file mode 100644 (file)
index 0000000..e9e76af
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    struct Foo { x: isize }
+    match (Foo { x: 10 }) {
+        Foo { ref x: ref x } => {}, //~ ERROR expected `,`
+        _ => {}
+    }
+}
diff --git a/src/test/ui/parser/bind-struct-early-modifiers.stderr b/src/test/ui/parser/bind-struct-early-modifiers.stderr
new file mode 100644 (file)
index 0000000..14ff1b7
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `,`
+  --> $DIR/bind-struct-early-modifiers.rs:16:19
+   |
+LL |         Foo { ref x: ref x } => {}, //~ ERROR expected `,`
+   |                   ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bound-single-question-mark.rs b/src/test/ui/parser/bound-single-question-mark.rs
new file mode 100644 (file)
index 0000000..9dde526
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn f<T: ?>() {} //~ ERROR expected identifier, found `>`
diff --git a/src/test/ui/parser/bound-single-question-mark.stderr b/src/test/ui/parser/bound-single-question-mark.stderr
new file mode 100644 (file)
index 0000000..e3522ce
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found `>`
+  --> $DIR/bound-single-question-mark.rs:13:10
+   |
+LL | fn f<T: ?>() {} //~ ERROR expected identifier, found `>`
+   |          ^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bounds-lifetime-1.rs b/src/test/ui/parser/bounds-lifetime-1.rs
new file mode 100644 (file)
index 0000000..824d243
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type A = for<'a 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `'b`
+
+fn main() {}
diff --git a/src/test/ui/parser/bounds-lifetime-1.stderr b/src/test/ui/parser/bounds-lifetime-1.stderr
new file mode 100644 (file)
index 0000000..910092f
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `,`, `:`, or `>`, found `'b`
+  --> $DIR/bounds-lifetime-1.rs:13:17
+   |
+LL | type A = for<'a 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `'b`
+   |                 ^^ expected one of `,`, `:`, or `>` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bounds-lifetime-2.rs b/src/test/ui/parser/bounds-lifetime-2.rs
new file mode 100644 (file)
index 0000000..3c67dda
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type A = for<'a + 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `+`
+
+fn main() {}
diff --git a/src/test/ui/parser/bounds-lifetime-2.stderr b/src/test/ui/parser/bounds-lifetime-2.stderr
new file mode 100644 (file)
index 0000000..b84f5e6
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `,`, `:`, or `>`, found `+`
+  --> $DIR/bounds-lifetime-2.rs:13:17
+   |
+LL | type A = for<'a + 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `+`
+   |                 ^ expected one of `,`, `:`, or `>` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bounds-lifetime-where-1.rs b/src/test/ui/parser/bounds-lifetime-where-1.rs
new file mode 100644 (file)
index 0000000..aae9d72
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type A where 'a; //~ ERROR expected `:`, found `;`
+
+fn main() {}
diff --git a/src/test/ui/parser/bounds-lifetime-where-1.stderr b/src/test/ui/parser/bounds-lifetime-where-1.stderr
new file mode 100644 (file)
index 0000000..5bcb896
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `:`, found `;`
+  --> $DIR/bounds-lifetime-where-1.rs:13:16
+   |
+LL | type A where 'a; //~ ERROR expected `:`, found `;`
+   |                ^ expected `:`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bounds-lifetime-where.rs b/src/test/ui/parser/bounds-lifetime-where.rs
new file mode 100644 (file)
index 0000000..0a30818
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type A where 'a: 'b + 'c = u8; // OK
+type A where 'a: 'b, = u8; // OK
+type A where 'a: = u8; // OK
+type A where 'a:, = u8; // OK
+type A where 'a: 'b + 'c = u8; // OK
+type A where = u8; // OK
+type A where 'a: 'b + = u8; // OK
+type A where , = u8; //~ ERROR expected one of `=`, lifetime, or type, found `,`
+
+fn main() {}
diff --git a/src/test/ui/parser/bounds-lifetime-where.stderr b/src/test/ui/parser/bounds-lifetime-where.stderr
new file mode 100644 (file)
index 0000000..ef4ba94
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `=`, lifetime, or type, found `,`
+  --> $DIR/bounds-lifetime-where.rs:20:14
+   |
+LL | type A where , = u8; //~ ERROR expected one of `=`, lifetime, or type, found `,`
+   |              ^ expected one of `=`, lifetime, or type here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bounds-lifetime.rs b/src/test/ui/parser/bounds-lifetime.rs
new file mode 100644 (file)
index 0000000..88db205
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type A = for<'a:> fn(); // OK
+type A = for<'a:,> fn(); // OK
+type A = for<'a> fn(); // OK
+type A = for<> fn(); // OK
+type A = for<'a: 'b + 'c> fn(); // OK (rejected later by ast_validation)
+type A = for<'a: 'b,> fn(); // OK(rejected later by ast_validation)
+type A = for<'a: 'b +> fn(); // OK (rejected later by ast_validation)
+type A = for<'a, T> fn(); // OK (rejected later by ast_validation)
+type A = for<,> fn(); //~ ERROR expected one of `>`, identifier, or lifetime, found `,`
+
+fn main() {}
diff --git a/src/test/ui/parser/bounds-lifetime.stderr b/src/test/ui/parser/bounds-lifetime.stderr
new file mode 100644 (file)
index 0000000..2850af5
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `>`, identifier, or lifetime, found `,`
+  --> $DIR/bounds-lifetime.rs:21:14
+   |
+LL | type A = for<,> fn(); //~ ERROR expected one of `>`, identifier, or lifetime, found `,`
+   |              ^ expected one of `>`, identifier, or lifetime here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bounds-type-where.rs b/src/test/ui/parser/bounds-type-where.rs
new file mode 100644 (file)
index 0000000..9dc5d82
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type A where for<'a> for<'b> Trait1 + ?Trait2: 'a + Trait = u8; // OK
+type A where T: Trait, = u8; // OK
+type A where T: = u8; // OK
+type A where T:, = u8; // OK
+type A where T: Trait + Trait = u8; // OK
+type A where = u8; // OK
+type A where T: Trait + = u8; // OK
+type A where T, = u8;
+//~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,`
+
+fn main() {}
diff --git a/src/test/ui/parser/bounds-type-where.stderr b/src/test/ui/parser/bounds-type-where.stderr
new file mode 100644 (file)
index 0000000..b6a184f
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,`
+  --> $DIR/bounds-type-where.rs:20:15
+   |
+LL | type A where T, = u8;
+   |               ^ expected one of 8 possible tokens here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/bounds-type.rs b/src/test/ui/parser/bounds-type.rs
new file mode 100644 (file)
index 0000000..0ebe7fd
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+struct S<
+    T: 'a + Tr, // OK
+    T: Tr + 'a, // OK
+    T: 'a, // OK
+    T:, // OK
+    T: ?for<'a> Trait, // OK
+    T: Tr +, // OK
+    T: ?'a, //~ ERROR `?` may only modify trait bounds, not lifetime bounds
+>;
+
+fn main() {}
diff --git a/src/test/ui/parser/bounds-type.stderr b/src/test/ui/parser/bounds-type.stderr
new file mode 100644 (file)
index 0000000..c4c3d2a
--- /dev/null
@@ -0,0 +1,8 @@
+error: `?` may only modify trait bounds, not lifetime bounds
+  --> $DIR/bounds-type.rs:20:8
+   |
+LL |     T: ?'a, //~ ERROR `?` may only modify trait bounds, not lifetime bounds
+   |        ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/brace-after-qualified-path-in-match.rs b/src/test/ui/parser/brace-after-qualified-path-in-match.rs
new file mode 100644 (file)
index 0000000..ff434d8
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn foo() {
+    match x {
+        <T as Trait>::Type{key: value} => (),
+        //~^ ERROR unexpected `{` after qualified path
+        _ => (),
+    }
+}
diff --git a/src/test/ui/parser/brace-after-qualified-path-in-match.stderr b/src/test/ui/parser/brace-after-qualified-path-in-match.stderr
new file mode 100644 (file)
index 0000000..c66b3ed
--- /dev/null
@@ -0,0 +1,8 @@
+error: unexpected `{` after qualified path
+  --> $DIR/brace-after-qualified-path-in-match.rs:15:27
+   |
+LL |         <T as Trait>::Type{key: value} => (),
+   |                           ^ unexpected `{` after qualified path
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/byte-literals.rs b/src/test/ui/parser/byte-literals.rs
new file mode 100644 (file)
index 0000000..3ecd778
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+
+// ignore-tidy-tab
+
+static FOO: u8 = b'\f';  //~ ERROR unknown byte escape
+
+pub fn main() {
+    b'\f';  //~ ERROR unknown byte escape
+    b'\x0Z';  //~ ERROR invalid character in numeric character escape: Z
+    b' ';  //~ ERROR byte constant must be escaped
+    b''';  //~ ERROR byte constant must be escaped
+    b'é';  //~ ERROR byte constant must be ASCII
+    b'a  //~ ERROR unterminated byte constant
+}
diff --git a/src/test/ui/parser/byte-literals.stderr b/src/test/ui/parser/byte-literals.stderr
new file mode 100644 (file)
index 0000000..7b4f221
--- /dev/null
@@ -0,0 +1,44 @@
+error: unknown byte escape: f
+  --> $DIR/byte-literals.rs:16:21
+   |
+LL | static FOO: u8 = b'/f';  //~ ERROR unknown byte escape
+   |                     ^
+
+error: unknown byte escape: f
+  --> $DIR/byte-literals.rs:19:8
+   |
+LL |     b'/f';  //~ ERROR unknown byte escape
+   |        ^
+
+error: invalid character in numeric character escape: Z
+  --> $DIR/byte-literals.rs:20:10
+   |
+LL |     b'/x0Z';  //~ ERROR invalid character in numeric character escape: Z
+   |          ^
+
+error: byte constant must be escaped: /t
+  --> $DIR/byte-literals.rs:21:7
+   |
+LL |     b'    ';  //~ ERROR byte constant must be escaped
+   |       ^^^^
+
+error: byte constant must be escaped: '
+  --> $DIR/byte-literals.rs:22:7
+   |
+LL |     b''';  //~ ERROR byte constant must be escaped
+   |       ^
+
+error: byte constant must be ASCII. Use a /xHH escape for a non-ASCII byte
+  --> $DIR/byte-literals.rs:23:7
+   |
+LL |     b'é';  //~ ERROR byte constant must be ASCII
+   |       ^
+
+error: unterminated byte constant: b'a
+  --> $DIR/byte-literals.rs:24:5
+   |
+LL |     b'a  //~ ERROR unterminated byte constant
+   |     ^^^
+
+error: aborting due to 7 previous errors
+
diff --git a/src/test/ui/parser/byte-string-literals.rs b/src/test/ui/parser/byte-string-literals.rs
new file mode 100644 (file)
index 0000000..4eba9e9
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+
+// ignore-tidy-tab
+
+static FOO: &'static [u8] = b"\f";  //~ ERROR unknown byte escape
+
+pub fn main() {
+    b"\f";  //~ ERROR unknown byte escape
+    b"\x0Z";  //~ ERROR invalid character in numeric character escape: Z
+    b"é";  //~ ERROR byte constant must be ASCII
+    b"a  //~ ERROR unterminated double quote byte string
+}
diff --git a/src/test/ui/parser/byte-string-literals.stderr b/src/test/ui/parser/byte-string-literals.stderr
new file mode 100644 (file)
index 0000000..856d195
--- /dev/null
@@ -0,0 +1,34 @@
+error: unknown byte escape: f
+  --> $DIR/byte-string-literals.rs:16:32
+   |
+LL | static FOO: &'static [u8] = b"/f";  //~ ERROR unknown byte escape
+   |                                ^
+
+error: unknown byte escape: f
+  --> $DIR/byte-string-literals.rs:19:8
+   |
+LL |     b"/f";  //~ ERROR unknown byte escape
+   |        ^
+
+error: invalid character in numeric character escape: Z
+  --> $DIR/byte-string-literals.rs:20:10
+   |
+LL |     b"/x0Z";  //~ ERROR invalid character in numeric character escape: Z
+   |          ^
+
+error: byte constant must be ASCII. Use a /xHH escape for a non-ASCII byte
+  --> $DIR/byte-string-literals.rs:21:7
+   |
+LL |     b"é";  //~ ERROR byte constant must be ASCII
+   |       ^
+
+error: unterminated double quote byte string
+  --> $DIR/byte-string-literals.rs:22:7
+   |
+LL |       b"a  //~ ERROR unterminated double quote byte string
+   |  _______^
+LL | | }
+   | |__^
+
+error: aborting due to 5 previous errors
+
diff --git a/src/test/ui/parser/circular_modules_hello.rs b/src/test/ui/parser/circular_modules_hello.rs
new file mode 100644 (file)
index 0000000..94770aa
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// ignore-test: this is an auxiliary file for circular-modules-main.rs
+
+#[path = "circular_modules_main.rs"]
+mod circular_modules_main;
+
+pub fn say_hello() {
+    println!("{}", circular_modules_main::hi_str());
+}
diff --git a/src/test/ui/parser/circular_modules_main.rs b/src/test/ui/parser/circular_modules_main.rs
new file mode 100644 (file)
index 0000000..861d4cd
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+#[path = "circular_modules_hello.rs"]
+mod circular_modules_hello; //~ ERROR: circular modules
+
+pub fn hi_str() -> String {
+    "Hi!".to_string()
+}
+
+fn main() {
+    circular_modules_hello::say_hello();
+}
diff --git a/src/test/ui/parser/circular_modules_main.stderr b/src/test/ui/parser/circular_modules_main.stderr
new file mode 100644 (file)
index 0000000..48cb397
--- /dev/null
@@ -0,0 +1,8 @@
+error: circular modules: $DIR/circular_modules_hello.rs -> $DIR/circular_modules_main.rs -> $DIR/circular_modules_hello.rs
+  --> $DIR/circular_modules_main.rs:14:5
+   |
+LL | mod circular_modules_hello; //~ ERROR: circular modules
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/class-implements-bad-trait.rs b/src/test/ui/parser/class-implements-bad-trait.rs
new file mode 100644 (file)
index 0000000..ea263d9
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:nonexistent
+class cat : nonexistent {
+  let meows: usize;
+  new(in_x : usize) { self.meows = in_x; }
+}
+
+fn main() {
+  let nyan = cat(0);
+}
diff --git a/src/test/ui/parser/class-implements-bad-trait.stderr b/src/test/ui/parser/class-implements-bad-trait.stderr
new file mode 100644 (file)
index 0000000..d28750d
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!` or `::`, found `cat`
+  --> $DIR/class-implements-bad-trait.rs:14:7
+   |
+LL | class cat : nonexistent {
+   |       ^^^ expected one of `!` or `::` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/closure-return-syntax.rs b/src/test/ui/parser/closure-return-syntax.rs
new file mode 100644 (file)
index 0000000..4c77ede
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test that we cannot parse a closure with an explicit return type
+// unless it uses braces.
+
+fn main() {
+    let x = || -> i32 22;
+    //~^ ERROR expected one of `!`, `(`, `+`, `::`, `<`, or `{`, found `22`
+}
diff --git a/src/test/ui/parser/closure-return-syntax.stderr b/src/test/ui/parser/closure-return-syntax.stderr
new file mode 100644 (file)
index 0000000..2b375d6
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!`, `(`, `+`, `::`, `<`, or `{`, found `22`
+  --> $DIR/closure-return-syntax.rs:15:23
+   |
+LL |     let x = || -> i32 22;
+   |                       ^^ expected one of `!`, `(`, `+`, `::`, `<`, or `{` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/column-offset-1-based.rs b/src/test/ui/parser/column-offset-1-based.rs
new file mode 100644 (file)
index 0000000..8caf2e0
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+# //~ ERROR 13:1: 13:2: expected `[`, found `<eof>`
diff --git a/src/test/ui/parser/column-offset-1-based.stderr b/src/test/ui/parser/column-offset-1-based.stderr
new file mode 100644 (file)
index 0000000..452e656
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `[`, found `<eof>`
+  --> $DIR/column-offset-1-based.rs:13:1
+   |
+LL | # //~ ERROR 13:1: 13:2: expected `[`, found `<eof>`
+   | ^ expected `[`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/default.rs b/src/test/ui/parser/default.rs
new file mode 100644 (file)
index 0000000..6c3bc45
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Test successful and unsuccessful parsing of the `default` contextual keyword
+
+trait Foo {
+    fn foo<T: Default>() -> T;
+}
+
+impl Foo for u8 {
+    default fn foo<T: Default>() -> T {
+        T::default()
+    }
+}
+
+impl Foo for u16 {
+    pub default fn foo<T: Default>() -> T {
+        T::default()
+    }
+}
+
+impl Foo for u32 {
+    default pub fn foo<T: Default>() -> T { T::default() } //~ ERROR expected one of
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/default.stderr b/src/test/ui/parser/default.stderr
new file mode 100644 (file)
index 0000000..0a5c6e8
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `async`, `const`, `existential`, `extern`, `fn`, `type`, or `unsafe`, found `pub`
+  --> $DIR/default.rs:32:13
+   |
+LL |     default pub fn foo<T: Default>() -> T { T::default() } //~ ERROR expected one of
+   |             ^^^ expected one of 7 possible tokens here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/do-catch-suggests-try.rs b/src/test/ui/parser/do-catch-suggests-try.rs
new file mode 100644 (file)
index 0000000..449135e
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let _: Option<()> = do catch {};
+    //~^ ERROR found removed `do catch` syntax
+    //~^^ HELP Following RFC #2388, the new non-placeholder syntax is `try`
+}
diff --git a/src/test/ui/parser/do-catch-suggests-try.stderr b/src/test/ui/parser/do-catch-suggests-try.stderr
new file mode 100644 (file)
index 0000000..c1ea802
--- /dev/null
@@ -0,0 +1,10 @@
+error: found removed `do catch` syntax
+  --> $DIR/do-catch-suggests-try.rs:14:25
+   |
+LL |     let _: Option<()> = do catch {};
+   |                         ^^
+   |
+   = help: Following RFC #2388, the new non-placeholder syntax is `try`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/doc-after-struct-field.rs b/src/test/ui/parser/doc-after-struct-field.rs
new file mode 100644 (file)
index 0000000..a2c6015
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z continue-parse-after-error
+
+struct X {
+    a: u8 /** document a */,
+    //~^ ERROR found a documentation comment that doesn't document anything
+    //~| HELP maybe a comment was intended
+}
+
+struct Y {
+    a: u8 /// document a
+    //~^ ERROR found a documentation comment that doesn't document anything
+    //~| HELP maybe a comment was intended
+}
+
+fn main() {
+    let x = X { a: 1 };
+    let y = Y { a: 1 };
+}
diff --git a/src/test/ui/parser/doc-after-struct-field.stderr b/src/test/ui/parser/doc-after-struct-field.stderr
new file mode 100644 (file)
index 0000000..1725000
--- /dev/null
@@ -0,0 +1,19 @@
+error[E0585]: found a documentation comment that doesn't document anything
+  --> $DIR/doc-after-struct-field.rs:14:11
+   |
+LL |     a: u8 /** document a */,
+   |           ^^^^^^^^^^^^^^^^^
+   |
+   = help: doc comments must come before what they document, maybe a comment was intended with `//`?
+
+error[E0585]: found a documentation comment that doesn't document anything
+  --> $DIR/doc-after-struct-field.rs:20:11
+   |
+LL |     a: u8 /// document a
+   |           ^^^^^^^^^^^^^^
+   |
+   = help: doc comments must come before what they document, maybe a comment was intended with `//`?
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0585`.
diff --git a/src/test/ui/parser/doc-before-attr.rs b/src/test/ui/parser/doc-before-attr.rs
new file mode 100644 (file)
index 0000000..4548ceb
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+/// hi
+#[derive(Debug)] //~ERROR expected item after attributes
diff --git a/src/test/ui/parser/doc-before-attr.stderr b/src/test/ui/parser/doc-before-attr.stderr
new file mode 100644 (file)
index 0000000..f52bf60
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected item after attributes
+  --> $DIR/doc-before-attr.rs:14:16
+   |
+LL | #[derive(Debug)] //~ERROR expected item after attributes
+   |                ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/doc-before-eof.rs b/src/test/ui/parser/doc-before-eof.rs
new file mode 100644 (file)
index 0000000..728972e
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+/// hi //~ERROR expected item after doc comment
diff --git a/src/test/ui/parser/doc-before-eof.stderr b/src/test/ui/parser/doc-before-eof.stderr
new file mode 100644 (file)
index 0000000..9fd3db7
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected item after doc comment
+  --> $DIR/doc-before-eof.rs:13:1
+   |
+LL | /// hi //~ERROR expected item after doc comment
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/doc-before-extern-rbrace.rs b/src/test/ui/parser/doc-before-extern-rbrace.rs
new file mode 100644 (file)
index 0000000..70da47b
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+extern {
+    /// hi
+    //~^ ERROR expected item after doc comment
+}
diff --git a/src/test/ui/parser/doc-before-extern-rbrace.stderr b/src/test/ui/parser/doc-before-extern-rbrace.stderr
new file mode 100644 (file)
index 0000000..3936412
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected item after doc comment
+  --> $DIR/doc-before-extern-rbrace.rs:14:5
+   |
+LL |     /// hi
+   |     ^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/doc-before-fn-rbrace.rs b/src/test/ui/parser/doc-before-fn-rbrace.rs
new file mode 100644 (file)
index 0000000..bcf3261
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z continue-parse-after-error
+fn main() {
+    /// document
+    //~^ ERROR found a documentation comment that doesn't document anything
+    //~| HELP maybe a comment was intended
+}
diff --git a/src/test/ui/parser/doc-before-fn-rbrace.stderr b/src/test/ui/parser/doc-before-fn-rbrace.stderr
new file mode 100644 (file)
index 0000000..c6b22a9
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0585]: found a documentation comment that doesn't document anything
+  --> $DIR/doc-before-fn-rbrace.rs:13:5
+   |
+LL |     /// document
+   |     ^^^^^^^^^^^^
+   |
+   = help: doc comments must come before what they document, maybe a comment was intended with `//`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0585`.
diff --git a/src/test/ui/parser/doc-before-identifier.rs b/src/test/ui/parser/doc-before-identifier.rs
new file mode 100644 (file)
index 0000000..8f1fad9
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z continue-parse-after-error
+fn /// document
+foo() {}
+//~^^ ERROR expected identifier, found `/// document`
+
+fn main() {
+    foo();
+}
diff --git a/src/test/ui/parser/doc-before-identifier.stderr b/src/test/ui/parser/doc-before-identifier.stderr
new file mode 100644 (file)
index 0000000..b153bba
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found `/// document`
+  --> $DIR/doc-before-identifier.rs:12:4
+   |
+LL | fn /// document
+   |    ^^^^^^^^^^^^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/doc-before-mod-rbrace.rs b/src/test/ui/parser/doc-before-mod-rbrace.rs
new file mode 100644 (file)
index 0000000..d38d187
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z continue-parse-after-error
+mod Foo {
+    /// document
+    //~^ ERROR expected item after doc comment
+}
diff --git a/src/test/ui/parser/doc-before-mod-rbrace.stderr b/src/test/ui/parser/doc-before-mod-rbrace.stderr
new file mode 100644 (file)
index 0000000..cc77657
--- /dev/null
@@ -0,0 +1,13 @@
+error: expected item after doc comment
+  --> $DIR/doc-before-mod-rbrace.rs:13:5
+   |
+LL |     /// document
+   |     ^^^^^^^^^^^^
+
+error[E0601]: `main` function not found in crate `doc_before_mod_rbrace`
+   |
+   = note: consider adding a `main` function to `$DIR/doc-before-mod-rbrace.rs`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0601`.
diff --git a/src/test/ui/parser/doc-before-rbrace.rs b/src/test/ui/parser/doc-before-rbrace.rs
new file mode 100644 (file)
index 0000000..48ea2b5
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    println!("Hi"); /// hi
+    //~^ ERROR found a documentation comment that doesn't document anything
+    //~| HELP maybe a comment was intended
+}
diff --git a/src/test/ui/parser/doc-before-rbrace.stderr b/src/test/ui/parser/doc-before-rbrace.stderr
new file mode 100644 (file)
index 0000000..15e9c3d
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0585]: found a documentation comment that doesn't document anything
+  --> $DIR/doc-before-rbrace.rs:14:21
+   |
+LL |     println!("Hi"); /// hi
+   |                     ^^^^^^
+   |
+   = help: doc comments must come before what they document, maybe a comment was intended with `//`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0585`.
diff --git a/src/test/ui/parser/doc-before-semi.rs b/src/test/ui/parser/doc-before-semi.rs
new file mode 100644 (file)
index 0000000..71104b8
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    /// hi
+    //~^ ERROR found a documentation comment that doesn't document anything
+    //~| HELP maybe a comment was intended
+    ;
+}
diff --git a/src/test/ui/parser/doc-before-semi.stderr b/src/test/ui/parser/doc-before-semi.stderr
new file mode 100644 (file)
index 0000000..a174d6f
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0585]: found a documentation comment that doesn't document anything
+  --> $DIR/doc-before-semi.rs:14:5
+   |
+LL |     /// hi
+   |     ^^^^^^
+   |
+   = help: doc comments must come before what they document, maybe a comment was intended with `//`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0585`.
diff --git a/src/test/ui/parser/doc-before-struct-rbrace-1.rs b/src/test/ui/parser/doc-before-struct-rbrace-1.rs
new file mode 100644 (file)
index 0000000..6d9b4b0
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z continue-parse-after-error
+struct X {
+    a: u8,
+    /// document
+    //~^ ERROR found a documentation comment that doesn't document anything
+    //~| HELP maybe a comment was intended
+}
+
+fn main() {
+    let y = X {a: 1};
+}
diff --git a/src/test/ui/parser/doc-before-struct-rbrace-1.stderr b/src/test/ui/parser/doc-before-struct-rbrace-1.stderr
new file mode 100644 (file)
index 0000000..5abf8ff
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0585]: found a documentation comment that doesn't document anything
+  --> $DIR/doc-before-struct-rbrace-1.rs:14:5
+   |
+LL |     /// document
+   |     ^^^^^^^^^^^^
+   |
+   = help: doc comments must come before what they document, maybe a comment was intended with `//`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0585`.
diff --git a/src/test/ui/parser/doc-before-struct-rbrace-2.rs b/src/test/ui/parser/doc-before-struct-rbrace-2.rs
new file mode 100644 (file)
index 0000000..63b2f96
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z continue-parse-after-error
+struct X {
+    a: u8 /// document
+    //~^ ERROR found a documentation comment that doesn't document anything
+    //~| HELP maybe a comment was intended
+}
+
+fn main() {
+    let y = X {a: 1};
+}
diff --git a/src/test/ui/parser/doc-before-struct-rbrace-2.stderr b/src/test/ui/parser/doc-before-struct-rbrace-2.stderr
new file mode 100644 (file)
index 0000000..76e8746
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0585]: found a documentation comment that doesn't document anything
+  --> $DIR/doc-before-struct-rbrace-2.rs:13:11
+   |
+LL |     a: u8 /// document
+   |           ^^^^^^^^^^^^
+   |
+   = help: doc comments must come before what they document, maybe a comment was intended with `//`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0585`.
diff --git a/src/test/ui/parser/duplicate-visibility.rs b/src/test/ui/parser/duplicate-visibility.rs
new file mode 100644 (file)
index 0000000..cc3286f
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:expected one of `(`, `fn`, `static`, or `type`
+extern {
+    pub pub fn foo();
+}
diff --git a/src/test/ui/parser/duplicate-visibility.stderr b/src/test/ui/parser/duplicate-visibility.stderr
new file mode 100644 (file)
index 0000000..a0a5b66
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `(`, `fn`, `static`, or `type`, found `pub`
+  --> $DIR/duplicate-visibility.rs:15:9
+   |
+LL |     pub pub fn foo();
+   |         ^^^ expected one of `(`, `fn`, `static`, or `type` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/empty-impl-semicolon.rs b/src/test/ui/parser/empty-impl-semicolon.rs
new file mode 100644 (file)
index 0000000..9939f1e
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`
diff --git a/src/test/ui/parser/empty-impl-semicolon.stderr b/src/test/ui/parser/empty-impl-semicolon.stderr
new file mode 100644 (file)
index 0000000..fef4b88
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`
+  --> $DIR/empty-impl-semicolon.rs:13:9
+   |
+LL | impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`
+   |         ^ expected one of 8 possible tokens here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/extern-crate-unexpected-token.rs b/src/test/ui/parser/extern-crate-unexpected-token.rs
new file mode 100644 (file)
index 0000000..2518686
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern crte foo; //~ ERROR expected one of `crate`, `fn`, or `{`, found `crte`
diff --git a/src/test/ui/parser/extern-crate-unexpected-token.stderr b/src/test/ui/parser/extern-crate-unexpected-token.stderr
new file mode 100644 (file)
index 0000000..04c46e4
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `crate`, `fn`, or `{`, found `crte`
+  --> $DIR/extern-crate-unexpected-token.rs:11:8
+   |
+LL | extern crte foo; //~ ERROR expected one of `crate`, `fn`, or `{`, found `crte`
+   |        ^^^^ expected one of `crate`, `fn`, or `{` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/extern-expected-fn-or-brace.rs b/src/test/ui/parser/extern-expected-fn-or-brace.rs
new file mode 100644 (file)
index 0000000..21cca12
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Verifies that the expected token errors for `extern crate` are
+// raised
+
+extern "C" mod foo; //~ERROR expected one of `fn` or `{`, found `mod`
diff --git a/src/test/ui/parser/extern-expected-fn-or-brace.stderr b/src/test/ui/parser/extern-expected-fn-or-brace.stderr
new file mode 100644 (file)
index 0000000..54ab5b8
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `fn` or `{`, found `mod`
+  --> $DIR/extern-expected-fn-or-brace.rs:16:12
+   |
+LL | extern "C" mod foo; //~ERROR expected one of `fn` or `{`, found `mod`
+   |            ^^^ expected one of `fn` or `{` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/extern-foreign-crate.rs b/src/test/ui/parser/extern-foreign-crate.rs
new file mode 100644 (file)
index 0000000..9adbd87
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Verifies that the expected token errors for `extern crate` are
+// raised
+
+extern crate foo {} //~ERROR expected one of `;` or `as`, found `{`
diff --git a/src/test/ui/parser/extern-foreign-crate.stderr b/src/test/ui/parser/extern-foreign-crate.stderr
new file mode 100644 (file)
index 0000000..93eb9fd
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `;` or `as`, found `{`
+  --> $DIR/extern-foreign-crate.rs:16:18
+   |
+LL | extern crate foo {} //~ERROR expected one of `;` or `as`, found `{`
+   |                  ^ expected one of `;` or `as` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/extern-no-fn.rs b/src/test/ui/parser/extern-no-fn.rs
new file mode 100644 (file)
index 0000000..aa0dbd4
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+extern { //~ ERROR missing `fn`, `type`, or `static` for extern-item declaration
+    f();
+}
+
+fn main() {
+}
diff --git a/src/test/ui/parser/extern-no-fn.stderr b/src/test/ui/parser/extern-no-fn.stderr
new file mode 100644 (file)
index 0000000..29a7691
--- /dev/null
@@ -0,0 +1,10 @@
+error: missing `fn`, `type`, or `static` for extern-item declaration
+  --> $DIR/extern-no-fn.rs:13:9
+   |
+LL |   extern { //~ ERROR missing `fn`, `type`, or `static` for extern-item declaration
+   |  _________^
+LL | |     f();
+   | |____^ missing `fn`, `type`, or `static`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/impl-qpath.rs b/src/test/ui/parser/impl-qpath.rs
new file mode 100644 (file)
index 0000000..48dd888
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+impl <*const u8>::AssocTy {} // OK
+impl <Type as Trait>::AssocTy {} // OK
+impl <'a + Trait>::AssocTy {} // OK
+impl <<Type>::AssocTy>::AssocTy {} // OK
+
+FAIL //~ ERROR
diff --git a/src/test/ui/parser/impl-qpath.stderr b/src/test/ui/parser/impl-qpath.stderr
new file mode 100644 (file)
index 0000000..38a28f9
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!` or `::`, found `<eof>`
+  --> $DIR/impl-qpath.rs:18:1
+   |
+LL | FAIL //~ ERROR
+   | ^^^^ expected one of `!` or `::` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/import-from-path.rs b/src/test/ui/parser/import-from-path.rs
new file mode 100644 (file)
index 0000000..fbd59d2
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:expected
+use foo::{bar}::baz
diff --git a/src/test/ui/parser/import-from-path.stderr b/src/test/ui/parser/import-from-path.stderr
new file mode 100644 (file)
index 0000000..1628c12
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `;`, found `::`
+  --> $DIR/import-from-path.rs:14:15
+   |
+LL | use foo::{bar}::baz
+   |               ^^ expected `;`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/import-from-rename.rs b/src/test/ui/parser/import-from-rename.rs
new file mode 100644 (file)
index 0000000..c4d8ba2
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:expected
+
+use foo::{bar} as baz;
+
+mod foo {
+    pub fn bar() {}
+}
+
+fn main() {
+}
diff --git a/src/test/ui/parser/import-from-rename.stderr b/src/test/ui/parser/import-from-rename.stderr
new file mode 100644 (file)
index 0000000..6fdc797
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `;`, found `as`
+  --> $DIR/import-from-rename.rs:15:16
+   |
+LL | use foo::{bar} as baz;
+   |                ^^ expected `;`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/import-glob-path.rs b/src/test/ui/parser/import-glob-path.rs
new file mode 100644 (file)
index 0000000..2faf833
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:expected
+use foo::*::bar
diff --git a/src/test/ui/parser/import-glob-path.stderr b/src/test/ui/parser/import-glob-path.stderr
new file mode 100644 (file)
index 0000000..af7d0ee
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `;`, found `::`
+  --> $DIR/import-glob-path.rs:14:11
+   |
+LL | use foo::*::bar
+   |           ^^ expected `;`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/import-glob-rename.rs b/src/test/ui/parser/import-glob-rename.rs
new file mode 100644 (file)
index 0000000..7e17e1f
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:expected
+
+use foo::* as baz;
+
+mod foo {
+    pub fn bar() {}
+}
+
+fn main() {
+}
diff --git a/src/test/ui/parser/import-glob-rename.stderr b/src/test/ui/parser/import-glob-rename.stderr
new file mode 100644 (file)
index 0000000..c36a946
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `;`, found `as`
+  --> $DIR/import-glob-rename.rs:15:12
+   |
+LL | use foo::* as baz;
+   |            ^^ expected `;`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/inner-attr-after-doc-comment.rs b/src/test/ui/parser/inner-attr-after-doc-comment.rs
new file mode 100644 (file)
index 0000000..ed8342d
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+#![feature(lang_items)]
+/**
+ * My module
+ */
+
+#![recursion_limit="100"]
+//~^ ERROR an inner attribute is not permitted following an outer doc comment
+fn main() {}
diff --git a/src/test/ui/parser/inner-attr-after-doc-comment.stderr b/src/test/ui/parser/inner-attr-after-doc-comment.stderr
new file mode 100644 (file)
index 0000000..af050e6
--- /dev/null
@@ -0,0 +1,10 @@
+error: an inner attribute is not permitted following an outer doc comment
+  --> $DIR/inner-attr-after-doc-comment.rs:18:3
+   |
+LL | #![recursion_limit="100"]
+   |   ^
+   |
+   = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/inner-attr.rs b/src/test/ui/parser/inner-attr.rs
new file mode 100644 (file)
index 0000000..8cebda6
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+#[feature(lang_items)]
+
+#![recursion_limit="100"] //~ ERROR an inner attribute is not permitted following an outer attribute
+fn main() {}
diff --git a/src/test/ui/parser/inner-attr.stderr b/src/test/ui/parser/inner-attr.stderr
new file mode 100644 (file)
index 0000000..89fb5cf
--- /dev/null
@@ -0,0 +1,10 @@
+error: an inner attribute is not permitted following an outer attribute
+  --> $DIR/inner-attr.rs:15:3
+   |
+LL | #![recursion_limit="100"] //~ ERROR an inner attribute is not permitted following an outer attribute
+   |   ^
+   |
+   = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/int-literal-too-large-span.rs b/src/test/ui/parser/int-literal-too-large-span.rs
new file mode 100644 (file)
index 0000000..1af8df7
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// issue #17123
+
+fn main() {
+    9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
+    //~^ ERROR int literal is too large
+        ; // the span shouldn't point to this.
+}
diff --git a/src/test/ui/parser/int-literal-too-large-span.stderr b/src/test/ui/parser/int-literal-too-large-span.stderr
new file mode 100644 (file)
index 0000000..391cb52
--- /dev/null
@@ -0,0 +1,8 @@
+error: int literal is too large
+  --> $DIR/int-literal-too-large-span.rs:16:5
+   |
+LL |     9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-10392-2.rs b/src/test/ui/parser/issue-10392-2.rs
new file mode 100644 (file)
index 0000000..2817912
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct A { foo: isize }
+
+fn a() -> A { panic!() }
+
+fn main() {
+    let A { .., } = a(); //~ ERROR: expected `}`
+}
diff --git a/src/test/ui/parser/issue-10392-2.stderr b/src/test/ui/parser/issue-10392-2.stderr
new file mode 100644 (file)
index 0000000..41548ed
--- /dev/null
@@ -0,0 +1,12 @@
+error: expected `}`, found `,`
+  --> $DIR/issue-10392-2.rs:18:15
+   |
+LL |     let A { .., } = a(); //~ ERROR: expected `}`
+   |             --^
+   |             | |
+   |             | expected `}`
+   |             | help: remove this comma
+   |             `..` must be at the end and cannot have a trailing comma
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-10392.rs b/src/test/ui/parser/issue-10392.rs
new file mode 100644 (file)
index 0000000..9c67575
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct A { foo: isize }
+
+fn a() -> A { panic!() }
+
+fn main() {
+    let A { , } = a(); //~ ERROR: expected ident
+}
diff --git a/src/test/ui/parser/issue-10392.stderr b/src/test/ui/parser/issue-10392.stderr
new file mode 100644 (file)
index 0000000..0401fe0
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found `,`
+  --> $DIR/issue-10392.rs:18:13
+   |
+LL |     let A { , } = a(); //~ ERROR: expected ident
+   |             ^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-14303-enum.rs b/src/test/ui/parser/issue-14303-enum.rs
new file mode 100644 (file)
index 0000000..6bcf588
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+enum X<'a, T, 'b> {
+//~^ ERROR lifetime parameters must be declared prior to type parameters
+    A(&'a T)
+}
diff --git a/src/test/ui/parser/issue-14303-enum.stderr b/src/test/ui/parser/issue-14303-enum.stderr
new file mode 100644 (file)
index 0000000..7d546cb
--- /dev/null
@@ -0,0 +1,8 @@
+error: lifetime parameters must be declared prior to type parameters
+  --> $DIR/issue-14303-enum.rs:13:15
+   |
+LL | enum X<'a, T, 'b> {
+   |               ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-14303-fn-def.rs b/src/test/ui/parser/issue-14303-fn-def.rs
new file mode 100644 (file)
index 0000000..ae8e38c
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn foo<'a, T, 'b>(x: &'a T) {}
+//~^ ERROR lifetime parameters must be declared prior to type parameters
diff --git a/src/test/ui/parser/issue-14303-fn-def.stderr b/src/test/ui/parser/issue-14303-fn-def.stderr
new file mode 100644 (file)
index 0000000..c7b57f3
--- /dev/null
@@ -0,0 +1,8 @@
+error: lifetime parameters must be declared prior to type parameters
+  --> $DIR/issue-14303-fn-def.rs:13:15
+   |
+LL | fn foo<'a, T, 'b>(x: &'a T) {}
+   |               ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-14303-fncall.rs b/src/test/ui/parser/issue-14303-fncall.rs
new file mode 100644 (file)
index 0000000..80a9b3d
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    (0..4)
+    .map(|x| x * 2)
+    .collect::<Vec<'a, usize, 'b>>()
+    //~^ ERROR lifetime parameters must be declared prior to type parameters
+}
diff --git a/src/test/ui/parser/issue-14303-fncall.stderr b/src/test/ui/parser/issue-14303-fncall.stderr
new file mode 100644 (file)
index 0000000..cca23c7
--- /dev/null
@@ -0,0 +1,8 @@
+error: lifetime parameters must be declared prior to type parameters
+  --> $DIR/issue-14303-fncall.rs:16:31
+   |
+LL |     .collect::<Vec<'a, usize, 'b>>()
+   |                               ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-14303-impl.rs b/src/test/ui/parser/issue-14303-impl.rs
new file mode 100644 (file)
index 0000000..f06d5f2
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct X { x: isize }
+
+impl<'a, T, 'b> X {}
+//~^ ERROR lifetime parameters must be declared prior to type parameters
diff --git a/src/test/ui/parser/issue-14303-impl.stderr b/src/test/ui/parser/issue-14303-impl.stderr
new file mode 100644 (file)
index 0000000..0b7016e
--- /dev/null
@@ -0,0 +1,8 @@
+error: lifetime parameters must be declared prior to type parameters
+  --> $DIR/issue-14303-impl.rs:15:13
+   |
+LL | impl<'a, T, 'b> X {}
+   |             ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-14303-path.rs b/src/test/ui/parser/issue-14303-path.rs
new file mode 100644 (file)
index 0000000..f0d1fef
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
+//~^ ERROR lifetime parameters must be declared prior to type parameters
diff --git a/src/test/ui/parser/issue-14303-path.stderr b/src/test/ui/parser/issue-14303-path.stderr
new file mode 100644 (file)
index 0000000..f0a4599
--- /dev/null
@@ -0,0 +1,8 @@
+error: lifetime parameters must be declared prior to type parameters
+  --> $DIR/issue-14303-path.rs:13:37
+   |
+LL | fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
+   |                                     ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-14303-struct.rs b/src/test/ui/parser/issue-14303-struct.rs
new file mode 100644 (file)
index 0000000..5673e4f
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct X<'a, T, 'b> {
+//~^ ERROR lifetime parameters must be declared prior to type parameters
+    x: &'a T
+}
diff --git a/src/test/ui/parser/issue-14303-struct.stderr b/src/test/ui/parser/issue-14303-struct.stderr
new file mode 100644 (file)
index 0000000..4a4b678
--- /dev/null
@@ -0,0 +1,8 @@
+error: lifetime parameters must be declared prior to type parameters
+  --> $DIR/issue-14303-struct.rs:13:17
+   |
+LL | struct X<'a, T, 'b> {
+   |                 ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-14303-trait.rs b/src/test/ui/parser/issue-14303-trait.rs
new file mode 100644 (file)
index 0000000..8af5af9
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+trait Foo<'a, T, 'b> {}
+//~^ ERROR lifetime parameters must be declared prior to type parameters
diff --git a/src/test/ui/parser/issue-14303-trait.stderr b/src/test/ui/parser/issue-14303-trait.stderr
new file mode 100644 (file)
index 0000000..ab5cc56
--- /dev/null
@@ -0,0 +1,8 @@
+error: lifetime parameters must be declared prior to type parameters
+  --> $DIR/issue-14303-trait.rs:13:18
+   |
+LL | trait Foo<'a, T, 'b> {}
+   |                  ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-15914.rs b/src/test/ui/parser/issue-15914.rs
new file mode 100644 (file)
index 0000000..0b8f0ac
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let ref
+        (); //~ ERROR expected identifier, found `(`
+}
diff --git a/src/test/ui/parser/issue-15914.stderr b/src/test/ui/parser/issue-15914.stderr
new file mode 100644 (file)
index 0000000..fbf0ea1
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found `(`
+  --> $DIR/issue-15914.rs:15:9
+   |
+LL |         (); //~ ERROR expected identifier, found `(`
+   |         ^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-1655.rs b/src/test/ui/parser/issue-1655.rs
new file mode 100644 (file)
index 0000000..a044dff
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:expected `[`, found `vec`
+mod blade_runner {
+    #vec[doc(
+        brief = "Blade Runner is probably the best movie ever",
+        desc = "I like that in the world of Blade Runner it is always
+                raining, and that it's always night time. And Aliens
+                was also a really good movie.
+
+                Alien 3 was crap though."
+    )]
+}
diff --git a/src/test/ui/parser/issue-1655.stderr b/src/test/ui/parser/issue-1655.stderr
new file mode 100644 (file)
index 0000000..890400a
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `[`, found `vec`
+  --> $DIR/issue-1655.rs:15:6
+   |
+LL |     #vec[doc(
+   |      ^^^ expected `[`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-17383.rs b/src/test/ui/parser/issue-17383.rs
new file mode 100644 (file)
index 0000000..48f629f
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+enum X {
+    A =
+        b'a' //~ ERROR discriminator values can only be used with a field-less enum
+    ,
+    B(isize)
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-17383.stderr b/src/test/ui/parser/issue-17383.stderr
new file mode 100644 (file)
index 0000000..321989e
--- /dev/null
@@ -0,0 +1,8 @@
+error: discriminator values can only be used with a field-less enum
+  --> $DIR/issue-17383.rs:15:9
+   |
+LL |         b'a' //~ ERROR discriminator values can only be used with a field-less enum
+   |         ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-17718-const-mut.rs b/src/test/ui/parser/issue-17718-const-mut.rs
new file mode 100644 (file)
index 0000000..b450cb2
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+const
+mut //~ ERROR: const globals cannot be mutable
+//~^ HELP did you mean to declare a static?
+FOO: usize = 3;
+
+fn main() {
+}
diff --git a/src/test/ui/parser/issue-17718-const-mut.stderr b/src/test/ui/parser/issue-17718-const-mut.stderr
new file mode 100644 (file)
index 0000000..b294a85
--- /dev/null
@@ -0,0 +1,10 @@
+error: const globals cannot be mutable
+  --> $DIR/issue-17718-const-mut.rs:14:1
+   |
+LL | mut //~ ERROR: const globals cannot be mutable
+   | ^^^
+   |
+   = help: did you mean to declare a static?
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-17904-2.rs b/src/test/ui/parser/issue-17904-2.rs
new file mode 100644 (file)
index 0000000..3f41c0e
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+struct Bar<T> { x: T } where T: Copy //~ ERROR expected item, found `where`
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-17904-2.stderr b/src/test/ui/parser/issue-17904-2.stderr
new file mode 100644 (file)
index 0000000..65ddadb
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected item, found `where`
+  --> $DIR/issue-17904-2.rs:13:24
+   |
+LL | struct Bar<T> { x: T } where T: Copy //~ ERROR expected item, found `where`
+   |                        ^^^^^ expected item
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-17904.rs b/src/test/ui/parser/issue-17904.rs
new file mode 100644 (file)
index 0000000..a54d89f
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+struct Baz<U> where U: Eq(U); //This is parsed as the new Fn* style parenthesis syntax.
+struct Baz<U> where U: Eq(U) -> R; // Notice this parses as well.
+struct Baz<U>(U) where U: Eq; // This rightfully signals no error as well.
+struct Foo<T> where T: Copy, (T); //~ ERROR expected one of `:`, `==`, or `=`, found `;`
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-17904.stderr b/src/test/ui/parser/issue-17904.stderr
new file mode 100644 (file)
index 0000000..c783d97
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `==`, or `=`, found `;`
+  --> $DIR/issue-17904.rs:16:33
+   |
+LL | struct Foo<T> where T: Copy, (T); //~ ERROR expected one of `:`, `==`, or `=`, found `;`
+   |                                 ^ expected one of `:`, `==`, or `=` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-1802-1.rs b/src/test/ui/parser/issue-1802-1.rs
new file mode 100644 (file)
index 0000000..fc3d071
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:no valid digits found for number
+fn main() {
+    log(error, 0b);
+}
diff --git a/src/test/ui/parser/issue-1802-1.stderr b/src/test/ui/parser/issue-1802-1.stderr
new file mode 100644 (file)
index 0000000..b4ce85e
--- /dev/null
@@ -0,0 +1,8 @@
+error: no valid digits found for number
+  --> $DIR/issue-1802-1.rs:15:16
+   |
+LL |     log(error, 0b);
+   |                ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-1802-2.rs b/src/test/ui/parser/issue-1802-2.rs
new file mode 100644 (file)
index 0000000..05c5a4b
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:no valid digits found for number
+fn main() {
+    log(error, 0b_usize);
+}
diff --git a/src/test/ui/parser/issue-1802-2.stderr b/src/test/ui/parser/issue-1802-2.stderr
new file mode 100644 (file)
index 0000000..d8e6852
--- /dev/null
@@ -0,0 +1,8 @@
+error: no valid digits found for number
+  --> $DIR/issue-1802-2.rs:15:16
+   |
+LL |     log(error, 0b_usize);
+   |                ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-19096.rs b/src/test/ui/parser/issue-19096.rs
new file mode 100644 (file)
index 0000000..6ba0fb5
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let t = (42, 42);
+    t.0::<isize>; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `::`
+}
diff --git a/src/test/ui/parser/issue-19096.stderr b/src/test/ui/parser/issue-19096.stderr
new file mode 100644 (file)
index 0000000..0e99f4e
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `::`
+  --> $DIR/issue-19096.rs:15:8
+   |
+LL |     t.0::<isize>; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `::`
+   |        ^^ expected one of `.`, `;`, `?`, `}`, or an operator here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-19398.rs b/src/test/ui/parser/issue-19398.rs
new file mode 100644 (file)
index 0000000..a91d513
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+trait T {
+    extern "Rust" unsafe fn foo(); //~ ERROR expected `fn`, found `unsafe`
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-19398.stderr b/src/test/ui/parser/issue-19398.stderr
new file mode 100644 (file)
index 0000000..08957f2
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `fn`, found `unsafe`
+  --> $DIR/issue-19398.rs:14:19
+   |
+LL |     extern "Rust" unsafe fn foo(); //~ ERROR expected `fn`, found `unsafe`
+   |                   ^^^^^^ expected `fn` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-20711-2.rs b/src/test/ui/parser/issue-20711-2.rs
new file mode 100644 (file)
index 0000000..d0836d4
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+// ignore-tidy-linelength
+
+struct Foo;
+
+impl Foo {
+    fn foo() {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+} //~ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-20711-2.stderr b/src/test/ui/parser/issue-20711-2.stderr
new file mode 100644 (file)
index 0000000..ce6d6cb
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or `unsafe`, found `}`
+  --> $DIR/issue-20711-2.rs:20:1
+   |
+LL |     #[stable(feature = "rust1", since = "1.0.0")]
+   |                                                  - expected one of 10 possible tokens here
+LL | } //~ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or
+   | ^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-20711.rs b/src/test/ui/parser/issue-20711.rs
new file mode 100644 (file)
index 0000000..d944224
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+// ignore-tidy-linelength
+
+struct Foo;
+
+impl Foo {
+    #[stable(feature = "rust1", since = "1.0.0")]
+} //~ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-20711.stderr b/src/test/ui/parser/issue-20711.stderr
new file mode 100644 (file)
index 0000000..b5b5636
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or `unsafe`, found `}`
+  --> $DIR/issue-20711.rs:18:1
+   |
+LL |     #[stable(feature = "rust1", since = "1.0.0")]
+   |                                                  - expected one of 10 possible tokens here
+LL | } //~ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or
+   | ^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-21153.rs b/src/test/ui/parser/issue-21153.rs
new file mode 100644 (file)
index 0000000..b6d95ff
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+trait MyTrait<T>: Iterator { //~ ERROR missing `fn`, `type`, or `const`
+    Item = T;
+}
diff --git a/src/test/ui/parser/issue-21153.stderr b/src/test/ui/parser/issue-21153.stderr
new file mode 100644 (file)
index 0000000..47e05f1
--- /dev/null
@@ -0,0 +1,10 @@
+error: missing `fn`, `type`, or `const` for trait-item declaration
+  --> $DIR/issue-21153.rs:13:29
+   |
+LL |   trait MyTrait<T>: Iterator { //~ ERROR missing `fn`, `type`, or `const`
+   |  _____________________________^
+LL | |     Item = T;
+   | |____^ missing `fn`, `type`, or `const`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-22647.rs b/src/test/ui/parser/issue-22647.rs
new file mode 100644 (file)
index 0000000..1ace57e
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let caller<F> = |f: F|  //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `<`
+    where F: Fn() -> i32
+    {
+        let x = f();
+        println!("Y {}",x);
+        return x;
+    };
+
+    caller(bar_handler);
+}
+
+fn bar_handler() -> i32 {
+    5
+}
diff --git a/src/test/ui/parser/issue-22647.stderr b/src/test/ui/parser/issue-22647.stderr
new file mode 100644 (file)
index 0000000..8f28d8b
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `;`, `=`, or `@`, found `<`
+  --> $DIR/issue-22647.rs:12:15
+   |
+LL |     let caller<F> = |f: F|  //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `<`
+   |               ^ expected one of `:`, `;`, `=`, or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-22712.rs b/src/test/ui/parser/issue-22712.rs
new file mode 100644 (file)
index 0000000..ed936cd
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo<B> {
+    buffer: B
+}
+
+fn bar() {
+    let Foo<Vec<u8>>  //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `<`
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-22712.stderr b/src/test/ui/parser/issue-22712.stderr
new file mode 100644 (file)
index 0000000..21b67c7
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `;`, `=`, or `@`, found `<`
+  --> $DIR/issue-22712.rs:16:12
+   |
+LL |     let Foo<Vec<u8>>  //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `<`
+   |            ^ expected one of `:`, `;`, `=`, or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-2354-1.rs b/src/test/ui/parser/issue-2354-1.rs
new file mode 100644 (file)
index 0000000..f24c544
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+static foo: isize = 2; } //~ ERROR unexpected close delimiter:
diff --git a/src/test/ui/parser/issue-2354-1.stderr b/src/test/ui/parser/issue-2354-1.stderr
new file mode 100644 (file)
index 0000000..bcec78a
--- /dev/null
@@ -0,0 +1,8 @@
+error: unexpected close delimiter: `}`
+  --> $DIR/issue-2354-1.rs:13:24
+   |
+LL | static foo: isize = 2; } //~ ERROR unexpected close delimiter:
+   |                        ^ unexpected close delimiter
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-23620-invalid-escapes.rs b/src/test/ui/parser/issue-23620-invalid-escapes.rs
new file mode 100644 (file)
index 0000000..dfeaae4
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn main() {
+    let _ = b"\u{a66e}";
+    //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
+
+    let _ = b'\u{a66e}';
+    //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
+
+    let _ = b'\u';
+    //~^ ERROR incorrect unicode escape sequence
+    //~^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
+
+    let _ = b'\x5';
+    //~^ ERROR numeric character escape is too short
+
+    let _ = b'\xxy';
+    //~^ ERROR invalid character in numeric character escape: x
+    //~^^ ERROR invalid character in numeric character escape: y
+
+    let _ = '\x5';
+    //~^ ERROR numeric character escape is too short
+
+    let _ = '\xxy';
+    //~^ ERROR invalid character in numeric character escape: x
+    //~^^ ERROR invalid character in numeric character escape: y
+
+    let _ = b"\u{a4a4} \xf \u";
+    //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
+    //~^^ ERROR invalid character in numeric character escape:
+    //~^^^ ERROR incorrect unicode escape sequence
+    //~^^^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
+
+    let _ = "\xf \u";
+    //~^ ERROR invalid character in numeric character escape:
+    //~^^ ERROR form of character escape may only be used with characters in the range [\x00-\x7f]
+    //~^^^ ERROR incorrect unicode escape sequence
+}
diff --git a/src/test/ui/parser/issue-23620-invalid-escapes.stderr b/src/test/ui/parser/issue-23620-invalid-escapes.stderr
new file mode 100644 (file)
index 0000000..a46bcb0
--- /dev/null
@@ -0,0 +1,122 @@
+error: unicode escape sequences cannot be used as a byte or in a byte string
+  --> $DIR/issue-23620-invalid-escapes.rs:14:15
+   |
+LL |     let _ = b"/u{a66e}";
+   |               ^^^^^^^^
+
+error: unicode escape sequences cannot be used as a byte or in a byte string
+  --> $DIR/issue-23620-invalid-escapes.rs:17:15
+   |
+LL |     let _ = b'/u{a66e}';
+   |               ^^^^^^^^
+
+error: incorrect unicode escape sequence
+  --> $DIR/issue-23620-invalid-escapes.rs:20:15
+   |
+LL |     let _ = b'/u';
+   |               ^^
+   |
+help: format of unicode escape sequences is `/u{…}`
+  --> $DIR/issue-23620-invalid-escapes.rs:20:15
+   |
+LL |     let _ = b'/u';
+   |               ^^
+
+error: unicode escape sequences cannot be used as a byte or in a byte string
+  --> $DIR/issue-23620-invalid-escapes.rs:20:15
+   |
+LL |     let _ = b'/u';
+   |               ^^
+
+error: numeric character escape is too short
+  --> $DIR/issue-23620-invalid-escapes.rs:24:17
+   |
+LL |     let _ = b'/x5';
+   |                 ^
+
+error: invalid character in numeric character escape: x
+  --> $DIR/issue-23620-invalid-escapes.rs:27:17
+   |
+LL |     let _ = b'/xxy';
+   |                 ^
+
+error: invalid character in numeric character escape: y
+  --> $DIR/issue-23620-invalid-escapes.rs:27:18
+   |
+LL |     let _ = b'/xxy';
+   |                  ^
+
+error: numeric character escape is too short
+  --> $DIR/issue-23620-invalid-escapes.rs:31:16
+   |
+LL |     let _ = '/x5';
+   |                ^
+
+error: invalid character in numeric character escape: x
+  --> $DIR/issue-23620-invalid-escapes.rs:34:16
+   |
+LL |     let _ = '/xxy';
+   |                ^
+
+error: invalid character in numeric character escape: y
+  --> $DIR/issue-23620-invalid-escapes.rs:34:17
+   |
+LL |     let _ = '/xxy';
+   |                 ^
+
+error: unicode escape sequences cannot be used as a byte or in a byte string
+  --> $DIR/issue-23620-invalid-escapes.rs:38:15
+   |
+LL |     let _ = b"/u{a4a4} /xf /u";
+   |               ^^^^^^^^
+
+error: invalid character in numeric character escape:  
+  --> $DIR/issue-23620-invalid-escapes.rs:38:27
+   |
+LL |     let _ = b"/u{a4a4} /xf /u";
+   |                           ^
+
+error: incorrect unicode escape sequence
+  --> $DIR/issue-23620-invalid-escapes.rs:38:28
+   |
+LL |     let _ = b"/u{a4a4} /xf /u";
+   |                            ^^
+   |
+help: format of unicode escape sequences is `/u{…}`
+  --> $DIR/issue-23620-invalid-escapes.rs:38:28
+   |
+LL |     let _ = b"/u{a4a4} /xf /u";
+   |                            ^^
+
+error: unicode escape sequences cannot be used as a byte or in a byte string
+  --> $DIR/issue-23620-invalid-escapes.rs:38:28
+   |
+LL |     let _ = b"/u{a4a4} /xf /u";
+   |                            ^^
+
+error: invalid character in numeric character escape:  
+  --> $DIR/issue-23620-invalid-escapes.rs:44:17
+   |
+LL |     let _ = "/xf /u";
+   |                 ^
+
+error: this form of character escape may only be used with characters in the range [/x00-/x7f]
+  --> $DIR/issue-23620-invalid-escapes.rs:44:16
+   |
+LL |     let _ = "/xf /u";
+   |                ^^
+
+error: incorrect unicode escape sequence
+  --> $DIR/issue-23620-invalid-escapes.rs:44:18
+   |
+LL |     let _ = "/xf /u";
+   |                  ^^
+   |
+help: format of unicode escape sequences is `/u{…}`
+  --> $DIR/issue-23620-invalid-escapes.rs:44:18
+   |
+LL |     let _ = "/xf /u";
+   |                  ^^
+
+error: aborting due to 17 previous errors
+
diff --git a/src/test/ui/parser/issue-24197.rs b/src/test/ui/parser/issue-24197.rs
new file mode 100644 (file)
index 0000000..37d6218
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let buf[0] = 0; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `[`
+}
diff --git a/src/test/ui/parser/issue-24197.stderr b/src/test/ui/parser/issue-24197.stderr
new file mode 100644 (file)
index 0000000..af382a2
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `;`, `=`, or `@`, found `[`
+  --> $DIR/issue-24197.rs:12:12
+   |
+LL |     let buf[0] = 0; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `[`
+   |            ^ expected one of `:`, `;`, `=`, or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-24375.rs b/src/test/ui/parser/issue-24375.rs
new file mode 100644 (file)
index 0000000..8723423
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+static tmp : [&'static str; 2]  = ["hello", "he"];
+
+fn main() {
+    let z = "hello";
+    match z {
+        tmp[0] => {} //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `[`
+        _ => {}
+    }
+}
diff --git a/src/test/ui/parser/issue-24375.stderr b/src/test/ui/parser/issue-24375.stderr
new file mode 100644 (file)
index 0000000..7d82e13
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `=>`, `@`, `if`, or `|`, found `[`
+  --> $DIR/issue-24375.rs:16:12
+   |
+LL |         tmp[0] => {} //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `[`
+   |            ^ expected one of `=>`, `@`, `if`, or `|` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-24780.rs b/src/test/ui/parser/issue-24780.rs
new file mode 100644 (file)
index 0000000..6fd4ee3
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Verify that '>' is not both expected and found at the same time, as it used
+// to happen in #24780. For example, following should be an error:
+// expected one of ..., `>`, ... found `>`
+//
+// compile-flags: -Z parse-only
+
+fn foo() -> Vec<usize>> {
+    //~^ ERROR expected one of `!`, `+`, `::`, `where`, or `{`, found `>`
+    Vec::new()
+}
diff --git a/src/test/ui/parser/issue-24780.stderr b/src/test/ui/parser/issue-24780.stderr
new file mode 100644 (file)
index 0000000..01f110e
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!`, `+`, `::`, `where`, or `{`, found `>`
+  --> $DIR/issue-24780.rs:17:23
+   |
+LL | fn foo() -> Vec<usize>> {
+   |                       ^ expected one of `!`, `+`, `::`, `where`, or `{` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-27255.rs b/src/test/ui/parser/issue-27255.rs
new file mode 100644 (file)
index 0000000..a751c4a
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+impl A .. {} //~ ERROR
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-27255.stderr b/src/test/ui/parser/issue-27255.stderr
new file mode 100644 (file)
index 0000000..9caa608
--- /dev/null
@@ -0,0 +1,8 @@
+error: missing `for` in a trait impl
+  --> $DIR/issue-27255.rs:13:7
+   |
+LL | impl A .. {} //~ ERROR
+   |       ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-30318.rs b/src/test/ui/parser/issue-30318.rs
new file mode 100644 (file)
index 0000000..9ea0bb7
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn foo() { }
+
+//! Misplaced comment...
+//~^ ERROR expected outer doc comment
+//~| NOTE inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
+
+fn main() { }
diff --git a/src/test/ui/parser/issue-30318.stderr b/src/test/ui/parser/issue-30318.stderr
new file mode 100644 (file)
index 0000000..778a584
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected outer doc comment
+  --> $DIR/issue-30318.rs:15:1
+   |
+LL | //! Misplaced comment...
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-3036.rs b/src/test/ui/parser/issue-3036.rs
new file mode 100644 (file)
index 0000000..229b121
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Testing that semicolon tokens are printed correctly in errors
+
+fn main()
+{
+    let x = 3
+} //~ ERROR: expected one of `.`, `;`, `?`, or an operator, found `}`
diff --git a/src/test/ui/parser/issue-3036.stderr b/src/test/ui/parser/issue-3036.stderr
new file mode 100644 (file)
index 0000000..e0e3983
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `.`, `;`, `?`, or an operator, found `}`
+  --> $DIR/issue-3036.rs:18:1
+   |
+LL |     let x = 3
+   |              - expected one of `.`, `;`, `?`, or an operator here
+LL | } //~ ERROR: expected one of `.`, `;`, `?`, or an operator, found `}`
+   | ^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-32214.rs b/src/test/ui/parser/issue-32214.rs
new file mode 100644 (file)
index 0000000..9e20009
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+pub fn test<W, I: Iterator<Item=(), W> >() {}
+//~^ ERROR type parameters must be declared prior to associated type bindings
+
+fn main() { }
diff --git a/src/test/ui/parser/issue-32214.stderr b/src/test/ui/parser/issue-32214.stderr
new file mode 100644 (file)
index 0000000..cce6cf6
--- /dev/null
@@ -0,0 +1,8 @@
+error: type parameters must be declared prior to associated type bindings
+  --> $DIR/issue-32214.rs:13:37
+   |
+LL | pub fn test<W, I: Iterator<Item=(), W> >() {}
+   |                                     ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-32446.rs b/src/test/ui/parser/issue-32446.rs
new file mode 100644 (file)
index 0000000..90b9a4a
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {}
+
+// This used to end up in an infite loop trying to bump past EOF.
+trait T { ... } //~ ERROR
diff --git a/src/test/ui/parser/issue-32446.stderr b/src/test/ui/parser/issue-32446.stderr
new file mode 100644 (file)
index 0000000..608a9a6
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `...`
+  --> $DIR/issue-32446.rs:16:11
+   |
+LL | trait T { ... } //~ ERROR
+   |           ^^^ expected one of 7 possible tokens here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-32501.rs b/src/test/ui/parser/issue-32501.rs
new file mode 100644 (file)
index 0000000..21db2f5
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let a = 0;
+    let _b = 0;
+    let _ = 0;
+    let mut b = 0;
+    let mut _b = 0;
+    let mut _ = 0; //~ ERROR expected identifier, found reserved identifier `_`
+}
diff --git a/src/test/ui/parser/issue-32501.stderr b/src/test/ui/parser/issue-32501.stderr
new file mode 100644 (file)
index 0000000..6836509
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/issue-32501.rs:19:13
+   |
+LL |     let mut _ = 0; //~ ERROR expected identifier, found reserved identifier `_`
+   |             ^ expected identifier, found reserved identifier
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-32505.rs b/src/test/ui/parser/issue-32505.rs
new file mode 100644 (file)
index 0000000..246941f
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+pub fn test() {
+    foo(|_|) //~ ERROR expected expression, found `)`
+}
+
+fn main() { }
diff --git a/src/test/ui/parser/issue-32505.stderr b/src/test/ui/parser/issue-32505.stderr
new file mode 100644 (file)
index 0000000..e89c907
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected expression, found `)`
+  --> $DIR/issue-32505.rs:14:12
+   |
+LL |     foo(|_|) //~ ERROR expected expression, found `)`
+   |            ^ expected expression
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-33262.rs b/src/test/ui/parser/issue-33262.rs
new file mode 100644 (file)
index 0000000..d6bbfdc
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Issue #33262
+
+pub fn main() {
+    for i in 0..a as { }
+    //~^ ERROR expected type, found `{`
+}
diff --git a/src/test/ui/parser/issue-33262.stderr b/src/test/ui/parser/issue-33262.stderr
new file mode 100644 (file)
index 0000000..184dacd
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected type, found `{`
+  --> $DIR/issue-33262.rs:16:22
+   |
+LL |     for i in 0..a as { }
+   |                      ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-33413.rs b/src/test/ui/parser/issue-33413.rs
new file mode 100644 (file)
index 0000000..25ae7b4
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+impl S {
+    fn f(*, a: u8) -> u8 {} //~ ERROR expected pattern, found `*`
+}
diff --git a/src/test/ui/parser/issue-33413.stderr b/src/test/ui/parser/issue-33413.stderr
new file mode 100644 (file)
index 0000000..189ace7
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found `*`
+  --> $DIR/issue-33413.rs:14:10
+   |
+LL |     fn f(*, a: u8) -> u8 {} //~ ERROR expected pattern, found `*`
+   |          ^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-33455.rs b/src/test/ui/parser/issue-33455.rs
new file mode 100644 (file)
index 0000000..9607033
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use foo.bar; //~ ERROR expected one of `::`, `;`, or `as`, found `.`
diff --git a/src/test/ui/parser/issue-33455.stderr b/src/test/ui/parser/issue-33455.stderr
new file mode 100644 (file)
index 0000000..7f85464
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `::`, `;`, or `as`, found `.`
+  --> $DIR/issue-33455.rs:11:8
+   |
+LL | use foo.bar; //~ ERROR expected one of `::`, `;`, or `as`, found `.`
+   |        ^ expected one of `::`, `;`, or `as` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-33569.rs b/src/test/ui/parser/issue-33569.rs
new file mode 100644 (file)
index 0000000..15d4917
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z no-analysis
+
+macro_rules! foo {
+    { $+ } => { //~ ERROR expected identifier, found `+`
+                //~^ ERROR missing fragment specifier
+        $(x)(y) //~ ERROR expected `*` or `+`
+    }
+}
+
+foo!();
diff --git a/src/test/ui/parser/issue-33569.stderr b/src/test/ui/parser/issue-33569.stderr
new file mode 100644 (file)
index 0000000..1bcd3f5
--- /dev/null
@@ -0,0 +1,20 @@
+error: expected identifier, found `+`
+  --> $DIR/issue-33569.rs:14:8
+   |
+LL |     { $+ } => { //~ ERROR expected identifier, found `+`
+   |        ^
+
+error: expected `*` or `+`
+  --> $DIR/issue-33569.rs:16:13
+   |
+LL |         $(x)(y) //~ ERROR expected `*` or `+`
+   |             ^^^
+
+error: missing fragment specifier
+  --> $DIR/issue-33569.rs:14:8
+   |
+LL |     { $+ } => { //~ ERROR expected identifier, found `+`
+   |        ^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/parser/issue-37113.rs b/src/test/ui/parser/issue-37113.rs
new file mode 100644 (file)
index 0000000..14c6f39
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+macro_rules! test_macro {
+    ( $( $t:ty ),* $(),*) => {
+        enum SomeEnum {
+            $( $t, )* //~ ERROR expected identifier, found `String`
+        };
+    };
+}
+
+fn main() {
+    test_macro!(String,);
+}
diff --git a/src/test/ui/parser/issue-37113.stderr b/src/test/ui/parser/issue-37113.stderr
new file mode 100644 (file)
index 0000000..1e8f017
--- /dev/null
@@ -0,0 +1,11 @@
+error: expected identifier, found `String`
+  --> $DIR/issue-37113.rs:14:16
+   |
+LL |             $( $t, )* //~ ERROR expected identifier, found `String`
+   |                ^^ expected identifier
+...
+LL |     test_macro!(String,);
+   |     --------------------- in this macro invocation
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-37234.rs b/src/test/ui/parser/issue-37234.rs
new file mode 100644 (file)
index 0000000..93a1468
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+macro_rules! failed {
+    () => {{
+        let x = 5 ""; //~ ERROR found `""`
+    }}
+}
+
+fn main() {
+    failed!();
+}
diff --git a/src/test/ui/parser/issue-37234.stderr b/src/test/ui/parser/issue-37234.stderr
new file mode 100644 (file)
index 0000000..28dd713
--- /dev/null
@@ -0,0 +1,11 @@
+error: expected one of `.`, `;`, `?`, or an operator, found `""`
+  --> $DIR/issue-37234.rs:13:19
+   |
+LL |         let x = 5 ""; //~ ERROR found `""`
+   |                   ^^ expected one of `.`, `;`, `?`, or an operator here
+...
+LL |     failed!();
+   |     ---------- in this macro invocation
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-43692.rs b/src/test/ui/parser/issue-43692.rs
new file mode 100644 (file)
index 0000000..eb5d050
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    '\u{_10FFFF}'; //~ ERROR invalid start of unicode escape
+}
diff --git a/src/test/ui/parser/issue-43692.stderr b/src/test/ui/parser/issue-43692.stderr
new file mode 100644 (file)
index 0000000..c5ea50b
--- /dev/null
@@ -0,0 +1,8 @@
+error: invalid start of unicode escape
+  --> $DIR/issue-43692.rs:14:9
+   |
+LL |     '/u{_10FFFF}'; //~ ERROR invalid start of unicode escape
+   |         ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-5544-a.rs b/src/test/ui/parser/issue-5544-a.rs
new file mode 100644 (file)
index 0000000..cf1500e
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let __isize = 340282366920938463463374607431768211456; // 2^128
+    //~^ ERROR int literal is too large
+}
diff --git a/src/test/ui/parser/issue-5544-a.stderr b/src/test/ui/parser/issue-5544-a.stderr
new file mode 100644 (file)
index 0000000..7fd3bc9
--- /dev/null
@@ -0,0 +1,8 @@
+error: int literal is too large
+  --> $DIR/issue-5544-a.rs:14:19
+   |
+LL |     let __isize = 340282366920938463463374607431768211456; // 2^128
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-5544-b.rs b/src/test/ui/parser/issue-5544-b.rs
new file mode 100644 (file)
index 0000000..8c0b674
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let __isize = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ff;
+    //~^ ERROR int literal is too large
+}
diff --git a/src/test/ui/parser/issue-5544-b.stderr b/src/test/ui/parser/issue-5544-b.stderr
new file mode 100644 (file)
index 0000000..338b39b
--- /dev/null
@@ -0,0 +1,8 @@
+error: int literal is too large
+  --> $DIR/issue-5544-b.rs:14:19
+   |
+LL |     let __isize = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ff;
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-5806.rs b/src/test/ui/parser/issue-5806.rs
new file mode 100644 (file)
index 0000000..f6606a5
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ignore-windows
+// ignore-freebsd
+// ignore-openbsd
+// ignore-netbsd
+// ignore-bitrig
+
+// compile-flags: -Z parse-only
+
+#[path = "../compile-fail"]
+mod foo; //~ ERROR: a directory
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-6610.rs b/src/test/ui/parser/issue-6610.rs
new file mode 100644 (file)
index 0000000..f5113ef
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+trait Foo { fn a() } //~ ERROR expected `;` or `{`, found `}`
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-6610.stderr b/src/test/ui/parser/issue-6610.stderr
new file mode 100644 (file)
index 0000000..d6013b3
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `;` or `{`, found `}`
+  --> $DIR/issue-6610.rs:13:20
+   |
+LL | trait Foo { fn a() } //~ ERROR expected `;` or `{`, found `}`
+   |                    ^ expected `;` or `{`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-8537.rs b/src/test/ui/parser/issue-8537.rs
new file mode 100644 (file)
index 0000000..e152a36
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+pub extern
+  "invalid-ab_isize" //~ ERROR invalid ABI
+fn foo() {}
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-8537.stderr b/src/test/ui/parser/issue-8537.stderr
new file mode 100644 (file)
index 0000000..0013f97
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0703]: invalid ABI: found `invalid-ab_isize`
+  --> $DIR/issue-8537.rs:14:3
+   |
+LL |   "invalid-ab_isize" //~ ERROR invalid ABI
+   |   ^^^^^^^^^^^^^^^^^^ invalid ABI
+   |
+   = help: valid ABIs: cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0703`.
diff --git a/src/test/ui/parser/keyword-abstract.rs b/src/test/ui/parser/keyword-abstract.rs
new file mode 100644 (file)
index 0000000..2db5a5c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let abstract = (); //~ ERROR expected pattern, found reserved keyword `abstract`
+}
diff --git a/src/test/ui/parser/keyword-abstract.stderr b/src/test/ui/parser/keyword-abstract.stderr
new file mode 100644 (file)
index 0000000..1d3ed0d
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found reserved keyword `abstract`
+  --> $DIR/keyword-abstract.rs:14:9
+   |
+LL |     let abstract = (); //~ ERROR expected pattern, found reserved keyword `abstract`
+   |         ^^^^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-as-as-identifier.rs b/src/test/ui/parser/keyword-as-as-identifier.rs
new file mode 100644 (file)
index 0000000..c6070c4
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py as'
+
+fn main() {
+    let as = "foo"; //~ error: expected pattern, found keyword `as`
+}
diff --git a/src/test/ui/parser/keyword-as-as-identifier.stderr b/src/test/ui/parser/keyword-as-as-identifier.stderr
new file mode 100644 (file)
index 0000000..a6295c2
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `as`
+  --> $DIR/keyword-as-as-identifier.rs:16:9
+   |
+LL |     let as = "foo"; //~ error: expected pattern, found keyword `as`
+   |         ^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-box-as-identifier.rs b/src/test/ui/parser/keyword-box-as-identifier.rs
new file mode 100644 (file)
index 0000000..b5abe14
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let box = "foo"; //~ error: expected pattern, found `=`
+}
diff --git a/src/test/ui/parser/keyword-box-as-identifier.stderr b/src/test/ui/parser/keyword-box-as-identifier.stderr
new file mode 100644 (file)
index 0000000..4e9984c
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found `=`
+  --> $DIR/keyword-box-as-identifier.rs:14:13
+   |
+LL |     let box = "foo"; //~ error: expected pattern, found `=`
+   |             ^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-break-as-identifier.rs b/src/test/ui/parser/keyword-break-as-identifier.rs
new file mode 100644 (file)
index 0000000..65c775f
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py break'
+
+fn main() {
+    let break = "foo"; //~ error: expected pattern, found keyword `break`
+}
diff --git a/src/test/ui/parser/keyword-break-as-identifier.stderr b/src/test/ui/parser/keyword-break-as-identifier.stderr
new file mode 100644 (file)
index 0000000..9e2d2c9
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `break`
+  --> $DIR/keyword-break-as-identifier.rs:16:9
+   |
+LL |     let break = "foo"; //~ error: expected pattern, found keyword `break`
+   |         ^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-const-as-identifier.rs b/src/test/ui/parser/keyword-const-as-identifier.rs
new file mode 100644 (file)
index 0000000..6ecf149
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py const'
+
+fn main() {
+    let const = "foo"; //~ error: expected pattern, found keyword `const`
+}
diff --git a/src/test/ui/parser/keyword-const-as-identifier.stderr b/src/test/ui/parser/keyword-const-as-identifier.stderr
new file mode 100644 (file)
index 0000000..d662fef
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `const`
+  --> $DIR/keyword-const-as-identifier.rs:16:9
+   |
+LL |     let const = "foo"; //~ error: expected pattern, found keyword `const`
+   |         ^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-continue-as-identifier.rs b/src/test/ui/parser/keyword-continue-as-identifier.rs
new file mode 100644 (file)
index 0000000..87377ac
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py continue'
+
+fn main() {
+    let continue = "foo"; //~ error: expected pattern, found keyword `continue`
+}
diff --git a/src/test/ui/parser/keyword-continue-as-identifier.stderr b/src/test/ui/parser/keyword-continue-as-identifier.stderr
new file mode 100644 (file)
index 0000000..52409c1
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `continue`
+  --> $DIR/keyword-continue-as-identifier.rs:16:9
+   |
+LL |     let continue = "foo"; //~ error: expected pattern, found keyword `continue`
+   |         ^^^^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-else-as-identifier.rs b/src/test/ui/parser/keyword-else-as-identifier.rs
new file mode 100644 (file)
index 0000000..6878f7f
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py else'
+
+fn main() {
+    let else = "foo"; //~ error: expected pattern, found keyword `else`
+}
diff --git a/src/test/ui/parser/keyword-else-as-identifier.stderr b/src/test/ui/parser/keyword-else-as-identifier.stderr
new file mode 100644 (file)
index 0000000..ab075a5
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `else`
+  --> $DIR/keyword-else-as-identifier.rs:16:9
+   |
+LL |     let else = "foo"; //~ error: expected pattern, found keyword `else`
+   |         ^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-enum-as-identifier.rs b/src/test/ui/parser/keyword-enum-as-identifier.rs
new file mode 100644 (file)
index 0000000..042a02d
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py enum'
+
+fn main() {
+    let enum = "foo"; //~ error: expected pattern, found keyword `enum`
+}
diff --git a/src/test/ui/parser/keyword-enum-as-identifier.stderr b/src/test/ui/parser/keyword-enum-as-identifier.stderr
new file mode 100644 (file)
index 0000000..f837013
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `enum`
+  --> $DIR/keyword-enum-as-identifier.rs:16:9
+   |
+LL |     let enum = "foo"; //~ error: expected pattern, found keyword `enum`
+   |         ^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-final.rs b/src/test/ui/parser/keyword-final.rs
new file mode 100644 (file)
index 0000000..be29a73
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let final = (); //~ ERROR expected pattern, found reserved keyword `final`
+}
diff --git a/src/test/ui/parser/keyword-final.stderr b/src/test/ui/parser/keyword-final.stderr
new file mode 100644 (file)
index 0000000..8ace453
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found reserved keyword `final`
+  --> $DIR/keyword-final.rs:14:9
+   |
+LL |     let final = (); //~ ERROR expected pattern, found reserved keyword `final`
+   |         ^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-fn-as-identifier.rs b/src/test/ui/parser/keyword-fn-as-identifier.rs
new file mode 100644 (file)
index 0000000..0d454f6
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py fn'
+
+fn main() {
+    let fn = "foo"; //~ error: expected pattern, found keyword `fn`
+}
diff --git a/src/test/ui/parser/keyword-fn-as-identifier.stderr b/src/test/ui/parser/keyword-fn-as-identifier.stderr
new file mode 100644 (file)
index 0000000..bf63775
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `fn`
+  --> $DIR/keyword-fn-as-identifier.rs:16:9
+   |
+LL |     let fn = "foo"; //~ error: expected pattern, found keyword `fn`
+   |         ^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-for-as-identifier.rs b/src/test/ui/parser/keyword-for-as-identifier.rs
new file mode 100644 (file)
index 0000000..d341669
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py for'
+
+fn main() {
+    let for = "foo"; //~ error: expected pattern, found keyword `for`
+}
diff --git a/src/test/ui/parser/keyword-for-as-identifier.stderr b/src/test/ui/parser/keyword-for-as-identifier.stderr
new file mode 100644 (file)
index 0000000..ed28f77
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `for`
+  --> $DIR/keyword-for-as-identifier.rs:16:9
+   |
+LL |     let for = "foo"; //~ error: expected pattern, found keyword `for`
+   |         ^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-if-as-identifier.rs b/src/test/ui/parser/keyword-if-as-identifier.rs
new file mode 100644 (file)
index 0000000..417e404
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py if'
+
+fn main() {
+    let if = "foo"; //~ error: expected pattern, found keyword `if`
+}
diff --git a/src/test/ui/parser/keyword-if-as-identifier.stderr b/src/test/ui/parser/keyword-if-as-identifier.stderr
new file mode 100644 (file)
index 0000000..bfb7ab7
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `if`
+  --> $DIR/keyword-if-as-identifier.rs:16:9
+   |
+LL |     let if = "foo"; //~ error: expected pattern, found keyword `if`
+   |         ^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-impl-as-identifier.rs b/src/test/ui/parser/keyword-impl-as-identifier.rs
new file mode 100644 (file)
index 0000000..fe97c19
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py impl'
+
+fn main() {
+    let impl = "foo"; //~ error: expected pattern, found keyword `impl`
+}
diff --git a/src/test/ui/parser/keyword-impl-as-identifier.stderr b/src/test/ui/parser/keyword-impl-as-identifier.stderr
new file mode 100644 (file)
index 0000000..43f7072
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `impl`
+  --> $DIR/keyword-impl-as-identifier.rs:16:9
+   |
+LL |     let impl = "foo"; //~ error: expected pattern, found keyword `impl`
+   |         ^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-in-as-identifier.rs b/src/test/ui/parser/keyword-in-as-identifier.rs
new file mode 100644 (file)
index 0000000..c0f9396
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py in'
+
+fn main() {
+    let in = "foo"; //~ error: expected pattern, found keyword `in`
+}
diff --git a/src/test/ui/parser/keyword-in-as-identifier.stderr b/src/test/ui/parser/keyword-in-as-identifier.stderr
new file mode 100644 (file)
index 0000000..29bb5f4
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `in`
+  --> $DIR/keyword-in-as-identifier.rs:16:9
+   |
+LL |     let in = "foo"; //~ error: expected pattern, found keyword `in`
+   |         ^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-let-as-identifier.rs b/src/test/ui/parser/keyword-let-as-identifier.rs
new file mode 100644 (file)
index 0000000..5d6dca7
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py let'
+
+fn main() {
+    let let = "foo"; //~ error: expected pattern, found keyword `let`
+}
diff --git a/src/test/ui/parser/keyword-let-as-identifier.stderr b/src/test/ui/parser/keyword-let-as-identifier.stderr
new file mode 100644 (file)
index 0000000..7a28aee
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `let`
+  --> $DIR/keyword-let-as-identifier.rs:16:9
+   |
+LL |     let let = "foo"; //~ error: expected pattern, found keyword `let`
+   |         ^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-loop-as-identifier.rs b/src/test/ui/parser/keyword-loop-as-identifier.rs
new file mode 100644 (file)
index 0000000..7c3d11d
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py loop'
+
+fn main() {
+    let loop = "foo"; //~ error: expected pattern, found keyword `loop`
+}
diff --git a/src/test/ui/parser/keyword-loop-as-identifier.stderr b/src/test/ui/parser/keyword-loop-as-identifier.stderr
new file mode 100644 (file)
index 0000000..1dafe46
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `loop`
+  --> $DIR/keyword-loop-as-identifier.rs:16:9
+   |
+LL |     let loop = "foo"; //~ error: expected pattern, found keyword `loop`
+   |         ^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-match-as-identifier.rs b/src/test/ui/parser/keyword-match-as-identifier.rs
new file mode 100644 (file)
index 0000000..7c727f4
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py match'
+
+fn main() {
+    let match = "foo"; //~ error: expected pattern, found keyword `match`
+}
diff --git a/src/test/ui/parser/keyword-match-as-identifier.stderr b/src/test/ui/parser/keyword-match-as-identifier.stderr
new file mode 100644 (file)
index 0000000..b3b542f
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `match`
+  --> $DIR/keyword-match-as-identifier.rs:16:9
+   |
+LL |     let match = "foo"; //~ error: expected pattern, found keyword `match`
+   |         ^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-mod-as-identifier.rs b/src/test/ui/parser/keyword-mod-as-identifier.rs
new file mode 100644 (file)
index 0000000..85b4cc2
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py mod'
+
+fn main() {
+    let mod = "foo"; //~ error: expected pattern, found keyword `mod`
+}
diff --git a/src/test/ui/parser/keyword-mod-as-identifier.stderr b/src/test/ui/parser/keyword-mod-as-identifier.stderr
new file mode 100644 (file)
index 0000000..113f708
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `mod`
+  --> $DIR/keyword-mod-as-identifier.rs:16:9
+   |
+LL |     let mod = "foo"; //~ error: expected pattern, found keyword `mod`
+   |         ^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-move-as-identifier.rs b/src/test/ui/parser/keyword-move-as-identifier.rs
new file mode 100644 (file)
index 0000000..b785ac0
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py move'
+
+fn main() {
+    let move = "foo"; //~ error: expected pattern, found keyword `move`
+}
diff --git a/src/test/ui/parser/keyword-move-as-identifier.stderr b/src/test/ui/parser/keyword-move-as-identifier.stderr
new file mode 100644 (file)
index 0000000..21b66fb
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `move`
+  --> $DIR/keyword-move-as-identifier.rs:16:9
+   |
+LL |     let move = "foo"; //~ error: expected pattern, found keyword `move`
+   |         ^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-mut-as-identifier.rs b/src/test/ui/parser/keyword-mut-as-identifier.rs
new file mode 100644 (file)
index 0000000..0aeca9b
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let mut = "foo"; //~ error: expected identifier, found `=`
+}
diff --git a/src/test/ui/parser/keyword-mut-as-identifier.stderr b/src/test/ui/parser/keyword-mut-as-identifier.stderr
new file mode 100644 (file)
index 0000000..bb153cf
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found `=`
+  --> $DIR/keyword-mut-as-identifier.rs:14:13
+   |
+LL |     let mut = "foo"; //~ error: expected identifier, found `=`
+   |             ^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-override.rs b/src/test/ui/parser/keyword-override.rs
new file mode 100644 (file)
index 0000000..6033376
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let override = (); //~ ERROR expected pattern, found reserved keyword `override`
+}
diff --git a/src/test/ui/parser/keyword-override.stderr b/src/test/ui/parser/keyword-override.stderr
new file mode 100644 (file)
index 0000000..ce1d4f2
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found reserved keyword `override`
+  --> $DIR/keyword-override.rs:14:9
+   |
+LL |     let override = (); //~ ERROR expected pattern, found reserved keyword `override`
+   |         ^^^^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-pub-as-identifier.rs b/src/test/ui/parser/keyword-pub-as-identifier.rs
new file mode 100644 (file)
index 0000000..9233728
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py pub'
+
+fn main() {
+    let pub = "foo"; //~ error: expected pattern, found keyword `pub`
+}
diff --git a/src/test/ui/parser/keyword-pub-as-identifier.stderr b/src/test/ui/parser/keyword-pub-as-identifier.stderr
new file mode 100644 (file)
index 0000000..b52982d
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `pub`
+  --> $DIR/keyword-pub-as-identifier.rs:16:9
+   |
+LL |     let pub = "foo"; //~ error: expected pattern, found keyword `pub`
+   |         ^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-ref-as-identifier.rs b/src/test/ui/parser/keyword-ref-as-identifier.rs
new file mode 100644 (file)
index 0000000..a689c4e
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let ref = "foo"; //~ error: expected identifier, found `=`
+}
diff --git a/src/test/ui/parser/keyword-ref-as-identifier.stderr b/src/test/ui/parser/keyword-ref-as-identifier.stderr
new file mode 100644 (file)
index 0000000..34063c8
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found `=`
+  --> $DIR/keyword-ref-as-identifier.rs:14:13
+   |
+LL |     let ref = "foo"; //~ error: expected identifier, found `=`
+   |             ^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-return-as-identifier.rs b/src/test/ui/parser/keyword-return-as-identifier.rs
new file mode 100644 (file)
index 0000000..bcf7f13
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py return'
+
+fn main() {
+    let return = "foo"; //~ error: expected pattern, found keyword `return`
+}
diff --git a/src/test/ui/parser/keyword-return-as-identifier.stderr b/src/test/ui/parser/keyword-return-as-identifier.stderr
new file mode 100644 (file)
index 0000000..8d8b2aa
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `return`
+  --> $DIR/keyword-return-as-identifier.rs:16:9
+   |
+LL |     let return = "foo"; //~ error: expected pattern, found keyword `return`
+   |         ^^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-static-as-identifier.rs b/src/test/ui/parser/keyword-static-as-identifier.rs
new file mode 100644 (file)
index 0000000..7932622
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py static'
+
+fn main() {
+    let static = "foo"; //~ error: expected pattern, found keyword `static`
+}
diff --git a/src/test/ui/parser/keyword-static-as-identifier.stderr b/src/test/ui/parser/keyword-static-as-identifier.stderr
new file mode 100644 (file)
index 0000000..4c1a0d1
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `static`
+  --> $DIR/keyword-static-as-identifier.rs:16:9
+   |
+LL |     let static = "foo"; //~ error: expected pattern, found keyword `static`
+   |         ^^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-struct-as-identifier.rs b/src/test/ui/parser/keyword-struct-as-identifier.rs
new file mode 100644 (file)
index 0000000..591bd25
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py struct'
+
+fn main() {
+    let struct = "foo"; //~ error: expected pattern, found keyword `struct`
+}
diff --git a/src/test/ui/parser/keyword-struct-as-identifier.stderr b/src/test/ui/parser/keyword-struct-as-identifier.stderr
new file mode 100644 (file)
index 0000000..76179ce
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `struct`
+  --> $DIR/keyword-struct-as-identifier.rs:16:9
+   |
+LL |     let struct = "foo"; //~ error: expected pattern, found keyword `struct`
+   |         ^^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-trait-as-identifier.rs b/src/test/ui/parser/keyword-trait-as-identifier.rs
new file mode 100644 (file)
index 0000000..bdb5d26
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py trait'
+
+fn main() {
+    let trait = "foo"; //~ error: expected pattern, found keyword `trait`
+}
diff --git a/src/test/ui/parser/keyword-trait-as-identifier.stderr b/src/test/ui/parser/keyword-trait-as-identifier.stderr
new file mode 100644 (file)
index 0000000..084b785
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `trait`
+  --> $DIR/keyword-trait-as-identifier.rs:16:9
+   |
+LL |     let trait = "foo"; //~ error: expected pattern, found keyword `trait`
+   |         ^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-try-as-identifier-edition2018.rs b/src/test/ui/parser/keyword-try-as-identifier-edition2018.rs
new file mode 100644 (file)
index 0000000..1e4f85c
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only --edition 2018
+
+fn main() {
+    let try = "foo"; //~ error: expected pattern, found reserved keyword `try`
+}
diff --git a/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr b/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr
new file mode 100644 (file)
index 0000000..9306f95
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found reserved keyword `try`
+  --> $DIR/keyword-try-as-identifier-edition2018.rs:14:9
+   |
+LL |     let try = "foo"; //~ error: expected pattern, found reserved keyword `try`
+   |         ^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-type-as-identifier.rs b/src/test/ui/parser/keyword-type-as-identifier.rs
new file mode 100644 (file)
index 0000000..2ba99d0
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py type'
+
+fn main() {
+    let type = "foo"; //~ error: expected pattern, found keyword `type`
+}
diff --git a/src/test/ui/parser/keyword-type-as-identifier.stderr b/src/test/ui/parser/keyword-type-as-identifier.stderr
new file mode 100644 (file)
index 0000000..03e0bd7
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `type`
+  --> $DIR/keyword-type-as-identifier.rs:16:9
+   |
+LL |     let type = "foo"; //~ error: expected pattern, found keyword `type`
+   |         ^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-typeof.rs b/src/test/ui/parser/keyword-typeof.rs
new file mode 100644 (file)
index 0000000..40e26bd
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let typeof = (); //~ ERROR expected pattern, found reserved keyword `typeof`
+}
diff --git a/src/test/ui/parser/keyword-typeof.stderr b/src/test/ui/parser/keyword-typeof.stderr
new file mode 100644 (file)
index 0000000..1c0cd0c
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found reserved keyword `typeof`
+  --> $DIR/keyword-typeof.rs:14:9
+   |
+LL |     let typeof = (); //~ ERROR expected pattern, found reserved keyword `typeof`
+   |         ^^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-unsafe-as-identifier.rs b/src/test/ui/parser/keyword-unsafe-as-identifier.rs
new file mode 100644 (file)
index 0000000..a72723e
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py unsafe'
+
+fn main() {
+    let unsafe = "foo"; //~ error: expected pattern, found keyword `unsafe`
+}
diff --git a/src/test/ui/parser/keyword-unsafe-as-identifier.stderr b/src/test/ui/parser/keyword-unsafe-as-identifier.stderr
new file mode 100644 (file)
index 0000000..360bd21
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `unsafe`
+  --> $DIR/keyword-unsafe-as-identifier.rs:16:9
+   |
+LL |     let unsafe = "foo"; //~ error: expected pattern, found keyword `unsafe`
+   |         ^^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-use-as-identifier.rs b/src/test/ui/parser/keyword-use-as-identifier.rs
new file mode 100644 (file)
index 0000000..de74907
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py use'
+
+fn main() {
+    let use = "foo"; //~ error: expected pattern, found keyword `use`
+}
diff --git a/src/test/ui/parser/keyword-use-as-identifier.stderr b/src/test/ui/parser/keyword-use-as-identifier.stderr
new file mode 100644 (file)
index 0000000..bff2978
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `use`
+  --> $DIR/keyword-use-as-identifier.rs:16:9
+   |
+LL |     let use = "foo"; //~ error: expected pattern, found keyword `use`
+   |         ^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-where-as-identifier.rs b/src/test/ui/parser/keyword-where-as-identifier.rs
new file mode 100644 (file)
index 0000000..4b7c892
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py where'
+
+fn main() {
+    let where = "foo"; //~ error: expected pattern, found keyword `where`
+}
diff --git a/src/test/ui/parser/keyword-where-as-identifier.stderr b/src/test/ui/parser/keyword-where-as-identifier.stderr
new file mode 100644 (file)
index 0000000..38fe936
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `where`
+  --> $DIR/keyword-where-as-identifier.rs:16:9
+   |
+LL |     let where = "foo"; //~ error: expected pattern, found keyword `where`
+   |         ^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword-while-as-identifier.rs b/src/test/ui/parser/keyword-while-as-identifier.rs
new file mode 100644 (file)
index 0000000..01793ca
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py while'
+
+fn main() {
+    let while = "foo"; //~ error: expected pattern, found keyword `while`
+}
diff --git a/src/test/ui/parser/keyword-while-as-identifier.stderr b/src/test/ui/parser/keyword-while-as-identifier.stderr
new file mode 100644 (file)
index 0000000..c9dab8c
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found keyword `while`
+  --> $DIR/keyword-while-as-identifier.rs:16:9
+   |
+LL |     let while = "foo"; //~ error: expected pattern, found keyword `while`
+   |         ^^^^^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keyword.rs b/src/test/ui/parser/keyword.rs
new file mode 100644 (file)
index 0000000..d4ce551
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+pub mod break {
+    //~^ ERROR expected identifier, found keyword `break`
+}
diff --git a/src/test/ui/parser/keyword.stderr b/src/test/ui/parser/keyword.stderr
new file mode 100644 (file)
index 0000000..a3fc167
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found keyword `break`
+  --> $DIR/keyword.rs:13:9
+   |
+LL | pub mod break {
+   |         ^^^^^ expected identifier, found keyword
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/keywords-followed-by-double-colon.rs b/src/test/ui/parser/keywords-followed-by-double-colon.rs
new file mode 100644 (file)
index 0000000..7a5b48c
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    struct::foo();
+    //~^ ERROR expected identifier
+}
+fn bar() {
+    mut::baz();
+    //~^ ERROR expected expression, found keyword `mut`
+}
diff --git a/src/test/ui/parser/keywords-followed-by-double-colon.stderr b/src/test/ui/parser/keywords-followed-by-double-colon.stderr
new file mode 100644 (file)
index 0000000..0496585
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected identifier, found `::`
+  --> $DIR/keywords-followed-by-double-colon.rs:14:11
+   |
+LL |     struct::foo();
+   |           ^^ expected identifier
+
+error: expected expression, found keyword `mut`
+  --> $DIR/keywords-followed-by-double-colon.rs:18:5
+   |
+LL |     mut::baz();
+   |     ^^^ expected expression
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/lex-bad-binary-literal.rs b/src/test/ui/parser/lex-bad-binary-literal.rs
new file mode 100644 (file)
index 0000000..caacb12
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn main() {
+    0b121; //~ ERROR invalid digit for a base 2 literal
+    0b10_10301; //~ ERROR invalid digit for a base 2 literal
+    0b30; //~ ERROR invalid digit for a base 2 literal
+    0b41; //~ ERROR invalid digit for a base 2 literal
+    0b5; //~ ERROR invalid digit for a base 2 literal
+    0b6; //~ ERROR invalid digit for a base 2 literal
+    0b7; //~ ERROR invalid digit for a base 2 literal
+    0b8; //~ ERROR invalid digit for a base 2 literal
+    0b9; //~ ERROR invalid digit for a base 2 literal
+}
diff --git a/src/test/ui/parser/lex-bad-binary-literal.stderr b/src/test/ui/parser/lex-bad-binary-literal.stderr
new file mode 100644 (file)
index 0000000..2c23d8c
--- /dev/null
@@ -0,0 +1,56 @@
+error: invalid digit for a base 2 literal
+  --> $DIR/lex-bad-binary-literal.rs:14:8
+   |
+LL |     0b121; //~ ERROR invalid digit for a base 2 literal
+   |        ^
+
+error: invalid digit for a base 2 literal
+  --> $DIR/lex-bad-binary-literal.rs:15:12
+   |
+LL |     0b10_10301; //~ ERROR invalid digit for a base 2 literal
+   |            ^
+
+error: invalid digit for a base 2 literal
+  --> $DIR/lex-bad-binary-literal.rs:16:7
+   |
+LL |     0b30; //~ ERROR invalid digit for a base 2 literal
+   |       ^
+
+error: invalid digit for a base 2 literal
+  --> $DIR/lex-bad-binary-literal.rs:17:7
+   |
+LL |     0b41; //~ ERROR invalid digit for a base 2 literal
+   |       ^
+
+error: invalid digit for a base 2 literal
+  --> $DIR/lex-bad-binary-literal.rs:18:7
+   |
+LL |     0b5; //~ ERROR invalid digit for a base 2 literal
+   |       ^
+
+error: invalid digit for a base 2 literal
+  --> $DIR/lex-bad-binary-literal.rs:19:7
+   |
+LL |     0b6; //~ ERROR invalid digit for a base 2 literal
+   |       ^
+
+error: invalid digit for a base 2 literal
+  --> $DIR/lex-bad-binary-literal.rs:20:7
+   |
+LL |     0b7; //~ ERROR invalid digit for a base 2 literal
+   |       ^
+
+error: invalid digit for a base 2 literal
+  --> $DIR/lex-bad-binary-literal.rs:21:7
+   |
+LL |     0b8; //~ ERROR invalid digit for a base 2 literal
+   |       ^
+
+error: invalid digit for a base 2 literal
+  --> $DIR/lex-bad-binary-literal.rs:22:7
+   |
+LL |     0b9; //~ ERROR invalid digit for a base 2 literal
+   |       ^
+
+error: aborting due to 9 previous errors
+
diff --git a/src/test/ui/parser/lex-bad-char-literals-1.rs b/src/test/ui/parser/lex-bad-char-literals-1.rs
new file mode 100644 (file)
index 0000000..006e3e6
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+static c3: char =
+    '\x1' //~ ERROR: numeric character escape is too short
+;
+
+static s: &'static str =
+    "\x1" //~ ERROR: numeric character escape is too short
+;
+
+static c: char =
+    '\●' //~ ERROR: unknown character escape
+;
+
+static s: &'static str =
+    "\●" //~ ERROR: unknown character escape
+;
+
diff --git a/src/test/ui/parser/lex-bad-char-literals-1.stderr b/src/test/ui/parser/lex-bad-char-literals-1.stderr
new file mode 100644 (file)
index 0000000..081eb2e
--- /dev/null
@@ -0,0 +1,26 @@
+error: numeric character escape is too short
+  --> $DIR/lex-bad-char-literals-1.rs:13:8
+   |
+LL |     '/x1' //~ ERROR: numeric character escape is too short
+   |        ^
+
+error: numeric character escape is too short
+  --> $DIR/lex-bad-char-literals-1.rs:17:8
+   |
+LL |     "/x1" //~ ERROR: numeric character escape is too short
+   |        ^
+
+error: unknown character escape: /u{25cf}
+  --> $DIR/lex-bad-char-literals-1.rs:21:7
+   |
+LL |     '/●' //~ ERROR: unknown character escape
+   |       ^
+
+error: unknown character escape: /u{25cf}
+  --> $DIR/lex-bad-char-literals-1.rs:25:7
+   |
+LL |     "/●" //~ ERROR: unknown character escape
+   |       ^
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/parser/lex-bad-char-literals-2.rs b/src/test/ui/parser/lex-bad-char-literals-2.rs
new file mode 100644 (file)
index 0000000..8bd6808
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This test needs to the last one appearing in this file as it kills the parser
+static c: char =
+    'nope' //~ ERROR: character literal may only contain one codepoint: 'nope'
+;
+
diff --git a/src/test/ui/parser/lex-bad-char-literals-2.stderr b/src/test/ui/parser/lex-bad-char-literals-2.stderr
new file mode 100644 (file)
index 0000000..ed129f5
--- /dev/null
@@ -0,0 +1,8 @@
+error: character literal may only contain one codepoint: 'nope'
+  --> $DIR/lex-bad-char-literals-2.rs:15:5
+   |
+LL |     'nope' //~ ERROR: character literal may only contain one codepoint: 'nope'
+   |     ^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/lex-bad-char-literals-3.rs b/src/test/ui/parser/lex-bad-char-literals-3.rs
new file mode 100644 (file)
index 0000000..464e75e
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This test needs to the last one appearing in this file as it kills the parser
+static c: char =
+    '●●' //~ ERROR: character literal may only contain one codepoint
+;
diff --git a/src/test/ui/parser/lex-bad-char-literals-3.stderr b/src/test/ui/parser/lex-bad-char-literals-3.stderr
new file mode 100644 (file)
index 0000000..f257b5b
--- /dev/null
@@ -0,0 +1,12 @@
+error: character literal may only contain one codepoint
+  --> $DIR/lex-bad-char-literals-3.rs:15:5
+   |
+LL |     '●●' //~ ERROR: character literal may only contain one codepoint
+   |     ^^^^
+help: if you meant to write a `str` literal, use double quotes
+   |
+LL |     "●●" //~ ERROR: character literal may only contain one codepoint
+   |     ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/lex-bad-char-literals-4.rs b/src/test/ui/parser/lex-bad-char-literals-4.rs
new file mode 100644 (file)
index 0000000..b230e62
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+//
+// This test needs to the last one appearing in this file as it kills the parser
+static c: char =
+    '●  //~ ERROR: character literal may only contain one codepoint: '●
+;
diff --git a/src/test/ui/parser/lex-bad-char-literals-4.stderr b/src/test/ui/parser/lex-bad-char-literals-4.stderr
new file mode 100644 (file)
index 0000000..495becd
--- /dev/null
@@ -0,0 +1,8 @@
+error: character literal may only contain one codepoint: '●
+  --> $DIR/lex-bad-char-literals-4.rs:15:5
+   |
+LL |     '●  //~ ERROR: character literal may only contain one codepoint: '●
+   |     ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/lex-bad-char-literals-5.rs b/src/test/ui/parser/lex-bad-char-literals-5.rs
new file mode 100644 (file)
index 0000000..aa16688
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+//
+// This test needs to the last one appearing in this file as it kills the parser
+static c: char =
+    '\x10\x10'  //~ ERROR: character literal may only contain one codepoint
+;
diff --git a/src/test/ui/parser/lex-bad-char-literals-5.stderr b/src/test/ui/parser/lex-bad-char-literals-5.stderr
new file mode 100644 (file)
index 0000000..145361e
--- /dev/null
@@ -0,0 +1,12 @@
+error: character literal may only contain one codepoint
+  --> $DIR/lex-bad-char-literals-5.rs:15:5
+   |
+LL |     '/x10/x10'  //~ ERROR: character literal may only contain one codepoint
+   |     ^^^^^^^^^^
+help: if you meant to write a `str` literal, use double quotes
+   |
+LL |     "/x10/x10"  //~ ERROR: character literal may only contain one codepoint
+   |     ^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/lex-bad-numeric-literals.rs b/src/test/ui/parser/lex-bad-numeric-literals.rs
new file mode 100644 (file)
index 0000000..d495a8e
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn main() {
+    0o1.0; //~ ERROR: octal float literal is not supported
+    0o2f32; //~ ERROR: octal float literal is not supported
+    0o3.0f32; //~ ERROR: octal float literal is not supported
+    0o4e4; //~ ERROR: octal float literal is not supported
+    0o5.0e5; //~ ERROR: octal float literal is not supported
+    0o6e6f32; //~ ERROR: octal float literal is not supported
+    0o7.0e7f64; //~ ERROR: octal float literal is not supported
+    0x8.0e+9; //~ ERROR: hexadecimal float literal is not supported
+    0x9.0e-9; //~ ERROR: hexadecimal float literal is not supported
+    0o; //~ ERROR: no valid digits
+    1e+; //~ ERROR: expected at least one digit in exponent
+    0x539.0; //~ ERROR: hexadecimal float literal is not supported
+    9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
+    9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
+    0x; //~ ERROR: no valid digits
+    0xu32; //~ ERROR: no valid digits
+    0ou32; //~ ERROR: no valid digits
+    0bu32; //~ ERROR: no valid digits
+    0b; //~ ERROR: no valid digits
+    0o123f64; //~ ERROR: octal float literal is not supported
+    0o123.456; //~ ERROR: octal float literal is not supported
+    0b101f64; //~ ERROR: binary float literal is not supported
+    0b111.101; //~ ERROR: binary float literal is not supported
+}
diff --git a/src/test/ui/parser/lex-bad-numeric-literals.stderr b/src/test/ui/parser/lex-bad-numeric-literals.stderr
new file mode 100644 (file)
index 0000000..3d87b5b
--- /dev/null
@@ -0,0 +1,140 @@
+error: octal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:14:5
+   |
+LL |     0o1.0; //~ ERROR: octal float literal is not supported
+   |     ^^^^^
+
+error: octal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:16:5
+   |
+LL |     0o3.0f32; //~ ERROR: octal float literal is not supported
+   |     ^^^^^
+
+error: octal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:17:5
+   |
+LL |     0o4e4; //~ ERROR: octal float literal is not supported
+   |     ^^^^^
+
+error: octal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:18:5
+   |
+LL |     0o5.0e5; //~ ERROR: octal float literal is not supported
+   |     ^^^^^^^
+
+error: octal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:19:5
+   |
+LL |     0o6e6f32; //~ ERROR: octal float literal is not supported
+   |     ^^^^^
+
+error: octal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:20:5
+   |
+LL |     0o7.0e7f64; //~ ERROR: octal float literal is not supported
+   |     ^^^^^^^
+
+error: hexadecimal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:21:5
+   |
+LL |     0x8.0e+9; //~ ERROR: hexadecimal float literal is not supported
+   |     ^^^^^^^^
+
+error: hexadecimal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:22:5
+   |
+LL |     0x9.0e-9; //~ ERROR: hexadecimal float literal is not supported
+   |     ^^^^^^^^
+
+error: no valid digits found for number
+  --> $DIR/lex-bad-numeric-literals.rs:23:5
+   |
+LL |     0o; //~ ERROR: no valid digits
+   |     ^^
+
+error: expected at least one digit in exponent
+  --> $DIR/lex-bad-numeric-literals.rs:24:8
+   |
+LL |     1e+; //~ ERROR: expected at least one digit in exponent
+   |        ^
+
+error: hexadecimal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:25:5
+   |
+LL |     0x539.0; //~ ERROR: hexadecimal float literal is not supported
+   |     ^^^^^^^
+
+error: no valid digits found for number
+  --> $DIR/lex-bad-numeric-literals.rs:28:5
+   |
+LL |     0x; //~ ERROR: no valid digits
+   |     ^^
+
+error: no valid digits found for number
+  --> $DIR/lex-bad-numeric-literals.rs:29:5
+   |
+LL |     0xu32; //~ ERROR: no valid digits
+   |     ^^
+
+error: no valid digits found for number
+  --> $DIR/lex-bad-numeric-literals.rs:30:5
+   |
+LL |     0ou32; //~ ERROR: no valid digits
+   |     ^^
+
+error: no valid digits found for number
+  --> $DIR/lex-bad-numeric-literals.rs:31:5
+   |
+LL |     0bu32; //~ ERROR: no valid digits
+   |     ^^
+
+error: no valid digits found for number
+  --> $DIR/lex-bad-numeric-literals.rs:32:5
+   |
+LL |     0b; //~ ERROR: no valid digits
+   |     ^^
+
+error: octal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:34:5
+   |
+LL |     0o123.456; //~ ERROR: octal float literal is not supported
+   |     ^^^^^^^^^
+
+error: binary float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:36:5
+   |
+LL |     0b111.101; //~ ERROR: binary float literal is not supported
+   |     ^^^^^^^^^
+
+error: octal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:15:5
+   |
+LL |     0o2f32; //~ ERROR: octal float literal is not supported
+   |     ^^^^^^
+
+error: int literal is too large
+  --> $DIR/lex-bad-numeric-literals.rs:26:5
+   |
+LL |     9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: int literal is too large
+  --> $DIR/lex-bad-numeric-literals.rs:27:5
+   |
+LL |     9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: octal float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:33:5
+   |
+LL |     0o123f64; //~ ERROR: octal float literal is not supported
+   |     ^^^^^^^^
+
+error: binary float literal is not supported
+  --> $DIR/lex-bad-numeric-literals.rs:35:5
+   |
+LL |     0b101f64; //~ ERROR: binary float literal is not supported
+   |     ^^^^^^^^
+
+error: aborting due to 23 previous errors
+
diff --git a/src/test/ui/parser/lex-bad-octal-literal.rs b/src/test/ui/parser/lex-bad-octal-literal.rs
new file mode 100644 (file)
index 0000000..c8406af
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn main() {
+    0o18; //~ ERROR invalid digit for a base 8 literal
+    0o1234_9_5670;  //~ ERROR invalid digit for a base 8 literal
+}
diff --git a/src/test/ui/parser/lex-bad-octal-literal.stderr b/src/test/ui/parser/lex-bad-octal-literal.stderr
new file mode 100644 (file)
index 0000000..342309f
--- /dev/null
@@ -0,0 +1,14 @@
+error: invalid digit for a base 8 literal
+  --> $DIR/lex-bad-octal-literal.rs:14:8
+   |
+LL |     0o18; //~ ERROR invalid digit for a base 8 literal
+   |        ^
+
+error: invalid digit for a base 8 literal
+  --> $DIR/lex-bad-octal-literal.rs:15:12
+   |
+LL |     0o1234_9_5670;  //~ ERROR invalid digit for a base 8 literal
+   |            ^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/lex-bad-token.rs b/src/test/ui/parser/lex-bad-token.rs
new file mode 100644 (file)
index 0000000..774b10a
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+● //~ ERROR: unknown start of token
diff --git a/src/test/ui/parser/lex-bad-token.stderr b/src/test/ui/parser/lex-bad-token.stderr
new file mode 100644 (file)
index 0000000..6e2cd99
--- /dev/null
@@ -0,0 +1,8 @@
+error: unknown start of token: /u{25cf}
+  --> $DIR/lex-bad-token.rs:13:1
+   |
+LL | ● //~ ERROR: unknown start of token
+   | ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs
new file mode 100644 (file)
index 0000000..ac085d4
--- /dev/null
@@ -0,0 +1,38 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+// ignore-tidy-cr
+
+/// doc comment with bare CR: '\r'
+pub fn foo() {}
+//~^^ ERROR: bare CR not allowed in doc-comment
+
+/** block doc comment with bare CR: '\r' */
+pub fn bar() {}
+//~^^ ERROR: bare CR not allowed in block doc-comment
+
+fn main() {
+    //! doc comment with bare CR: '\r'
+    //~^ ERROR: bare CR not allowed in doc-comment
+
+    /*! block doc comment with bare CR: '\r' */
+    //~^ ERROR: bare CR not allowed in block doc-comment
+
+    // the following string literal has a bare CR in it
+    let _s = "foo\rbar"; //~ ERROR: bare CR not allowed in string
+
+    // the following string literal has a bare CR in it
+    let _s = r"bar\rfoo"; //~ ERROR: bare CR not allowed in raw string
+
+    // the following string literal has a bare CR in it
+    let _s = "foo\\rbar"; //~ ERROR: unknown character escape: \r
+}
diff --git a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr
new file mode 100644 (file)
index 0000000..7998367
--- /dev/null
@@ -0,0 +1,50 @@
+error: bare CR not allowed in doc-comment
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:15:32
+   |
+LL | /// doc comment with bare CR: '\r'
+   |                                ^
+
+error: bare CR not allowed in block doc-comment
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:19:38
+   |
+LL | /** block doc comment with bare CR: '\r' */
+   |                                      ^
+
+error: bare CR not allowed in doc-comment
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:24:36
+   |
+LL |     //! doc comment with bare CR: '\r'
+   |                                    ^
+
+error: bare CR not allowed in block doc-comment
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:27:42
+   |
+LL |     /*! block doc comment with bare CR: '\r' */
+   |                                          ^
+
+error: bare CR not allowed in string, use /r instead
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:31:18
+   |
+LL |     let _s = "foo\rbar"; //~ ERROR: bare CR not allowed in string
+   |                  ^
+
+error: bare CR not allowed in raw string, use /r instead
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:34:14
+   |
+LL |     let _s = r"bar\rfoo"; //~ ERROR: bare CR not allowed in raw string
+   |              ^^^^^
+
+error: unknown character escape: /r
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:37:19
+   |
+LL |     let _s = "foo/\rbar"; //~ ERROR: unknown character escape: /r
+   |                   ^
+   |
+help: this is an isolated carriage return; consider checking your editor and version control settings
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:37:19
+   |
+LL |     let _s = "foo/\rbar"; //~ ERROR: unknown character escape: /r
+   |                   ^
+
+error: aborting due to 7 previous errors
+
diff --git a/src/test/ui/parser/lex-stray-backslash.rs b/src/test/ui/parser/lex-stray-backslash.rs
new file mode 100644 (file)
index 0000000..b6042bb
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+\ //~ ERROR: unknown start of token: \
diff --git a/src/test/ui/parser/lex-stray-backslash.stderr b/src/test/ui/parser/lex-stray-backslash.stderr
new file mode 100644 (file)
index 0000000..d4ccb6f
--- /dev/null
@@ -0,0 +1,8 @@
+error: unknown start of token: /
+  --> $DIR/lex-stray-backslash.rs:13:1
+   |
+LL | / //~ ERROR: unknown start of token: /
+   | ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/lifetime-in-pattern.rs b/src/test/ui/parser/lifetime-in-pattern.rs
new file mode 100644 (file)
index 0000000..8802497
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn test(&'a str) {
+    //~^ ERROR unexpected lifetime `'a` in pattern
+}
+
+fn main() {
+}
diff --git a/src/test/ui/parser/lifetime-in-pattern.stderr b/src/test/ui/parser/lifetime-in-pattern.stderr
new file mode 100644 (file)
index 0000000..648dfcc
--- /dev/null
@@ -0,0 +1,8 @@
+error: unexpected lifetime `'a` in pattern
+  --> $DIR/lifetime-in-pattern.rs:11:10
+   |
+LL | fn test(&'a str) {
+   |          ^^ unexpected lifetime
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/lifetime-semicolon.rs b/src/test/ui/parser/lifetime-semicolon.rs
new file mode 100644 (file)
index 0000000..e197595
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct Foo<'a, 'b> {
+    a: &'a &'b i32
+}
+
+fn foo<'a, 'b>(x: &mut Foo<'a; 'b>) {}
+//~^ ERROR expected one of `,` or `>`, found `;`
diff --git a/src/test/ui/parser/lifetime-semicolon.stderr b/src/test/ui/parser/lifetime-semicolon.stderr
new file mode 100644 (file)
index 0000000..2ce6d5d
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `,` or `>`, found `;`
+  --> $DIR/lifetime-semicolon.rs:17:30
+   |
+LL | fn foo<'a, 'b>(x: &mut Foo<'a; 'b>) {}
+   |                              ^ expected one of `,` or `>` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/macro-bad-delimiter-ident.rs b/src/test/ui/parser/macro-bad-delimiter-ident.rs
new file mode 100644 (file)
index 0000000..2940ade
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    foo! bar < //~ ERROR expected `(` or `{`, found `<`
+}
diff --git a/src/test/ui/parser/macro-bad-delimiter-ident.stderr b/src/test/ui/parser/macro-bad-delimiter-ident.stderr
new file mode 100644 (file)
index 0000000..e1ae989
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `(` or `{`, found `<`
+  --> $DIR/macro-bad-delimiter-ident.rs:14:14
+   |
+LL |     foo! bar < //~ ERROR expected `(` or `{`, found `<`
+   |              ^ expected `(` or `{`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/macro-doc-comments-1.rs b/src/test/ui/parser/macro-doc-comments-1.rs
new file mode 100644 (file)
index 0000000..03bcef4
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+macro_rules! outer {
+    (#[$outer:meta]) => ()
+}
+
+outer! {
+    //! Inner
+} //~^ ERROR no rules expected the token `!`
+
+fn main() { }
diff --git a/src/test/ui/parser/macro-doc-comments-1.stderr b/src/test/ui/parser/macro-doc-comments-1.stderr
new file mode 100644 (file)
index 0000000..a7fdd28
--- /dev/null
@@ -0,0 +1,8 @@
+error: no rules expected the token `!`
+  --> $DIR/macro-doc-comments-1.rs:16:5
+   |
+LL |     //! Inner
+   |     ^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/macro-doc-comments-2.rs b/src/test/ui/parser/macro-doc-comments-2.rs
new file mode 100644 (file)
index 0000000..a1b112c
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+macro_rules! inner {
+    (#![$inner:meta]) => ()
+}
+
+inner! {
+    /// Outer
+} //~^ ERROR no rules expected the token `[`
+
+fn main() { }
diff --git a/src/test/ui/parser/macro-doc-comments-2.stderr b/src/test/ui/parser/macro-doc-comments-2.stderr
new file mode 100644 (file)
index 0000000..bae9823
--- /dev/null
@@ -0,0 +1,8 @@
+error: no rules expected the token `[`
+  --> $DIR/macro-doc-comments-2.rs:16:5
+   |
+LL |     /// Outer
+   |     ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/macro-keyword.rs b/src/test/ui/parser/macro-keyword.rs
new file mode 100644 (file)
index 0000000..c7dcaf4
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn macro() {  //~ ERROR expected identifier, found reserved keyword `macro`
+}
+
+pub fn main() {
+}
diff --git a/src/test/ui/parser/macro-keyword.stderr b/src/test/ui/parser/macro-keyword.stderr
new file mode 100644 (file)
index 0000000..a558262
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found reserved keyword `macro`
+  --> $DIR/macro-keyword.rs:13:4
+   |
+LL | fn macro() {  //~ ERROR expected identifier, found reserved keyword `macro`
+   |    ^^^^^ expected identifier, found reserved keyword
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/macro-mismatched-delim-brace-paren.rs b/src/test/ui/parser/macro-mismatched-delim-brace-paren.rs
new file mode 100644 (file)
index 0000000..84cf900
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    foo! {
+        bar, "baz", 1, 2.0
+    ) //~ ERROR incorrect close delimiter
+}
diff --git a/src/test/ui/parser/macro-mismatched-delim-brace-paren.stderr b/src/test/ui/parser/macro-mismatched-delim-brace-paren.stderr
new file mode 100644 (file)
index 0000000..69bd40f
--- /dev/null
@@ -0,0 +1,11 @@
+error: incorrect close delimiter: `)`
+  --> $DIR/macro-mismatched-delim-brace-paren.rs:16:5
+   |
+LL |     foo! {
+   |          - un-closed delimiter
+LL |         bar, "baz", 1, 2.0
+LL |     ) //~ ERROR incorrect close delimiter
+   |     ^ incorrect close delimiter
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/macro-mismatched-delim-paren-brace.rs b/src/test/ui/parser/macro-mismatched-delim-paren-brace.rs
new file mode 100644 (file)
index 0000000..cbc0ed0
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    foo! (
+        bar, "baz", 1, 2.0
+    } //~ ERROR incorrect close delimiter
+} //~ ERROR unexpected close delimiter: `}`
diff --git a/src/test/ui/parser/macro-mismatched-delim-paren-brace.stderr b/src/test/ui/parser/macro-mismatched-delim-paren-brace.stderr
new file mode 100644 (file)
index 0000000..6fe7926
--- /dev/null
@@ -0,0 +1,17 @@
+error: incorrect close delimiter: `}`
+  --> $DIR/macro-mismatched-delim-paren-brace.rs:16:5
+   |
+LL |     foo! (
+   |          - un-closed delimiter
+LL |         bar, "baz", 1, 2.0
+LL |     } //~ ERROR incorrect close delimiter
+   |     ^ incorrect close delimiter
+
+error: unexpected close delimiter: `}`
+  --> $DIR/macro-mismatched-delim-paren-brace.rs:17:1
+   |
+LL | } //~ ERROR unexpected close delimiter: `}`
+   | ^ unexpected close delimiter
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/macro-repeat.rs b/src/test/ui/parser/macro-repeat.rs
new file mode 100644 (file)
index 0000000..3abadd8
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+macro_rules! mac {
+    ( $($v:tt)* ) => (
+        $v  //~ ERROR still repeating at this depth
+    )
+}
+
+fn main() {
+    mac!(0);
+}
diff --git a/src/test/ui/parser/macro-repeat.stderr b/src/test/ui/parser/macro-repeat.stderr
new file mode 100644 (file)
index 0000000..7c7a2fb
--- /dev/null
@@ -0,0 +1,8 @@
+error: variable 'v' is still repeating at this depth
+  --> $DIR/macro-repeat.rs:13:9
+   |
+LL |         $v  //~ ERROR still repeating at this depth
+   |         ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/macros-no-semicolon-items.rs b/src/test/ui/parser/macros-no-semicolon-items.rs
new file mode 100644 (file)
index 0000000..faf6b4a
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+macro_rules! foo()  //~ ERROR semicolon
+
+fn main() {
+}
diff --git a/src/test/ui/parser/macros-no-semicolon-items.stderr b/src/test/ui/parser/macros-no-semicolon-items.stderr
new file mode 100644 (file)
index 0000000..1d935f6
--- /dev/null
@@ -0,0 +1,8 @@
+error: macros that expand to items must either be surrounded with braces or followed by a semicolon
+  --> $DIR/macros-no-semicolon-items.rs:13:17
+   |
+LL | macro_rules! foo()  //~ ERROR semicolon
+   |                 ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/macros-no-semicolon.rs b/src/test/ui/parser/macros-no-semicolon.rs
new file mode 100644 (file)
index 0000000..1c55d70
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    assert_eq!(1, 2)
+    assert_eq!(3, 4) //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `assert_eq`
+    println!("hello");
+}
diff --git a/src/test/ui/parser/macros-no-semicolon.stderr b/src/test/ui/parser/macros-no-semicolon.stderr
new file mode 100644 (file)
index 0000000..9ea9e73
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `assert_eq`
+  --> $DIR/macros-no-semicolon.rs:15:5
+   |
+LL |     assert_eq!(1, 2)
+   |                     - expected one of `.`, `;`, `?`, `}`, or an operator here
+LL |     assert_eq!(3, 4) //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `assert_eq`
+   |     ^^^^^^^^^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/match-arrows-block-then-binop.rs b/src/test/ui/parser/match-arrows-block-then-binop.rs
new file mode 100644 (file)
index 0000000..e8cfb77
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+
+    match 0 {
+      0 => {
+      } + 5 //~ ERROR expected pattern, found `+`
+    }
+}
diff --git a/src/test/ui/parser/match-arrows-block-then-binop.stderr b/src/test/ui/parser/match-arrows-block-then-binop.stderr
new file mode 100644 (file)
index 0000000..9293fd1
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found `+`
+  --> $DIR/match-arrows-block-then-binop.rs:17:9
+   |
+LL |       } + 5 //~ ERROR expected pattern, found `+`
+   |         ^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/match-vec-invalid.rs b/src/test/ui/parser/match-vec-invalid.rs
new file mode 100644 (file)
index 0000000..72501ba
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let a = Vec::new();
+    match a {
+        [1, tail.., tail..] => {}, //~ ERROR: expected one of `,` or `@`, found `..`
+        _ => ()
+    }
+}
diff --git a/src/test/ui/parser/match-vec-invalid.stderr b/src/test/ui/parser/match-vec-invalid.stderr
new file mode 100644 (file)
index 0000000..9050223
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `,` or `@`, found `..`
+  --> $DIR/match-vec-invalid.rs:16:25
+   |
+LL |         [1, tail.., tail..] => {}, //~ ERROR: expected one of `,` or `@`, found `..`
+   |                         ^^ expected one of `,` or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/mod_file_not_exist.rs b/src/test/ui/parser/mod_file_not_exist.rs
new file mode 100644 (file)
index 0000000..4bc6e70
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ignore-windows
+
+// compile-flags: -Z parse-only
+
+mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file`
+//~^ HELP name the file either not_a_real_file.rs or not_a_real_file/mod.rs inside the directory
+
+fn main() {
+    assert_eq!(mod_file_aux::bar(), 10);
+}
diff --git a/src/test/ui/parser/mod_file_not_exist_windows.rs b/src/test/ui/parser/mod_file_not_exist_windows.rs
new file mode 100644 (file)
index 0000000..5cf8217
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ignore-android
+// ignore-bitrig
+// ignore-cloudabi
+// ignore-dragonfly
+// ignore-emscripten
+// ignore-freebsd
+// ignore-gnu
+// ignore-haiku
+// ignore-ios
+// ignore-linux
+// ignore-macos
+// ignore-netbsd
+// ignore-openbsd
+// ignore-solaris
+
+// compile-flags: -Z parse-only
+
+mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file`
+//~^ HELP name the file either not_a_real_file.rs or not_a_real_file\mod.rs inside the directory
+
+fn main() {
+    assert_eq!(mod_file_aux::bar(), 10);
+}
diff --git a/src/test/ui/parser/mod_file_with_path_attr.rs b/src/test/ui/parser/mod_file_with_path_attr.rs
new file mode 100644 (file)
index 0000000..993232e
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+#[path = "not_a_real_file.rs"]
+mod m; //~ ERROR not_a_real_file.rs
+
+fn main() {
+    assert_eq!(m::foo(), 10);
+}
diff --git a/src/test/ui/parser/mod_file_with_path_attr.stderr b/src/test/ui/parser/mod_file_with_path_attr.stderr
new file mode 100644 (file)
index 0000000..9b8e8d2
--- /dev/null
@@ -0,0 +1,8 @@
+error: couldn't read "C:/msys64/home/we/rust/src/test/ui/parser/not_a_real_file.rs": The system cannot find the file specified. (os error 2)
+  --> $DIR/mod_file_with_path_attr.rs:14:5
+   |
+LL | mod m; //~ ERROR not_a_real_file.rs
+   |     ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/multiline-comment-line-tracking.rs b/src/test/ui/parser/multiline-comment-line-tracking.rs
new file mode 100644 (file)
index 0000000..11abe67
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// error-pattern:18:3
+
+/* 1
+ * 2
+ * 3
+ */
+fn main() {
+  %; // parse error on line 18, but is reported on line 6 instead.
+}
diff --git a/src/test/ui/parser/multiline-comment-line-tracking.stderr b/src/test/ui/parser/multiline-comment-line-tracking.stderr
new file mode 100644 (file)
index 0000000..75f6aef
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected expression, found `%`
+  --> $DIR/multiline-comment-line-tracking.rs:18:3
+   |
+LL |   %; // parse error on line 18, but is reported on line 6 instead.
+   |   ^ expected expression
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/multitrait.rs b/src/test/ui/parser/multitrait.rs
new file mode 100644 (file)
index 0000000..b7c9b16
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct S {
+ y: isize
+}
+
+impl Cmp, ToString for S {
+//~^ ERROR: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `,`
+  fn eq(&&other: S) { false }
+  fn to_string(&self) -> String { "hi".to_string() }
+}
diff --git a/src/test/ui/parser/multitrait.stderr b/src/test/ui/parser/multitrait.stderr
new file mode 100644 (file)
index 0000000..2ccf49d
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `,`
+  --> $DIR/multitrait.rs:17:9
+   |
+LL | impl Cmp, ToString for S {
+   |         ^ expected one of 8 possible tokens here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/mut-patterns.rs b/src/test/ui/parser/mut-patterns.rs
new file mode 100644 (file)
index 0000000..71d826c
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Can't put mut in non-ident pattern
+
+pub fn main() {
+    struct Foo { x: isize }
+    let mut Foo { x: x } = Foo { x: 3 }; //~ ERROR: expected one of `:`, `;`, `=`, or `@`, found `{`
+}
diff --git a/src/test/ui/parser/mut-patterns.stderr b/src/test/ui/parser/mut-patterns.stderr
new file mode 100644 (file)
index 0000000..afe2459
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `;`, `=`, or `@`, found `{`
+  --> $DIR/mut-patterns.rs:17:17
+   |
+LL |     let mut Foo { x: x } = Foo { x: 3 }; //~ ERROR: expected one of `:`, `;`, `=`, or `@`, found `{`
+   |                 ^ expected one of `:`, `;`, `=`, or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/new-unicode-escapes-1.rs b/src/test/ui/parser/new-unicode-escapes-1.rs
new file mode 100644 (file)
index 0000000..78a68e8
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+pub fn main() {
+    let s = "\u{2603"; //~ ERROR unterminated unicode escape (needed a `}`)
+}
diff --git a/src/test/ui/parser/new-unicode-escapes-1.stderr b/src/test/ui/parser/new-unicode-escapes-1.stderr
new file mode 100644 (file)
index 0000000..4467b39
--- /dev/null
@@ -0,0 +1,8 @@
+error: unterminated unicode escape (needed a `}`)
+  --> $DIR/new-unicode-escapes-1.rs:14:21
+   |
+LL |     let s = "/u{2603"; //~ ERROR unterminated unicode escape (needed a `}`)
+   |                     ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/new-unicode-escapes-2.rs b/src/test/ui/parser/new-unicode-escapes-2.rs
new file mode 100644 (file)
index 0000000..cdadaef
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+pub fn main() {
+    let s = "\u{260311111111}"; //~ ERROR overlong unicode escape (must have at most 6 hex digits)
+}
diff --git a/src/test/ui/parser/new-unicode-escapes-2.stderr b/src/test/ui/parser/new-unicode-escapes-2.stderr
new file mode 100644 (file)
index 0000000..54123be
--- /dev/null
@@ -0,0 +1,8 @@
+error: overlong unicode escape (must have at most 6 hex digits)
+  --> $DIR/new-unicode-escapes-2.rs:14:17
+   |
+LL |     let s = "/u{260311111111}"; //~ ERROR overlong unicode escape (must have at most 6 hex digits)
+   |                 ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/new-unicode-escapes-3.rs b/src/test/ui/parser/new-unicode-escapes-3.rs
new file mode 100644 (file)
index 0000000..8189bf6
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+pub fn main() {
+    let s1 = "\u{d805}"; //~ ERROR invalid unicode character escape
+    let s2 = "\u{ffffff}"; //~ ERROR invalid unicode character escape
+}
diff --git a/src/test/ui/parser/new-unicode-escapes-3.stderr b/src/test/ui/parser/new-unicode-escapes-3.stderr
new file mode 100644 (file)
index 0000000..65196f9
--- /dev/null
@@ -0,0 +1,18 @@
+error: invalid unicode character escape
+  --> $DIR/new-unicode-escapes-3.rs:14:14
+   |
+LL |     let s1 = "/u{d805}"; //~ ERROR invalid unicode character escape
+   |              ^^^^^^^^^^
+   |
+   = help: unicode escape must not be a surrogate
+
+error: invalid unicode character escape
+  --> $DIR/new-unicode-escapes-3.rs:15:14
+   |
+LL |     let s2 = "/u{ffffff}"; //~ ERROR invalid unicode character escape
+   |              ^^^^^^^^^^^^
+   |
+   = help: unicode escape must be at most 10FFFF
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/new-unicode-escapes-4.rs b/src/test/ui/parser/new-unicode-escapes-4.rs
new file mode 100644 (file)
index 0000000..8770fb3
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+pub fn main() {
+    let s = "\u{lol}";
+     //~^ ERROR invalid character in unicode escape: l
+}
diff --git a/src/test/ui/parser/new-unicode-escapes-4.stderr b/src/test/ui/parser/new-unicode-escapes-4.stderr
new file mode 100644 (file)
index 0000000..309a77e
--- /dev/null
@@ -0,0 +1,8 @@
+error: invalid character in unicode escape: l
+  --> $DIR/new-unicode-escapes-4.rs:14:17
+   |
+LL |     let s = "/u{lol}";
+   |                 ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/no-binary-float-literal.rs b/src/test/ui/parser/no-binary-float-literal.rs
new file mode 100644 (file)
index 0000000..528a2b1
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:binary float literal is not supported
+
+fn main() {
+    0b101010f64;
+    0b101.010;
+    0b101p4f64;
+}
diff --git a/src/test/ui/parser/no-binary-float-literal.stderr b/src/test/ui/parser/no-binary-float-literal.stderr
new file mode 100644 (file)
index 0000000..db3c379
--- /dev/null
@@ -0,0 +1,8 @@
+error: binary float literal is not supported
+  --> $DIR/no-binary-float-literal.rs:17:5
+   |
+LL |     0b101.010;
+   |     ^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/no-hex-float-literal.rs b/src/test/ui/parser/no-hex-float-literal.rs
new file mode 100644 (file)
index 0000000..df40fdd
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern:hexadecimal float literal is not supported
+
+fn main() {
+    0xABC.Df;
+    0x567.89;
+    0xDEAD.BEEFp-2f;
+}
diff --git a/src/test/ui/parser/no-hex-float-literal.stderr b/src/test/ui/parser/no-hex-float-literal.stderr
new file mode 100644 (file)
index 0000000..dba019b
--- /dev/null
@@ -0,0 +1,8 @@
+error: hexadecimal float literal is not supported
+  --> $DIR/no-hex-float-literal.rs:17:5
+   |
+LL |     0x567.89;
+   |     ^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/no-unsafe-self.rs b/src/test/ui/parser/no-unsafe-self.rs
new file mode 100644 (file)
index 0000000..22baf88
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+trait A {
+    fn foo(*mut self); //~ ERROR cannot pass `self` by raw pointer
+    fn baz(*const self); //~ ERROR cannot pass `self` by raw pointer
+    fn bar(*self); //~ ERROR cannot pass `self` by raw pointer
+}
+
+struct X;
+impl A for X {
+    fn foo(*mut self) { } //~ ERROR cannot pass `self` by raw pointer
+    fn baz(*const self) { } //~ ERROR cannot pass `self` by raw pointer
+    fn bar(*self) { } //~ ERROR cannot pass `self` by raw pointer
+}
+
+fn main() { }
diff --git a/src/test/ui/parser/no-unsafe-self.stderr b/src/test/ui/parser/no-unsafe-self.stderr
new file mode 100644 (file)
index 0000000..7fe66bf
--- /dev/null
@@ -0,0 +1,38 @@
+error: cannot pass `self` by raw pointer
+  --> $DIR/no-unsafe-self.rs:14:17
+   |
+LL |     fn foo(*mut self); //~ ERROR cannot pass `self` by raw pointer
+   |                 ^^^^
+
+error: cannot pass `self` by raw pointer
+  --> $DIR/no-unsafe-self.rs:15:19
+   |
+LL |     fn baz(*const self); //~ ERROR cannot pass `self` by raw pointer
+   |                   ^^^^
+
+error: cannot pass `self` by raw pointer
+  --> $DIR/no-unsafe-self.rs:16:13
+   |
+LL |     fn bar(*self); //~ ERROR cannot pass `self` by raw pointer
+   |             ^^^^
+
+error: cannot pass `self` by raw pointer
+  --> $DIR/no-unsafe-self.rs:21:17
+   |
+LL |     fn foo(*mut self) { } //~ ERROR cannot pass `self` by raw pointer
+   |                 ^^^^
+
+error: cannot pass `self` by raw pointer
+  --> $DIR/no-unsafe-self.rs:22:19
+   |
+LL |     fn baz(*const self) { } //~ ERROR cannot pass `self` by raw pointer
+   |                   ^^^^
+
+error: cannot pass `self` by raw pointer
+  --> $DIR/no-unsafe-self.rs:23:13
+   |
+LL |     fn bar(*self) { } //~ ERROR cannot pass `self` by raw pointer
+   |             ^^^^
+
+error: aborting due to 6 previous errors
+
diff --git a/src/test/ui/parser/not-a-pred.rs b/src/test/ui/parser/not-a-pred.rs
new file mode 100644 (file)
index 0000000..d880c06
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// error-pattern: lt
+
+fn f(a: isize, b: isize) : lt(a, b) { }
+
+fn lt(a: isize, b: isize) { }
+
+fn main() { let a: isize = 10; let b: isize = 23; check (lt(a, b)); f(a, b); }
diff --git a/src/test/ui/parser/not-a-pred.stderr b/src/test/ui/parser/not-a-pred.stderr
new file mode 100644 (file)
index 0000000..1555804
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `->`, `where`, or `{`, found `:`
+  --> $DIR/not-a-pred.rs:15:26
+   |
+LL | fn f(a: isize, b: isize) : lt(a, b) { }
+   |                          ^ expected one of `->`, `where`, or `{` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/omitted-arg-in-item-fn.rs b/src/test/ui/parser/omitted-arg-in-item-fn.rs
new file mode 100644 (file)
index 0000000..388b7c8
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn foo(x) { //~ ERROR expected one of `:` or `@`, found `)`
+}
diff --git a/src/test/ui/parser/omitted-arg-in-item-fn.stderr b/src/test/ui/parser/omitted-arg-in-item-fn.stderr
new file mode 100644 (file)
index 0000000..4e051b6
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:` or `@`, found `)`
+  --> $DIR/omitted-arg-in-item-fn.rs:13:9
+   |
+LL | fn foo(x) { //~ ERROR expected one of `:` or `@`, found `)`
+   |         ^ expected one of `:` or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/paamayim-nekudotayim.rs b/src/test/ui/parser/paamayim-nekudotayim.rs
new file mode 100644 (file)
index 0000000..3466fc6
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// http://phpsadness.com/sad/1
+
+fn main() {
+    ::; //~ ERROR expected identifier, found `;`
+}
diff --git a/src/test/ui/parser/paamayim-nekudotayim.stderr b/src/test/ui/parser/paamayim-nekudotayim.stderr
new file mode 100644 (file)
index 0000000..68912f5
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found `;`
+  --> $DIR/paamayim-nekudotayim.rs:16:7
+   |
+LL |     ::; //~ ERROR expected identifier, found `;`
+   |       ^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/paren-after-qualified-path-in-match.rs b/src/test/ui/parser/paren-after-qualified-path-in-match.rs
new file mode 100644 (file)
index 0000000..d3aa4b7
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn foo() {
+    match x {
+        <T as Trait>::Type(2) => (),
+        //~^ ERROR unexpected `(` after qualified path
+        _ => (),
+    }
+}
diff --git a/src/test/ui/parser/paren-after-qualified-path-in-match.stderr b/src/test/ui/parser/paren-after-qualified-path-in-match.stderr
new file mode 100644 (file)
index 0000000..df3a501
--- /dev/null
@@ -0,0 +1,8 @@
+error: unexpected `(` after qualified path
+  --> $DIR/paren-after-qualified-path-in-match.rs:15:27
+   |
+LL |         <T as Trait>::Type(2) => (),
+   |                           ^ unexpected `(` after qualified path
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-lt-bracket-1.rs b/src/test/ui/parser/pat-lt-bracket-1.rs
new file mode 100644 (file)
index 0000000..6d3d120
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+  match 42 {
+    x < 7 => (),
+   //~^ error: expected one of `=>`, `@`, `if`, or `|`, found `<`
+    _ => ()
+  }
+}
diff --git a/src/test/ui/parser/pat-lt-bracket-1.stderr b/src/test/ui/parser/pat-lt-bracket-1.stderr
new file mode 100644 (file)
index 0000000..0b1402d
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `=>`, `@`, `if`, or `|`, found `<`
+  --> $DIR/pat-lt-bracket-1.rs:13:7
+   |
+LL |     x < 7 => (),
+   |       ^ expected one of `=>`, `@`, `if`, or `|` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-lt-bracket-2.rs b/src/test/ui/parser/pat-lt-bracket-2.rs
new file mode 100644 (file)
index 0000000..6a06530
--- /dev/null
@@ -0,0 +1,12 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn a(B<) {}
+   //~^ error: expected one of `:` or `@`, found `<`
diff --git a/src/test/ui/parser/pat-lt-bracket-2.stderr b/src/test/ui/parser/pat-lt-bracket-2.stderr
new file mode 100644 (file)
index 0000000..341990d
--- /dev/null
@@ -0,0 +1,13 @@
+error: expected one of `:` or `@`, found `<`
+  --> $DIR/pat-lt-bracket-2.rs:11:7
+   |
+LL | fn a(B<) {}
+   |       ^ expected one of `:` or `@` here
+
+error[E0601]: `main` function not found in crate `pat_lt_bracket_2`
+   |
+   = note: consider adding a `main` function to `$DIR/pat-lt-bracket-2.rs`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0601`.
diff --git a/src/test/ui/parser/pat-lt-bracket-3.rs b/src/test/ui/parser/pat-lt-bracket-3.rs
new file mode 100644 (file)
index 0000000..8ea2bcf
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct Foo<T>(T, T);
+
+impl<T> Foo<T> {
+    fn foo(&self) {
+        match *self {
+            Foo<T>(x, y) => {
+            //~^ error: expected one of `=>`, `@`, `if`, or `|`, found `<`
+              println!("Goodbye, World!")
+            }
+        }
+    }
+}
diff --git a/src/test/ui/parser/pat-lt-bracket-3.stderr b/src/test/ui/parser/pat-lt-bracket-3.stderr
new file mode 100644 (file)
index 0000000..2cc2800
--- /dev/null
@@ -0,0 +1,13 @@
+error: expected one of `=>`, `@`, `if`, or `|`, found `<`
+  --> $DIR/pat-lt-bracket-3.rs:16:16
+   |
+LL |             Foo<T>(x, y) => {
+   |                ^ expected one of `=>`, `@`, `if`, or `|` here
+
+error[E0601]: `main` function not found in crate `pat_lt_bracket_3`
+   |
+   = note: consider adding a `main` function to `$DIR/pat-lt-bracket-3.rs`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0601`.
diff --git a/src/test/ui/parser/pat-lt-bracket-4.rs b/src/test/ui/parser/pat-lt-bracket-4.rs
new file mode 100644 (file)
index 0000000..a163b38
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+enum BtNode {
+    Node(u32,Box<BtNode>,Box<BtNode>),
+    Leaf(u32),
+}
+
+fn main() {
+    let y = match x {
+        Foo<T>::A(value) => value, //~ error: expected one of `=>`, `@`, `if`, or `|`, found `<`
+        Foo<T>::B => 7,
+    };
+}
diff --git a/src/test/ui/parser/pat-lt-bracket-4.stderr b/src/test/ui/parser/pat-lt-bracket-4.stderr
new file mode 100644 (file)
index 0000000..4a0dec1
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `=>`, `@`, `if`, or `|`, found `<`
+  --> $DIR/pat-lt-bracket-4.rs:20:12
+   |
+LL |         Foo<T>::A(value) => value, //~ error: expected one of `=>`, `@`, `if`, or `|`, found `<`
+   |            ^ expected one of `=>`, `@`, `if`, or `|` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-lt-bracket-5.rs b/src/test/ui/parser/pat-lt-bracket-5.rs
new file mode 100644 (file)
index 0000000..421d7a0
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let v[0] = v[1]; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `[`
+}
diff --git a/src/test/ui/parser/pat-lt-bracket-5.stderr b/src/test/ui/parser/pat-lt-bracket-5.stderr
new file mode 100644 (file)
index 0000000..5672635
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `;`, `=`, or `@`, found `[`
+  --> $DIR/pat-lt-bracket-5.rs:12:10
+   |
+LL |     let v[0] = v[1]; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `[`
+   |          ^ expected one of `:`, `;`, `=`, or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-lt-bracket-6.rs b/src/test/ui/parser/pat-lt-bracket-6.rs
new file mode 100644 (file)
index 0000000..fb78e55
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let Test(&desc[..]) = x; //~ ERROR: expected one of `)`, `,`, or `@`, found `[`
+}
diff --git a/src/test/ui/parser/pat-lt-bracket-6.stderr b/src/test/ui/parser/pat-lt-bracket-6.stderr
new file mode 100644 (file)
index 0000000..a173b26
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `)`, `,`, or `@`, found `[`
+  --> $DIR/pat-lt-bracket-6.rs:12:19
+   |
+LL |     let Test(&desc[..]) = x; //~ ERROR: expected one of `)`, `,`, or `@`, found `[`
+   |                   ^ expected one of `)`, `,`, or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-lt-bracket-7.rs b/src/test/ui/parser/pat-lt-bracket-7.rs
new file mode 100644 (file)
index 0000000..d75589d
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    for thing(x[]) in foo {} //~ ERROR: expected one of `)`, `,`, or `@`, found `[`
+}
diff --git a/src/test/ui/parser/pat-lt-bracket-7.stderr b/src/test/ui/parser/pat-lt-bracket-7.stderr
new file mode 100644 (file)
index 0000000..31fd8b1
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `)`, `,`, or `@`, found `[`
+  --> $DIR/pat-lt-bracket-7.rs:12:16
+   |
+LL |     for thing(x[]) in foo {} //~ ERROR: expected one of `)`, `,`, or `@`, found `[`
+   |                ^ expected one of `)`, `,`, or `@` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-ranges-1.rs b/src/test/ui/parser/pat-ranges-1.rs
new file mode 100644 (file)
index 0000000..857a392
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Parsing of range patterns
+
+fn main() {
+    let macropus!() ..= 11 = 12; //~ error: expected one of `:`, `;`, or `=`, found `..=`
+}
diff --git a/src/test/ui/parser/pat-ranges-1.stderr b/src/test/ui/parser/pat-ranges-1.stderr
new file mode 100644 (file)
index 0000000..1082503
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `;`, or `=`, found `..=`
+  --> $DIR/pat-ranges-1.rs:14:21
+   |
+LL |     let macropus!() ..= 11 = 12; //~ error: expected one of `:`, `;`, or `=`, found `..=`
+   |                     ^^^ expected one of `:`, `;`, or `=` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-ranges-2.rs b/src/test/ui/parser/pat-ranges-2.rs
new file mode 100644 (file)
index 0000000..64c7493
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Parsing of range patterns
+
+fn main() {
+    let 10 ..= makropulos!() = 12; //~ error: expected one of `::`, `:`, `;`, or `=`, found `!`
+}
diff --git a/src/test/ui/parser/pat-ranges-2.stderr b/src/test/ui/parser/pat-ranges-2.stderr
new file mode 100644 (file)
index 0000000..bfcf8c2
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `::`, `:`, `;`, or `=`, found `!`
+  --> $DIR/pat-ranges-2.rs:14:26
+   |
+LL |     let 10 ..= makropulos!() = 12; //~ error: expected one of `::`, `:`, `;`, or `=`, found `!`
+   |                          ^ expected one of `::`, `:`, `;`, or `=` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-ranges-3.rs b/src/test/ui/parser/pat-ranges-3.rs
new file mode 100644 (file)
index 0000000..1327a9f
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Parsing of range patterns
+
+fn main() {
+    let 10 ..= 10 + 3 = 12; //~ expected one of `:`, `;`, or `=`, found `+`
+}
diff --git a/src/test/ui/parser/pat-ranges-3.stderr b/src/test/ui/parser/pat-ranges-3.stderr
new file mode 100644 (file)
index 0000000..403cebc
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `:`, `;`, or `=`, found `+`
+  --> $DIR/pat-ranges-3.rs:14:19
+   |
+LL |     let 10 ..= 10 + 3 = 12; //~ expected one of `:`, `;`, or `=`, found `+`
+   |                   ^ expected one of `:`, `;`, or `=` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-ranges-4.rs b/src/test/ui/parser/pat-ranges-4.rs
new file mode 100644 (file)
index 0000000..c159c77
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Parsing of range patterns
+
+fn main() {
+    let 10 - 3 ..= 10 = 8;
+    //~^ error: expected one of `...`, `..=`, `..`, `:`, `;`, or `=`, found `-`
+}
diff --git a/src/test/ui/parser/pat-ranges-4.stderr b/src/test/ui/parser/pat-ranges-4.stderr
new file mode 100644 (file)
index 0000000..557f353
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `...`, `..=`, `..`, `:`, `;`, or `=`, found `-`
+  --> $DIR/pat-ranges-4.rs:14:12
+   |
+LL |     let 10 - 3 ..= 10 = 8;
+   |            ^ expected one of `...`, `..=`, `..`, `:`, `;`, or `=` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-ref-enum.rs b/src/test/ui/parser/pat-ref-enum.rs
new file mode 100644 (file)
index 0000000..cf80257
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn matcher(x: Option<isize>) {
+    match x {
+      ref Some(i) => {} //~ ERROR expected identifier, found enum pattern
+      None => {}
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/pat-ref-enum.stderr b/src/test/ui/parser/pat-ref-enum.stderr
new file mode 100644 (file)
index 0000000..5e39b6d
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found enum pattern
+  --> $DIR/pat-ref-enum.rs:15:11
+   |
+LL |       ref Some(i) => {} //~ ERROR expected identifier, found enum pattern
+   |           ^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-tuple-1.rs b/src/test/ui/parser/pat-tuple-1.rs
new file mode 100644 (file)
index 0000000..945d074
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    match 0 {
+        (, ..) => {} //~ ERROR expected pattern, found `,`
+    }
+}
diff --git a/src/test/ui/parser/pat-tuple-1.stderr b/src/test/ui/parser/pat-tuple-1.stderr
new file mode 100644 (file)
index 0000000..eb970e6
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found `,`
+  --> $DIR/pat-tuple-1.rs:15:10
+   |
+LL |         (, ..) => {} //~ ERROR expected pattern, found `,`
+   |          ^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-tuple-2.rs b/src/test/ui/parser/pat-tuple-2.rs
new file mode 100644 (file)
index 0000000..07b391d
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    match 0 {
+        (pat, ..,) => {} //~ ERROR trailing comma is not permitted after `..`
+    }
+}
diff --git a/src/test/ui/parser/pat-tuple-2.stderr b/src/test/ui/parser/pat-tuple-2.stderr
new file mode 100644 (file)
index 0000000..cedc98a
--- /dev/null
@@ -0,0 +1,8 @@
+error: trailing comma is not permitted after `..`
+  --> $DIR/pat-tuple-2.rs:15:17
+   |
+LL |         (pat, ..,) => {} //~ ERROR trailing comma is not permitted after `..`
+   |                 ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-tuple-3.rs b/src/test/ui/parser/pat-tuple-3.rs
new file mode 100644 (file)
index 0000000..029dc7a
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    match 0 {
+        (.., pat, ..) => {} //~ ERROR `..` can only be used once per tuple or tuple struct pattern
+    }
+}
diff --git a/src/test/ui/parser/pat-tuple-3.stderr b/src/test/ui/parser/pat-tuple-3.stderr
new file mode 100644 (file)
index 0000000..28662f7
--- /dev/null
@@ -0,0 +1,8 @@
+error: `..` can only be used once per tuple or tuple struct pattern
+  --> $DIR/pat-tuple-3.rs:15:19
+   |
+LL |         (.., pat, ..) => {} //~ ERROR `..` can only be used once per tuple or tuple struct pattern
+   |                   ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-tuple-4.rs b/src/test/ui/parser/pat-tuple-4.rs
new file mode 100644 (file)
index 0000000..f4c3afa
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    match 0 {
+        (.. pat) => {} //~ ERROR expected one of `)` or `,`, found `pat`
+    }
+}
diff --git a/src/test/ui/parser/pat-tuple-4.stderr b/src/test/ui/parser/pat-tuple-4.stderr
new file mode 100644 (file)
index 0000000..586badd
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `)` or `,`, found `pat`
+  --> $DIR/pat-tuple-4.rs:15:13
+   |
+LL |         (.. pat) => {} //~ ERROR expected one of `)` or `,`, found `pat`
+   |             ^^^ expected one of `)` or `,` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pat-tuple-5.rs b/src/test/ui/parser/pat-tuple-5.rs
new file mode 100644 (file)
index 0000000..d528b97
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    match 0 {
+        (pat ..) => {} //~ ERROR unexpected token: `)`
+    }
+}
diff --git a/src/test/ui/parser/pat-tuple-5.stderr b/src/test/ui/parser/pat-tuple-5.stderr
new file mode 100644 (file)
index 0000000..1e192cf
--- /dev/null
@@ -0,0 +1,8 @@
+error: unexpected token: `)`
+  --> $DIR/pat-tuple-5.rs:15:14
+   |
+LL |         (pat ..) => {} //~ ERROR unexpected token: `)`
+   |              ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pub-item-macro.rs b/src/test/ui/parser/pub-item-macro.rs
new file mode 100644 (file)
index 0000000..8809e9a
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Issue #14660
+
+macro_rules! priv_x { () => {
+    static x: u32 = 0;
+}}
+
+macro_rules! pub_x { () => {
+    pub priv_x!(); //~ ERROR can't qualify macro invocation with `pub`
+    //~^ HELP try adjusting the macro to put `pub` inside the invocation
+}}
+
+mod foo {
+    pub_x!();
+}
+
+fn main() {
+    let y: u32 = foo::x;
+}
diff --git a/src/test/ui/parser/pub-item-macro.stderr b/src/test/ui/parser/pub-item-macro.stderr
new file mode 100644 (file)
index 0000000..f55ba46
--- /dev/null
@@ -0,0 +1,13 @@
+error: can't qualify macro invocation with `pub`
+  --> $DIR/pub-item-macro.rs:18:5
+   |
+LL |     pub priv_x!(); //~ ERROR can't qualify macro invocation with `pub`
+   |     ^^^
+...
+LL |     pub_x!();
+   |     --------- in this macro invocation
+   |
+   = help: try adjusting the macro to put `pub` inside the invocation
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/pub-method-macro.rs b/src/test/ui/parser/pub-method-macro.rs
new file mode 100644 (file)
index 0000000..83db24b
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Issue #18317
+
+mod bleh {
+    macro_rules! defn {
+        ($n:ident) => (
+            fn $n (&self) -> i32 {
+                println!("{}", stringify!($n));
+                1
+            }
+        )
+    }
+
+    #[derive(Copy, Clone)]
+    pub struct S;
+
+    impl S {
+        pub defn!(f); //~ ERROR can't qualify macro invocation with `pub`
+        //~^ HELP try adjusting the macro to put `pub` inside the invocation
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/pub-method-macro.stderr b/src/test/ui/parser/pub-method-macro.stderr
new file mode 100644 (file)
index 0000000..2c34822
--- /dev/null
@@ -0,0 +1,10 @@
+error: can't qualify macro invocation with `pub`
+  --> $DIR/pub-method-macro.rs:27:9
+   |
+LL |         pub defn!(f); //~ ERROR can't qualify macro invocation with `pub`
+   |         ^^^
+   |
+   = help: try adjusting the macro to put `pub` inside the invocation
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/range-3.rs b/src/test/ui/parser/range-3.rs
new file mode 100644 (file)
index 0000000..95aa71b
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Test range syntax - syntax errors.
+
+pub fn main() {
+    let r = 1..2..3;
+    //~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..`
+}
diff --git a/src/test/ui/parser/range-3.stderr b/src/test/ui/parser/range-3.stderr
new file mode 100644 (file)
index 0000000..b818586
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `.`, `;`, `?`, or an operator, found `..`
+  --> $DIR/range-3.rs:16:17
+   |
+LL |     let r = 1..2..3;
+   |                 ^^ expected one of `.`, `;`, `?`, or an operator here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/range-4.rs b/src/test/ui/parser/range-4.rs
new file mode 100644 (file)
index 0000000..4500df1
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Test range syntax - syntax errors.
+
+pub fn main() {
+    let r = ..1..2;
+    //~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..`
+}
diff --git a/src/test/ui/parser/range-4.stderr b/src/test/ui/parser/range-4.stderr
new file mode 100644 (file)
index 0000000..b5013f2
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `.`, `;`, `?`, or an operator, found `..`
+  --> $DIR/range-4.rs:16:16
+   |
+LL |     let r = ..1..2;
+   |                ^^ expected one of `.`, `;`, `?`, or an operator here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/range_inclusive.rs b/src/test/ui/parser/range_inclusive.rs
new file mode 100644 (file)
index 0000000..2aa7d6d
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Make sure that inclusive ranges with no end point don't parse.
+
+pub fn main() {
+    for _ in 1..= {} //~ERROR inclusive range with no end
+                     //~^HELP bounded at the end
+}
+
diff --git a/src/test/ui/parser/range_inclusive.stderr b/src/test/ui/parser/range_inclusive.stderr
new file mode 100644 (file)
index 0000000..a8ded6d
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0586]: inclusive range with no end
+  --> $DIR/range_inclusive.rs:14:19
+   |
+LL |     for _ in 1..= {} //~ERROR inclusive range with no end
+   |                   ^
+   |
+   = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0586`.
diff --git a/src/test/ui/parser/range_inclusive_dotdotdot.rs b/src/test/ui/parser/range_inclusive_dotdotdot.rs
new file mode 100644 (file)
index 0000000..34b96a5
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+// Make sure that inclusive ranges with `...` syntax don't parse.
+
+use std::ops::RangeToInclusive;
+
+fn return_range_to() -> RangeToInclusive<i32> {
+    return ...1; //~ERROR unexpected token: `...`
+                 //~^HELP  use `..` for an exclusive range
+                 //~^^HELP or `..=` for an inclusive range
+}
+
+pub fn main() {
+    let x = ...0;    //~ERROR unexpected token: `...`
+                     //~^HELP  use `..` for an exclusive range
+                     //~^^HELP or `..=` for an inclusive range
+
+    let x = 5...5;   //~ERROR unexpected token: `...`
+                     //~^HELP  use `..` for an exclusive range
+                     //~^^HELP or `..=` for an inclusive range
+
+    for _ in 0...1 {} //~ERROR unexpected token: `...`
+                     //~^HELP  use `..` for an exclusive range
+                     //~^^HELP or `..=` for an inclusive range
+}
diff --git a/src/test/ui/parser/range_inclusive_dotdotdot.stderr b/src/test/ui/parser/range_inclusive_dotdotdot.stderr
new file mode 100644 (file)
index 0000000..7e1df24
--- /dev/null
@@ -0,0 +1,58 @@
+error: unexpected token: `...`
+  --> $DIR/range_inclusive_dotdotdot.rs:18:12
+   |
+LL |     return ...1; //~ERROR unexpected token: `...`
+   |            ^^^
+help: use `..` for an exclusive range
+   |
+LL |     return ..1; //~ERROR unexpected token: `...`
+   |            ^^
+help: or `..=` for an inclusive range
+   |
+LL |     return ..=1; //~ERROR unexpected token: `...`
+   |            ^^^
+
+error: unexpected token: `...`
+  --> $DIR/range_inclusive_dotdotdot.rs:24:13
+   |
+LL |     let x = ...0;    //~ERROR unexpected token: `...`
+   |             ^^^
+help: use `..` for an exclusive range
+   |
+LL |     let x = ..0;    //~ERROR unexpected token: `...`
+   |             ^^
+help: or `..=` for an inclusive range
+   |
+LL |     let x = ..=0;    //~ERROR unexpected token: `...`
+   |             ^^^
+
+error: unexpected token: `...`
+  --> $DIR/range_inclusive_dotdotdot.rs:28:14
+   |
+LL |     let x = 5...5;   //~ERROR unexpected token: `...`
+   |              ^^^
+help: use `..` for an exclusive range
+   |
+LL |     let x = 5..5;   //~ERROR unexpected token: `...`
+   |              ^^
+help: or `..=` for an inclusive range
+   |
+LL |     let x = 5..=5;   //~ERROR unexpected token: `...`
+   |              ^^^
+
+error: unexpected token: `...`
+  --> $DIR/range_inclusive_dotdotdot.rs:32:15
+   |
+LL |     for _ in 0...1 {} //~ERROR unexpected token: `...`
+   |               ^^^
+help: use `..` for an exclusive range
+   |
+LL |     for _ in 0..1 {} //~ERROR unexpected token: `...`
+   |               ^^
+help: or `..=` for an inclusive range
+   |
+LL |     for _ in 0..=1 {} //~ERROR unexpected token: `...`
+   |               ^^^
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/parser/raw-byte-string-eof.rs b/src/test/ui/parser/raw-byte-string-eof.rs
new file mode 100644 (file)
index 0000000..4b8bb31
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+
+pub fn main() {
+    br##"a"#;  //~ unterminated raw string
+}
diff --git a/src/test/ui/parser/raw-byte-string-eof.stderr b/src/test/ui/parser/raw-byte-string-eof.stderr
new file mode 100644 (file)
index 0000000..4c8a3bf
--- /dev/null
@@ -0,0 +1,10 @@
+error: unterminated raw string
+  --> $DIR/raw-byte-string-eof.rs:15:6
+   |
+LL |     br##"a"#;  //~ unterminated raw string
+   |      ^ unterminated raw string
+   |
+   = note: this raw string should be terminated with `"##`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/raw-byte-string-literals.rs b/src/test/ui/parser/raw-byte-string-literals.rs
new file mode 100644 (file)
index 0000000..2e33f98
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+
+pub fn main() {
+    br"é";  //~ ERROR raw byte string must be ASCII
+    br##~"a"~##;  //~ ERROR only `#` is allowed in raw string delimitation
+}
diff --git a/src/test/ui/parser/raw-byte-string-literals.stderr b/src/test/ui/parser/raw-byte-string-literals.stderr
new file mode 100644 (file)
index 0000000..b5a379f
--- /dev/null
@@ -0,0 +1,14 @@
+error: raw byte string must be ASCII: /u{e9}
+  --> $DIR/raw-byte-string-literals.rs:15:8
+   |
+LL |     br"é";  //~ ERROR raw byte string must be ASCII
+   |        ^
+
+error: found invalid character; only `#` is allowed in raw string delimitation: ~
+  --> $DIR/raw-byte-string-literals.rs:16:6
+   |
+LL |     br##~"a"~##;  //~ ERROR only `#` is allowed in raw string delimitation
+   |      ^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/raw-str-delim.rs b/src/test/ui/parser/raw-str-delim.rs
new file mode 100644 (file)
index 0000000..8c00272
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+static s: &'static str =
+    r#~"#"~# //~ ERROR found invalid character; only `#` is allowed in raw string delimitation
+;
diff --git a/src/test/ui/parser/raw-str-delim.stderr b/src/test/ui/parser/raw-str-delim.stderr
new file mode 100644 (file)
index 0000000..3075500
--- /dev/null
@@ -0,0 +1,8 @@
+error: found invalid character; only `#` is allowed in raw string delimitation: ~
+  --> $DIR/raw-str-delim.rs:14:5
+   |
+LL |     r#~"#"~# //~ ERROR found invalid character; only `#` is allowed in raw string delimitation
+   |     ^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/raw-str-unbalanced.rs b/src/test/ui/parser/raw-str-unbalanced.rs
new file mode 100644 (file)
index 0000000..5c09f68
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+static s: &'static str =
+    r#"
+      "## //~ ERROR expected one of `.`, `;`, `?`, or an operator, found `#`
+;
diff --git a/src/test/ui/parser/raw-str-unbalanced.stderr b/src/test/ui/parser/raw-str-unbalanced.stderr
new file mode 100644 (file)
index 0000000..666faaa
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `.`, `;`, `?`, or an operator, found `#`
+  --> $DIR/raw-str-unbalanced.rs:15:9
+   |
+LL |       "## //~ ERROR expected one of `.`, `;`, `?`, or an operator, found `#`
+   |         ^ expected one of `.`, `;`, `?`, or an operator here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/raw-str-unterminated.rs b/src/test/ui/parser/raw-str-unterminated.rs
new file mode 100644 (file)
index 0000000..c37239a
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+static s: &'static str =
+    r#" string literal goes on
+        and on
+    //~^^ ERROR unterminated raw string
diff --git a/src/test/ui/parser/raw-str-unterminated.stderr b/src/test/ui/parser/raw-str-unterminated.stderr
new file mode 100644 (file)
index 0000000..a7d1ad2
--- /dev/null
@@ -0,0 +1,10 @@
+error: unterminated raw string
+  --> $DIR/raw-str-unterminated.rs:14:5
+   |
+LL |     r#" string literal goes on
+   |     ^ unterminated raw string
+   |
+   = note: this raw string should be terminated with `"#`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/recover-enum.rs b/src/test/ui/parser/recover-enum.rs
new file mode 100644 (file)
index 0000000..7de3ed1
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn main() {
+    enum Test {
+        Very
+        Bad //~ ERROR found `Bad`
+        Stuff
+    }
+}
diff --git a/src/test/ui/parser/recover-enum.stderr b/src/test/ui/parser/recover-enum.stderr
new file mode 100644 (file)
index 0000000..1d157c1
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `(`, `,`, `=`, `{`, or `}`, found `Bad`
+  --> $DIR/recover-enum.rs:16:9
+   |
+LL |         Very
+   |             - expected one of `(`, `,`, `=`, `{`, or `}` here
+LL |         Bad //~ ERROR found `Bad`
+   |         ^^^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/recover-enum2.rs b/src/test/ui/parser/recover-enum2.rs
new file mode 100644 (file)
index 0000000..6fd32f8
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn main() {
+    enum Test {
+        Var1,
+        Var2(String),
+        Var3 {
+            abc: {}, //~ ERROR: expected type, found `{`
+        },
+    }
+
+    // recover...
+    let a = 1;
+    enum Test2 {
+        Fine,
+    }
+
+    enum Test3 {
+        StillFine {
+            def: i32,
+        },
+    }
+
+    {
+        // fail again
+        enum Test4 {
+            Nope(i32 {}) //~ ERROR: found `{`
+                         //~^ ERROR: found `{`
+        }
+    }
+    // still recover later
+    let bad_syntax = _; //~ ERROR: expected expression, found reserved identifier `_`
+}
diff --git a/src/test/ui/parser/recover-enum2.stderr b/src/test/ui/parser/recover-enum2.stderr
new file mode 100644 (file)
index 0000000..802f000
--- /dev/null
@@ -0,0 +1,26 @@
+error: expected type, found `{`
+  --> $DIR/recover-enum2.rs:18:18
+   |
+LL |             abc: {}, //~ ERROR: expected type, found `{`
+   |                  ^
+
+error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `{`
+  --> $DIR/recover-enum2.rs:37:22
+   |
+LL |             Nope(i32 {}) //~ ERROR: found `{`
+   |                      ^ expected one of 7 possible tokens here
+
+error: expected one of `!`, `&&`, `&`, `(`, `)`, `*`, `+`, `,`, `::`, `<`, `?`, `[`, `_`, `crate`, `dyn`, `extern`, `fn`, `for`, `impl`, `pub`, `unsafe`, `}`, or lifetime, found `{`
+  --> $DIR/recover-enum2.rs:37:22
+   |
+LL |             Nope(i32 {}) //~ ERROR: found `{`
+   |                      ^ expected one of 23 possible tokens here
+
+error: expected expression, found reserved identifier `_`
+  --> $DIR/recover-enum2.rs:42:22
+   |
+LL |     let bad_syntax = _; //~ ERROR: expected expression, found reserved identifier `_`
+   |                      ^ expected expression
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/parser/recover-struct.rs b/src/test/ui/parser/recover-struct.rs
new file mode 100644 (file)
index 0000000..535dd52
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn main() {
+    struct Test {
+        Very
+        Bad //~ ERROR found `Bad`
+        Stuff
+    }
+}
diff --git a/src/test/ui/parser/recover-struct.stderr b/src/test/ui/parser/recover-struct.stderr
new file mode 100644 (file)
index 0000000..715c9e5
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected `:`, found `Bad`
+  --> $DIR/recover-struct.rs:16:9
+   |
+LL |         Very
+   |             - expected `:`
+LL |         Bad //~ ERROR found `Bad`
+   |         ^^^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/regions-out-of-scope-slice.rs b/src/test/ui/parser/regions-out-of-scope-slice.rs
new file mode 100644 (file)
index 0000000..c4601b4
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// ignore-test blk region isn't supported in the front-end
+
+fn foo(cond: bool) {
+    // Here we will infer a type that uses the
+    // region of the if stmt then block, but in the scope:
+    let mut x; //~ ERROR foo
+
+    if cond {
+        x = &'blk [1,2,3];
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/removed-syntax-closure-lifetime.rs b/src/test/ui/parser/removed-syntax-closure-lifetime.rs
new file mode 100644 (file)
index 0000000..b305b18
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type closure = Box<lt/fn()>;
+//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `/`
diff --git a/src/test/ui/parser/removed-syntax-closure-lifetime.stderr b/src/test/ui/parser/removed-syntax-closure-lifetime.stderr
new file mode 100644 (file)
index 0000000..97219d5
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `/`
+  --> $DIR/removed-syntax-closure-lifetime.rs:13:22
+   |
+LL | type closure = Box<lt/fn()>;
+   |                      ^ expected one of 7 possible tokens here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-enum-newtype.rs b/src/test/ui/parser/removed-syntax-enum-newtype.rs
new file mode 100644 (file)
index 0000000..6a7f706
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+enum e = isize; //~ ERROR expected one of `<`, `where`, or `{`, found `=`
diff --git a/src/test/ui/parser/removed-syntax-enum-newtype.stderr b/src/test/ui/parser/removed-syntax-enum-newtype.stderr
new file mode 100644 (file)
index 0000000..97ba0ff
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `<`, `where`, or `{`, found `=`
+  --> $DIR/removed-syntax-enum-newtype.rs:13:8
+   |
+LL | enum e = isize; //~ ERROR expected one of `<`, `where`, or `{`, found `=`
+   |        ^ expected one of `<`, `where`, or `{` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-extern-const.rs b/src/test/ui/parser/removed-syntax-extern-const.rs
new file mode 100644 (file)
index 0000000..2768886
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+extern {
+    const i: isize;
+    //~^ ERROR extern items cannot be `const`
+}
diff --git a/src/test/ui/parser/removed-syntax-extern-const.stderr b/src/test/ui/parser/removed-syntax-extern-const.stderr
new file mode 100644 (file)
index 0000000..b40684c
--- /dev/null
@@ -0,0 +1,8 @@
+error: extern items cannot be `const`
+  --> $DIR/removed-syntax-extern-const.rs:14:5
+   |
+LL |     const i: isize;
+   |     ^^^^^ help: try using a static value: `static`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-field-let.rs b/src/test/ui/parser/removed-syntax-field-let.rs
new file mode 100644 (file)
index 0000000..6deb3bb
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+struct s {
+    let foo: (),
+    //~^  ERROR expected identifier, found keyword `let`
+    //~^^ ERROR expected `:`, found `foo`
+}
diff --git a/src/test/ui/parser/removed-syntax-field-let.stderr b/src/test/ui/parser/removed-syntax-field-let.stderr
new file mode 100644 (file)
index 0000000..8782a37
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected identifier, found keyword `let`
+  --> $DIR/removed-syntax-field-let.rs:14:5
+   |
+LL |     let foo: (),
+   |     ^^^ expected identifier, found keyword
+
+error: expected `:`, found `foo`
+  --> $DIR/removed-syntax-field-let.rs:14:9
+   |
+LL |     let foo: (),
+   |         ^^^ expected `:`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/removed-syntax-field-semicolon.rs b/src/test/ui/parser/removed-syntax-field-semicolon.rs
new file mode 100644 (file)
index 0000000..409b950
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct s {
+    bar: ();
+    //~^ ERROR expected `,`, or `}`, found `;`
+}
diff --git a/src/test/ui/parser/removed-syntax-field-semicolon.stderr b/src/test/ui/parser/removed-syntax-field-semicolon.stderr
new file mode 100644 (file)
index 0000000..3800697
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `,`, or `}`, found `;`
+  --> $DIR/removed-syntax-field-semicolon.rs:14:12
+   |
+LL |     bar: ();
+   |            ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-fixed-vec.rs b/src/test/ui/parser/removed-syntax-fixed-vec.rs
new file mode 100644 (file)
index 0000000..0f34db0
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*`
diff --git a/src/test/ui/parser/removed-syntax-fixed-vec.stderr b/src/test/ui/parser/removed-syntax-fixed-vec.stderr
new file mode 100644 (file)
index 0000000..737faf7
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*`
+  --> $DIR/removed-syntax-fixed-vec.rs:13:17
+   |
+LL | type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*`
+   |                 ^ expected one of 7 possible tokens here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-fn-sigil.rs b/src/test/ui/parser/removed-syntax-fn-sigil.rs
new file mode 100644 (file)
index 0000000..f47ad01
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn f() {
+    let x: fn~() = || (); //~ ERROR expected `(`, found `~`
+}
diff --git a/src/test/ui/parser/removed-syntax-fn-sigil.stderr b/src/test/ui/parser/removed-syntax-fn-sigil.stderr
new file mode 100644 (file)
index 0000000..587be63
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected `(`, found `~`
+  --> $DIR/removed-syntax-fn-sigil.rs:14:14
+   |
+LL |     let x: fn~() = || (); //~ ERROR expected `(`, found `~`
+   |         -    ^ expected `(`
+   |         |
+   |         while parsing the type for `x`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-mode.rs b/src/test/ui/parser/removed-syntax-mode.rs
new file mode 100644 (file)
index 0000000..6e99f8b
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn f(+x: isize) {} //~ ERROR expected pattern, found `+`
diff --git a/src/test/ui/parser/removed-syntax-mode.stderr b/src/test/ui/parser/removed-syntax-mode.stderr
new file mode 100644 (file)
index 0000000..7a27455
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected pattern, found `+`
+  --> $DIR/removed-syntax-mode.rs:13:6
+   |
+LL | fn f(+x: isize) {} //~ ERROR expected pattern, found `+`
+   |      ^ expected pattern
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-mut-vec-expr.rs b/src/test/ui/parser/removed-syntax-mut-vec-expr.rs
new file mode 100644 (file)
index 0000000..7e5bd27
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn f() {
+    let v = [mut 1, 2, 3, 4]; //~ ERROR expected expression, found keyword `mut`
+}
diff --git a/src/test/ui/parser/removed-syntax-mut-vec-expr.stderr b/src/test/ui/parser/removed-syntax-mut-vec-expr.stderr
new file mode 100644 (file)
index 0000000..253ecf4
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected expression, found keyword `mut`
+  --> $DIR/removed-syntax-mut-vec-expr.rs:14:14
+   |
+LL |     let v = [mut 1, 2, 3, 4]; //~ ERROR expected expression, found keyword `mut`
+   |              ^^^ expected expression
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-mut-vec-ty.rs b/src/test/ui/parser/removed-syntax-mut-vec-ty.rs
new file mode 100644 (file)
index 0000000..0cdf198
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type v = [mut isize]; //~ ERROR expected type, found keyword `mut`
diff --git a/src/test/ui/parser/removed-syntax-mut-vec-ty.stderr b/src/test/ui/parser/removed-syntax-mut-vec-ty.stderr
new file mode 100644 (file)
index 0000000..d6b47ac
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected type, found keyword `mut`
+  --> $DIR/removed-syntax-mut-vec-ty.rs:13:11
+   |
+LL | type v = [mut isize]; //~ ERROR expected type, found keyword `mut`
+   |           ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-ptr-lifetime.rs b/src/test/ui/parser/removed-syntax-ptr-lifetime.rs
new file mode 100644 (file)
index 0000000..b91ab87
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, `;`, or `<`, found `/`
diff --git a/src/test/ui/parser/removed-syntax-ptr-lifetime.stderr b/src/test/ui/parser/removed-syntax-ptr-lifetime.stderr
new file mode 100644 (file)
index 0000000..2538e54
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!`, `(`, `::`, `;`, or `<`, found `/`
+  --> $DIR/removed-syntax-ptr-lifetime.rs:13:22
+   |
+LL | type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, `;`, or `<`, found `/`
+   |                      ^ expected one of `!`, `(`, `::`, `;`, or `<` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-record.rs b/src/test/ui/parser/removed-syntax-record.rs
new file mode 100644 (file)
index 0000000..fd6f99b
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type t = { f: () }; //~ ERROR expected type, found `{`
diff --git a/src/test/ui/parser/removed-syntax-record.stderr b/src/test/ui/parser/removed-syntax-record.stderr
new file mode 100644 (file)
index 0000000..99d4ef4
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected type, found `{`
+  --> $DIR/removed-syntax-record.rs:13:10
+   |
+LL | type t = { f: () }; //~ ERROR expected type, found `{`
+   |          ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-static-fn.rs b/src/test/ui/parser/removed-syntax-static-fn.rs
new file mode 100644 (file)
index 0000000..4c0cd33
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+// ignore-tidy-linelength
+
+struct S;
+
+impl S {
+    static fn f() {}
+}
+//~^^ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`,
diff --git a/src/test/ui/parser/removed-syntax-static-fn.stderr b/src/test/ui/parser/removed-syntax-static-fn.stderr
new file mode 100644 (file)
index 0000000..dd3b0e0
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `static`
+  --> $DIR/removed-syntax-static-fn.rs:17:5
+   |
+LL | impl S {
+   |         - expected one of 11 possible tokens here
+LL |     static fn f() {}
+   |     ^^^^^^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-uniq-mut-expr.rs b/src/test/ui/parser/removed-syntax-uniq-mut-expr.rs
new file mode 100644 (file)
index 0000000..b16c77a
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn f() {
+    let a_box = box mut 42; //~ ERROR expected expression, found keyword `mut`
+}
diff --git a/src/test/ui/parser/removed-syntax-uniq-mut-expr.stderr b/src/test/ui/parser/removed-syntax-uniq-mut-expr.stderr
new file mode 100644 (file)
index 0000000..54e6a51
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected expression, found keyword `mut`
+  --> $DIR/removed-syntax-uniq-mut-expr.rs:14:21
+   |
+LL |     let a_box = box mut 42; //~ ERROR expected expression, found keyword `mut`
+   |                     ^^^ expected expression
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-uniq-mut-ty.rs b/src/test/ui/parser/removed-syntax-uniq-mut-ty.rs
new file mode 100644 (file)
index 0000000..8a47376
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type mut_box = Box<mut isize>; //~ ERROR expected one of `>`, lifetime, or type, found `mut`
diff --git a/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr b/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr
new file mode 100644 (file)
index 0000000..e9660f3
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `>`, lifetime, or type, found `mut`
+  --> $DIR/removed-syntax-uniq-mut-ty.rs:13:20
+   |
+LL | type mut_box = Box<mut isize>; //~ ERROR expected one of `>`, lifetime, or type, found `mut`
+   |                    ^^^ expected one of `>`, lifetime, or type here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-with-1.rs b/src/test/ui/parser/removed-syntax-with-1.rs
new file mode 100644 (file)
index 0000000..156b172
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn removed_with() {
+    struct S {
+        foo: (),
+        bar: (),
+    }
+
+    let a = S { foo: (), bar: () };
+    let b = S { foo: () with a };
+    //~^ ERROR expected one of `,`, `.`, `?`, `}`, or an operator, found `with`
+}
diff --git a/src/test/ui/parser/removed-syntax-with-1.stderr b/src/test/ui/parser/removed-syntax-with-1.stderr
new file mode 100644 (file)
index 0000000..37baf74
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `,`, `.`, `?`, `}`, or an operator, found `with`
+  --> $DIR/removed-syntax-with-1.rs:20:25
+   |
+LL |     let b = S { foo: () with a };
+   |                         ^^^^ expected one of `,`, `.`, `?`, `}`, or an operator here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/removed-syntax-with-2.rs b/src/test/ui/parser/removed-syntax-with-2.rs
new file mode 100644 (file)
index 0000000..c4354c0
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn removed_with() {
+    struct S {
+        foo: (),
+        bar: (),
+    }
+
+    let a = S { foo: (), bar: () };
+    let b = S { foo: (), with a };
+    //~^ ERROR expected one of `,` or `}`, found `a`
+}
diff --git a/src/test/ui/parser/removed-syntax-with-2.stderr b/src/test/ui/parser/removed-syntax-with-2.stderr
new file mode 100644 (file)
index 0000000..6999196
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `,` or `}`, found `a`
+  --> $DIR/removed-syntax-with-2.rs:20:31
+   |
+LL |     let b = S { foo: (), with a };
+   |                               ^ expected one of `,` or `}` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/require-parens-for-chained-comparison.rs b/src/test/ui/parser/require-parens-for-chained-comparison.rs
new file mode 100644 (file)
index 0000000..1ee6996
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn f<T>() {}
+
+fn main() {
+    false == false == false;
+    //~^ ERROR: chained comparison operators require parentheses
+
+    false == 0 < 2;
+    //~^ ERROR: chained comparison operators require parentheses
+
+    f<X>();
+    //~^ ERROR: chained comparison operators require parentheses
+    //~| HELP: use `::<...>` instead of `<...>`
+    //~| HELP: or use `(...)`
+}
diff --git a/src/test/ui/parser/require-parens-for-chained-comparison.stderr b/src/test/ui/parser/require-parens-for-chained-comparison.stderr
new file mode 100644 (file)
index 0000000..8facdab
--- /dev/null
@@ -0,0 +1,23 @@
+error: chained comparison operators require parentheses
+  --> $DIR/require-parens-for-chained-comparison.rs:16:11
+   |
+LL |     false == false == false;
+   |           ^^^^^^^^^^^^^^^^^
+
+error: chained comparison operators require parentheses
+  --> $DIR/require-parens-for-chained-comparison.rs:19:11
+   |
+LL |     false == 0 < 2;
+   |           ^^^^^^^^
+
+error: chained comparison operators require parentheses
+  --> $DIR/require-parens-for-chained-comparison.rs:22:6
+   |
+LL |     f<X>();
+   |      ^^^^
+   |
+   = help: use `::<...>` instead of `<...>` if you meant to specify type arguments
+   = help: or use `(...)` if you meant to specify fn arguments
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/parser/struct-field-numeric-shorthand.rs b/src/test/ui/parser/struct-field-numeric-shorthand.rs
new file mode 100644 (file)
index 0000000..49ba0d8
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct Rgb(u8, u8, u8);
+
+fn main() {
+    let _ = Rgb { 0, 1, 2 }; //~ ERROR expected identifier, found `0`
+}
diff --git a/src/test/ui/parser/struct-field-numeric-shorthand.stderr b/src/test/ui/parser/struct-field-numeric-shorthand.stderr
new file mode 100644 (file)
index 0000000..e909a9e
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected identifier, found `0`
+  --> $DIR/struct-field-numeric-shorthand.rs:16:19
+   |
+LL |     let _ = Rgb { 0, 1, 2 }; //~ ERROR expected identifier, found `0`
+   |             ---   ^ expected identifier
+   |             |
+   |             while parsing this struct
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/struct-literal-in-for.rs b/src/test/ui/parser/struct-literal-in-for.rs
new file mode 100644 (file)
index 0000000..9309845
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct Foo {
+    x: isize,
+}
+
+impl Foo {
+    fn hi(&self) -> bool {
+        true
+    }
+}
+
+fn main() {
+    for x in Foo {
+        x: 3    //~ ERROR expected type, found `3`
+    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+        println!("yo");
+    }
+}
diff --git a/src/test/ui/parser/struct-literal-in-for.stderr b/src/test/ui/parser/struct-literal-in-for.stderr
new file mode 100644 (file)
index 0000000..4a074ee
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected type, found `3`
+  --> $DIR/struct-literal-in-for.rs:25:12
+   |
+LL |         x: 3    //~ ERROR expected type, found `3`
+   |            ^ expecting a type here because of type ascription
+
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+  --> $DIR/struct-literal-in-for.rs:26:12
+   |
+LL |     }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+   |            ^ expected one of `.`, `;`, `?`, `}`, or an operator here
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/struct-literal-in-if.rs b/src/test/ui/parser/struct-literal-in-if.rs
new file mode 100644 (file)
index 0000000..db6a360
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct Foo {
+    x: isize,
+}
+
+impl Foo {
+    fn hi(&self) -> bool {
+        true
+    }
+}
+
+fn main() {
+    if Foo {
+        x: 3    //~ ERROR expected type, found `3`
+    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+        println!("yo");
+    }
+}
diff --git a/src/test/ui/parser/struct-literal-in-if.stderr b/src/test/ui/parser/struct-literal-in-if.stderr
new file mode 100644 (file)
index 0000000..02659ff
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected type, found `3`
+  --> $DIR/struct-literal-in-if.rs:25:12
+   |
+LL |         x: 3    //~ ERROR expected type, found `3`
+   |            ^ expecting a type here because of type ascription
+
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+  --> $DIR/struct-literal-in-if.rs:26:12
+   |
+LL |     }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+   |            ^ expected one of `.`, `;`, `?`, `}`, or an operator here
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/struct-literal-in-match-discriminant.rs b/src/test/ui/parser/struct-literal-in-match-discriminant.rs
new file mode 100644 (file)
index 0000000..7038cc7
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct Foo {
+    x: isize,
+}
+
+fn main() {
+    match Foo {
+        x: 3    //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `:`
+    } {
+        Foo {
+            x: x
+        } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
+    }
+}
diff --git a/src/test/ui/parser/struct-literal-in-match-discriminant.stderr b/src/test/ui/parser/struct-literal-in-match-discriminant.stderr
new file mode 100644 (file)
index 0000000..9b8eecd
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected one of `=>`, `@`, `if`, or `|`, found `:`
+  --> $DIR/struct-literal-in-match-discriminant.rs:19:10
+   |
+LL |         x: 3    //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `:`
+   |          ^ expected one of `=>`, `@`, `if`, or `|` here
+
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
+  --> $DIR/struct-literal-in-match-discriminant.rs:23:11
+   |
+LL |         } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
+   |           ^^ expected one of `.`, `;`, `?`, `}`, or an operator here
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/struct-literal-in-while.rs b/src/test/ui/parser/struct-literal-in-while.rs
new file mode 100644 (file)
index 0000000..75e4eb3
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct Foo {
+    x: isize,
+}
+
+impl Foo {
+    fn hi(&self) -> bool {
+        true
+    }
+}
+
+fn main() {
+    while Foo {
+        x: 3    //~ ERROR expected type, found `3`
+    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+        println!("yo");
+    }
+}
diff --git a/src/test/ui/parser/struct-literal-in-while.stderr b/src/test/ui/parser/struct-literal-in-while.stderr
new file mode 100644 (file)
index 0000000..6ecc14c
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected type, found `3`
+  --> $DIR/struct-literal-in-while.rs:25:12
+   |
+LL |         x: 3    //~ ERROR expected type, found `3`
+   |            ^ expecting a type here because of type ascription
+
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+  --> $DIR/struct-literal-in-while.rs:26:12
+   |
+LL |     }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+   |            ^ expected one of `.`, `;`, `?`, `}`, or an operator here
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/struct-literal-restrictions-in-lamda.rs b/src/test/ui/parser/struct-literal-restrictions-in-lamda.rs
new file mode 100644 (file)
index 0000000..6b7a265
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct Foo {
+    x: isize,
+}
+
+impl Foo {
+    fn hi(&self) -> bool {
+        true
+    }
+}
+
+fn main() {
+    while || Foo {
+        x: 3    //~ ERROR expected type, found `3`
+    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+        println!("yo");
+    }
+}
diff --git a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr
new file mode 100644 (file)
index 0000000..1341a2b
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected type, found `3`
+  --> $DIR/struct-literal-restrictions-in-lamda.rs:25:12
+   |
+LL |         x: 3    //~ ERROR expected type, found `3`
+   |            ^ expecting a type here because of type ascription
+
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+  --> $DIR/struct-literal-restrictions-in-lamda.rs:26:12
+   |
+LL |     }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+   |            ^ expected one of `.`, `;`, `?`, `}`, or an operator here
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/tag-variant-disr-non-nullary.rs b/src/test/ui/parser/tag-variant-disr-non-nullary.rs
new file mode 100644 (file)
index 0000000..2d86589
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+//error-pattern: discriminator values can only be used with a field-less enum
+
+enum color {
+    red = 0xff0000,
+    green = 0x00ff00,
+    blue = 0x0000ff,
+    black = 0x000000,
+    white = 0xffffff,
+    other (str),
+}
diff --git a/src/test/ui/parser/tag-variant-disr-non-nullary.stderr b/src/test/ui/parser/tag-variant-disr-non-nullary.stderr
new file mode 100644 (file)
index 0000000..990ddca
--- /dev/null
@@ -0,0 +1,8 @@
+error: discriminator values can only be used with a field-less enum
+  --> $DIR/tag-variant-disr-non-nullary.rs:20:13
+   |
+LL |     white = 0xffffff,
+   |             ^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trailing-carriage-return-in-string.rs b/src/test/ui/parser/trailing-carriage-return-in-string.rs
new file mode 100644 (file)
index 0000000..dd763dc
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// ignore-tidy-cr
+// Issue #11669
+
+fn main() {
+    // \r\n
+    let ok = "This is \
+ a test";
+    // \r only
+    let bad = "This is \\r a test";
+    //~^ ERROR unknown character escape: \r
+    //~^^ HELP this is an isolated carriage return
+
+}
diff --git a/src/test/ui/parser/trailing-carriage-return-in-string.stderr b/src/test/ui/parser/trailing-carriage-return-in-string.stderr
new file mode 100644 (file)
index 0000000..4e6d38d
--- /dev/null
@@ -0,0 +1,14 @@
+error: unknown character escape: /r
+  --> $DIR/trailing-carriage-return-in-string.rs:21:25
+   |
+LL |     let bad = "This is /\r a test";
+   |                         ^
+   |
+help: this is an isolated carriage return; consider checking your editor and version control settings
+  --> $DIR/trailing-carriage-return-in-string.rs:21:25
+   |
+LL |     let bad = "This is /\r a test";
+   |                         ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trait-bounds-not-on-impl.rs b/src/test/ui/parser/trait-bounds-not-on-impl.rs
new file mode 100644 (file)
index 0000000..7cd2774
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+trait Foo {
+}
+
+struct Bar;
+
+impl Foo + Owned for Bar { //~ ERROR expected a trait, found type
+}
+
+fn main() { }
diff --git a/src/test/ui/parser/trait-bounds-not-on-impl.stderr b/src/test/ui/parser/trait-bounds-not-on-impl.stderr
new file mode 100644 (file)
index 0000000..68bb090
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected a trait, found type
+  --> $DIR/trait-bounds-not-on-impl.rs:18:6
+   |
+LL | impl Foo + Owned for Bar { //~ ERROR expected a trait, found type
+   |      ^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trait-non-item-macros.rs b/src/test/ui/parser/trait-non-item-macros.rs
new file mode 100644 (file)
index 0000000..9f94d5d
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+macro_rules! bah {
+    ($a:expr) => ($a)
+    //~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, or `unsafe`, found `2`
+}
+
+trait bar {
+    bah!(2);
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/trait-non-item-macros.stderr b/src/test/ui/parser/trait-non-item-macros.stderr
new file mode 100644 (file)
index 0000000..2f4fdbf
--- /dev/null
@@ -0,0 +1,11 @@
+error: expected one of `async`, `const`, `extern`, `fn`, `type`, or `unsafe`, found `2`
+  --> $DIR/trait-non-item-macros.rs:12:19
+   |
+LL |     ($a:expr) => ($a)
+   |                   ^^ unexpected token
+...
+LL |     bah!(2);
+   |     -------- in this macro invocation
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trait-object-bad-parens.rs b/src/test/ui/parser/trait-object-bad-parens.rs
new file mode 100644 (file)
index 0000000..25e9c30
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn main() {
+    let _: Box<((Copy)) + Copy>;
+    //~^ ERROR expected a path on the left-hand side of `+`, not `((Copy))`
+    let _: Box<(Copy + Copy) + Copy>;
+    //~^ ERROR expected a path on the left-hand side of `+`, not `(Copy + Copy)`
+    let _: Box<(Copy +) + Copy>;
+    //~^ ERROR expected a path on the left-hand side of `+`, not `(Copy)`
+    let _: Box<(dyn Copy) + Copy>;
+    //~^ ERROR expected a path on the left-hand side of `+`, not `(dyn Copy)`
+}
diff --git a/src/test/ui/parser/trait-object-bad-parens.stderr b/src/test/ui/parser/trait-object-bad-parens.stderr
new file mode 100644 (file)
index 0000000..a1c483c
--- /dev/null
@@ -0,0 +1,27 @@
+error[E0178]: expected a path on the left-hand side of `+`, not `((Copy))`
+  --> $DIR/trait-object-bad-parens.rs:14:16
+   |
+LL |     let _: Box<((Copy)) + Copy>;
+   |                ^^^^^^^^^^^^^^^ expected a path
+
+error[E0178]: expected a path on the left-hand side of `+`, not `(Copy + Copy)`
+  --> $DIR/trait-object-bad-parens.rs:16:16
+   |
+LL |     let _: Box<(Copy + Copy) + Copy>;
+   |                ^^^^^^^^^^^^^^^^^^^^ expected a path
+
+error[E0178]: expected a path on the left-hand side of `+`, not `(Copy)`
+  --> $DIR/trait-object-bad-parens.rs:18:16
+   |
+LL |     let _: Box<(Copy +) + Copy>;
+   |                ^^^^^^^^^^^^^^^ expected a path
+
+error[E0178]: expected a path on the left-hand side of `+`, not `(dyn Copy)`
+  --> $DIR/trait-object-bad-parens.rs:20:16
+   |
+LL |     let _: Box<(dyn Copy) + Copy>;
+   |                ^^^^^^^^^^^^^^^^^ expected a path
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0178`.
diff --git a/src/test/ui/parser/trait-object-lifetime-parens.rs b/src/test/ui/parser/trait-object-lifetime-parens.rs
new file mode 100644 (file)
index 0000000..6be62d9
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+fn f<T: Copy + ('a)>() {} //~ ERROR parenthesized lifetime bounds are not supported
+
+fn main() {
+    let _: Box<Copy + ('a)>; //~ ERROR parenthesized lifetime bounds are not supported
+    let _: Box<('a) + Copy>; //~ ERROR expected type, found `'a`
+}
diff --git a/src/test/ui/parser/trait-object-lifetime-parens.stderr b/src/test/ui/parser/trait-object-lifetime-parens.stderr
new file mode 100644 (file)
index 0000000..7c7921b
--- /dev/null
@@ -0,0 +1,22 @@
+error: parenthesized lifetime bounds are not supported
+  --> $DIR/trait-object-lifetime-parens.rs:13:19
+   |
+LL | fn f<T: Copy + ('a)>() {} //~ ERROR parenthesized lifetime bounds are not supported
+   |                   ^
+
+error: parenthesized lifetime bounds are not supported
+  --> $DIR/trait-object-lifetime-parens.rs:16:26
+   |
+LL |     let _: Box<Copy + ('a)>; //~ ERROR parenthesized lifetime bounds are not supported
+   |                          ^
+
+error: expected type, found `'a`
+  --> $DIR/trait-object-lifetime-parens.rs:17:17
+   |
+LL |     let _: Box<('a) + Copy>; //~ ERROR expected type, found `'a`
+   |         -       ^^
+   |         |
+   |         while parsing the type for `_`
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/parser/trait-object-macro-matcher.rs b/src/test/ui/parser/trait-object-macro-matcher.rs
new file mode 100644 (file)
index 0000000..3a5bce5
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// A single lifetime is not parsed as a type.
+// `ty` matcher in particular doesn't accept a single lifetime
+
+macro_rules! m {
+    ($t: ty) => ( let _: $t; )
+}
+
+fn main() {
+    m!('static); //~ ERROR expected type, found `'static`
+}
diff --git a/src/test/ui/parser/trait-object-macro-matcher.stderr b/src/test/ui/parser/trait-object-macro-matcher.stderr
new file mode 100644 (file)
index 0000000..ab536dc
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected type, found `'static`
+  --> $DIR/trait-object-macro-matcher.rs:19:8
+   |
+LL |     m!('static); //~ ERROR expected type, found `'static`
+   |        ^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trait-object-polytrait-priority.rs b/src/test/ui/parser/trait-object-polytrait-priority.rs
new file mode 100644 (file)
index 0000000..b5fc06d
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Trait<'a> {}
+
+fn main() {
+    let _: &for<'a> Trait<'a> + 'static;
+    //~^ ERROR expected a path on the left-hand side of `+`, not `&for<'a> Trait<'a>`
+    //~| HELP try adding parentheses
+    //~| SUGGESTION &(for<'a> Trait<'a> + 'static)
+}
diff --git a/src/test/ui/parser/trait-object-polytrait-priority.stderr b/src/test/ui/parser/trait-object-polytrait-priority.stderr
new file mode 100644 (file)
index 0000000..2aac799
--- /dev/null
@@ -0,0 +1,9 @@
+error[E0178]: expected a path on the left-hand side of `+`, not `&for<'a> Trait<'a>`
+  --> $DIR/trait-object-polytrait-priority.rs:14:12
+   |
+LL |     let _: &for<'a> Trait<'a> + 'static;
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try adding parentheses: `&(for<'a> Trait<'a> + 'static)`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0178`.
diff --git a/src/test/ui/parser/trait-object-trait-parens.rs b/src/test/ui/parser/trait-object-trait-parens.rs
new file mode 100644 (file)
index 0000000..dc44f4f
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {}
+
+fn main() {
+    let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
+    let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
+    let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
+}
+
+FAIL //~ ERROR
diff --git a/src/test/ui/parser/trait-object-trait-parens.stderr b/src/test/ui/parser/trait-object-trait-parens.stderr
new file mode 100644 (file)
index 0000000..27f13d7
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!` or `::`, found `<eof>`
+  --> $DIR/trait-object-trait-parens.rs:21:1
+   |
+LL | FAIL //~ ERROR
+   | ^^^^ expected one of `!` or `::` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trait-plusequal-splitting.rs b/src/test/ui/parser/trait-plusequal-splitting.rs
new file mode 100644 (file)
index 0000000..cbb955f
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+// Fixes issue where `+` in generics weren't parsed if they were part of a `+=`.
+
+struct Whitespace<T: Clone + = ()> { t: T }
+struct TokenSplit<T: Clone +=  ()> { t: T }
+
+fn main() {
+}
+
+FAIL //~ ERROR
diff --git a/src/test/ui/parser/trait-plusequal-splitting.stderr b/src/test/ui/parser/trait-plusequal-splitting.stderr
new file mode 100644 (file)
index 0000000..266473e
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!` or `::`, found `<eof>`
+  --> $DIR/trait-plusequal-splitting.rs:20:1
+   |
+LL | FAIL //~ ERROR
+   | ^^^^ expected one of `!` or `::` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trait-pub-assoc-const.rs b/src/test/ui/parser/trait-pub-assoc-const.rs
new file mode 100644 (file)
index 0000000..cce6b5c
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    pub const Foo: u32;
+    //~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/trait-pub-assoc-const.stderr b/src/test/ui/parser/trait-pub-assoc-const.stderr
new file mode 100644 (file)
index 0000000..44d6fa9
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `pub`
+  --> $DIR/trait-pub-assoc-const.rs:12:5
+   |
+LL | trait Foo {
+   |            - expected one of 7 possible tokens here
+LL |     pub const Foo: u32;
+   |     ^^^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trait-pub-assoc-ty.rs b/src/test/ui/parser/trait-pub-assoc-ty.rs
new file mode 100644 (file)
index 0000000..d6a4e5e
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    pub type Foo;
+    //~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/trait-pub-assoc-ty.stderr b/src/test/ui/parser/trait-pub-assoc-ty.stderr
new file mode 100644 (file)
index 0000000..c8ba1cc
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `pub`
+  --> $DIR/trait-pub-assoc-ty.rs:12:5
+   |
+LL | trait Foo {
+   |            - expected one of 7 possible tokens here
+LL |     pub type Foo;
+   |     ^^^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trait-pub-method.rs b/src/test/ui/parser/trait-pub-method.rs
new file mode 100644 (file)
index 0000000..286cb4d
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {
+    pub fn foo();
+    //~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/trait-pub-method.stderr b/src/test/ui/parser/trait-pub-method.stderr
new file mode 100644 (file)
index 0000000..125a25f
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `pub`
+  --> $DIR/trait-pub-method.rs:12:5
+   |
+LL | trait Foo {
+   |            - expected one of 7 possible tokens here
+LL |     pub fn foo();
+   |     ^^^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/type-parameters-in-field-exprs.rs b/src/test/ui/parser/type-parameters-in-field-exprs.rs
new file mode 100644 (file)
index 0000000..cb018ff
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+struct Foo {
+    x: isize,
+    y: isize,
+}
+
+fn main() {
+    let f = Foo {
+        x: 1,
+        y: 2,
+    };
+    f.x::<isize>;
+    //~^ ERROR field expressions may not have generic arguments
+    f.x::<>;
+    //~^ ERROR field expressions may not have generic arguments
+    f.x::();
+    //~^ ERROR field expressions may not have generic arguments
+}
diff --git a/src/test/ui/parser/type-parameters-in-field-exprs.stderr b/src/test/ui/parser/type-parameters-in-field-exprs.stderr
new file mode 100644 (file)
index 0000000..f8b63b4
--- /dev/null
@@ -0,0 +1,20 @@
+error: field expressions may not have generic arguments
+  --> $DIR/type-parameters-in-field-exprs.rs:23:8
+   |
+LL |     f.x::<isize>;
+   |        ^^^^^^^^^
+
+error: field expressions may not have generic arguments
+  --> $DIR/type-parameters-in-field-exprs.rs:25:8
+   |
+LL |     f.x::<>;
+   |        ^^^^
+
+error: field expressions may not have generic arguments
+  --> $DIR/type-parameters-in-field-exprs.rs:27:8
+   |
+LL |     f.x::();
+   |        ^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/parser/unbalanced-doublequote.rs b/src/test/ui/parser/unbalanced-doublequote.rs
new file mode 100644 (file)
index 0000000..8d10f64
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+
+// error-pattern: unterminated double quote string
+
+
+fn main() {
+    "
+}
diff --git a/src/test/ui/parser/unbalanced-doublequote.stderr b/src/test/ui/parser/unbalanced-doublequote.stderr
new file mode 100644 (file)
index 0000000..e12ecee
--- /dev/null
@@ -0,0 +1,9 @@
+error: unterminated double quote string
+  --> $DIR/unbalanced-doublequote.rs:18:5
+   |
+LL | /     "
+LL | | }
+   | |__^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/underscore-suffix-for-float.rs b/src/test/ui/parser/underscore-suffix-for-float.rs
new file mode 100644 (file)
index 0000000..8327217
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let a = 42._; //~ ERROR expected identifier, found reserved identifier `_`
+                  //~^ ERROR `{integer}` is a primitive type and therefore doesn't have fields
+}
diff --git a/src/test/ui/parser/underscore-suffix-for-float.stderr b/src/test/ui/parser/underscore-suffix-for-float.stderr
new file mode 100644 (file)
index 0000000..f59c761
--- /dev/null
@@ -0,0 +1,15 @@
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/underscore-suffix-for-float.rs:12:16
+   |
+LL |     let a = 42._; //~ ERROR expected identifier, found reserved identifier `_`
+   |                ^ expected identifier, found reserved identifier
+
+error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
+  --> $DIR/underscore-suffix-for-float.rs:12:16
+   |
+LL |     let a = 42._; //~ ERROR expected identifier, found reserved identifier `_`
+   |                ^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0610`.
diff --git a/src/test/ui/parser/underscore-suffix-for-string.rs b/src/test/ui/parser/underscore-suffix-for-string.rs
new file mode 100644 (file)
index 0000000..05de5f8
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let _ = "Foo"_;
+    //~^ WARNING underscore literal suffix is not allowed
+    //~| WARNING this was previously accepted
+    //~| NOTE issue #42326
+}
+
+FAIL
+//~^ ERROR
+//~| NOTE
diff --git a/src/test/ui/parser/underscore-suffix-for-string.stderr b/src/test/ui/parser/underscore-suffix-for-string.stderr
new file mode 100644 (file)
index 0000000..b20fd29
--- /dev/null
@@ -0,0 +1,17 @@
+warning: underscore literal suffix is not allowed
+  --> $DIR/underscore-suffix-for-string.rs:12:18
+   |
+LL |     let _ = "Foo"_;
+   |                  ^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #42326 <https://github.com/rust-lang/rust/issues/42326>
+
+error: expected one of `!` or `::`, found `<eof>`
+  --> $DIR/underscore-suffix-for-string.rs:18:1
+   |
+LL | FAIL
+   | ^^^^ expected one of `!` or `::` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/unicode-chars.rs b/src/test/ui/parser/unicode-chars.rs
new file mode 100644 (file)
index 0000000..f590a7f
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let y = 0;
+    //~^ ERROR unknown start of token: \u{37e}
+    //~^^ HELP Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not
+}
diff --git a/src/test/ui/parser/unicode-chars.stderr b/src/test/ui/parser/unicode-chars.stderr
new file mode 100644 (file)
index 0000000..5c30a50
--- /dev/null
@@ -0,0 +1,12 @@
+error: unknown start of token: /u{37e}
+  --> $DIR/unicode-chars.rs:14:14
+   |
+LL |     let y = 0;
+   |              ^
+help: Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not
+   |
+LL |     let y = 0;
+   |              ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/unsized.rs b/src/test/ui/parser/unsized.rs
new file mode 100644 (file)
index 0000000..1bcb520
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Test syntax checks for `type` keyword.
+
+struct S1 for type; //~ ERROR expected `where`, `{`, `(`, or `;` after struct name, found `for`
+
+pub fn main() {
+}
diff --git a/src/test/ui/parser/unsized.stderr b/src/test/ui/parser/unsized.stderr
new file mode 100644 (file)
index 0000000..89de7ee
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `where`, `{`, `(`, or `;` after struct name, found `for`
+  --> $DIR/unsized.rs:15:11
+   |
+LL | struct S1 for type; //~ ERROR expected `where`, `{`, `(`, or `;` after struct name, found `for`
+   |           ^^^ expected `where`, `{`, `(`, or `;` after struct name
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/unsized2.rs b/src/test/ui/parser/unsized2.rs
new file mode 100644 (file)
index 0000000..f3af874
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Test syntax checks for `type` keyword.
+
+fn f<X>() {}
+
+pub fn main() {
+    f<type>(); //~ ERROR expected expression, found keyword `type`
+}
diff --git a/src/test/ui/parser/unsized2.stderr b/src/test/ui/parser/unsized2.stderr
new file mode 100644 (file)
index 0000000..323b8fd
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected expression, found keyword `type`
+  --> $DIR/unsized2.rs:18:7
+   |
+LL |     f<type>(); //~ ERROR expected expression, found keyword `type`
+   |       ^^^^ expected expression
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/use-as-where-use-ends-with-mod-sep.rs b/src/test/ui/parser/use-as-where-use-ends-with-mod-sep.rs
new file mode 100644 (file)
index 0000000..9e16e29
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+use std::any:: as foo; //~ ERROR expected identifier, found keyword `as`
+//~^ ERROR: expected one of `::`, `;`, or `as`, found `foo`
diff --git a/src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr b/src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr
new file mode 100644 (file)
index 0000000..e7452f4
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected identifier, found keyword `as`
+  --> $DIR/use-as-where-use-ends-with-mod-sep.rs:13:16
+   |
+LL | use std::any:: as foo; //~ ERROR expected identifier, found keyword `as`
+   |                ^^ expected identifier, found keyword
+
+error: expected one of `::`, `;`, or `as`, found `foo`
+  --> $DIR/use-as-where-use-ends-with-mod-sep.rs:13:19
+   |
+LL | use std::any:: as foo; //~ ERROR expected identifier, found keyword `as`
+   |                   ^^^ expected one of `::`, `;`, or `as` here
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/use-ends-with-mod-sep.rs b/src/test/ui/parser/use-ends-with-mod-sep.rs
new file mode 100644 (file)
index 0000000..e6a10d4
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+use std::any::; //~ ERROR expected identifier, found `;`
diff --git a/src/test/ui/parser/use-ends-with-mod-sep.stderr b/src/test/ui/parser/use-ends-with-mod-sep.stderr
new file mode 100644 (file)
index 0000000..c463f74
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected identifier, found `;`
+  --> $DIR/use-ends-with-mod-sep.rs:13:15
+   |
+LL | use std::any::; //~ ERROR expected identifier, found `;`
+   |               ^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/variadic-ffi-3.rs b/src/test/ui/parser/variadic-ffi-3.rs
new file mode 100644 (file)
index 0000000..d202fa3
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn foo(x: isize, ...) {
+    //~^ ERROR: only foreign functions are allowed to be variadic
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/variadic-ffi-3.stderr b/src/test/ui/parser/variadic-ffi-3.stderr
new file mode 100644 (file)
index 0000000..93f1925
--- /dev/null
@@ -0,0 +1,8 @@
+error: only foreign functions are allowed to be variadic
+  --> $DIR/variadic-ffi-3.rs:13:18
+   |
+LL | fn foo(x: isize, ...) {
+   |                  ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/variadic-ffi-4.rs b/src/test/ui/parser/variadic-ffi-4.rs
new file mode 100644 (file)
index 0000000..ef9d455
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+extern "C" fn foo(x: isize, ...) {
+    //~^ ERROR: only foreign functions are allowed to be variadic
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/variadic-ffi-4.stderr b/src/test/ui/parser/variadic-ffi-4.stderr
new file mode 100644 (file)
index 0000000..228c0d6
--- /dev/null
@@ -0,0 +1,8 @@
+error: only foreign functions are allowed to be variadic
+  --> $DIR/variadic-ffi-4.rs:13:29
+   |
+LL | extern "C" fn foo(x: isize, ...) {
+   |                             ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/virtual-structs.rs b/src/test/ui/parser/virtual-structs.rs
new file mode 100644 (file)
index 0000000..f34eddc
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// Test diagnostics for the removed struct inheritance feature.
+
+virtual struct SuperStruct { //~ ERROR expected item, found `virtual`
+    f1: isize,
+}
+
+struct Struct : SuperStruct;
+
+pub fn main() {}
diff --git a/src/test/ui/parser/virtual-structs.stderr b/src/test/ui/parser/virtual-structs.stderr
new file mode 100644 (file)
index 0000000..6af9922
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected item, found `virtual`
+  --> $DIR/virtual-structs.rs:15:1
+   |
+LL | virtual struct SuperStruct { //~ ERROR expected item, found `virtual`
+   | ^^^^^^^ expected item
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/where-clauses-no-bounds-or-predicates.rs b/src/test/ui/parser/where-clauses-no-bounds-or-predicates.rs
new file mode 100644 (file)
index 0000000..cf67b51
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+// Empty predicate list is OK
+fn equal1<T>(_: &T, _: &T) -> bool where {
+    true
+}
+
+// Empty bound list is OK
+fn equal2<T>(_: &T, _: &T) -> bool where T: {
+    true
+}
+
+fn foo<'a>() where 'a {}
+//~^ ERROR expected `:`, found `{`
+
+fn main() {
+}
diff --git a/src/test/ui/parser/where-clauses-no-bounds-or-predicates.stderr b/src/test/ui/parser/where-clauses-no-bounds-or-predicates.stderr
new file mode 100644 (file)
index 0000000..1dda2d3
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected `:`, found `{`
+  --> $DIR/where-clauses-no-bounds-or-predicates.rs:23:23
+   |
+LL | fn foo<'a>() where 'a {}
+   |                       ^ expected `:`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/where_with_bound.rs b/src/test/ui/parser/where_with_bound.rs
new file mode 100644 (file)
index 0000000..2948619
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn foo<T>() where <T>::Item: ToString, T: Iterator { }
+//~^ ERROR generic parameters on `where` clauses are reserved for future use
+
+fn main() {}
diff --git a/src/test/ui/parser/where_with_bound.stderr b/src/test/ui/parser/where_with_bound.stderr
new file mode 100644 (file)
index 0000000..7cf16fb
--- /dev/null
@@ -0,0 +1,8 @@
+error: generic parameters on `where` clauses are reserved for future use
+  --> $DIR/where_with_bound.rs:13:19
+   |
+LL | fn foo<T>() where <T>::Item: ToString, T: Iterator { }
+   |                   ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/wrong-escape-of-curly-braces.rs b/src/test/ui/parser/wrong-escape-of-curly-braces.rs
new file mode 100644 (file)
index 0000000..d86bf72
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn f() {
+    let ok = "{{everything fine}}";
+    let bad = "\{it is wrong\}";
+    //~^  ERROR unknown character escape: {
+    //~^^  HELP if used in a formatting string, curly braces are escaped with `{{` and `}}`
+    //~^^^ ERROR unknown character escape: }
+    //~^^^^  HELP if used in a formatting string, curly braces are escaped with `{{` and `}}`
+}
diff --git a/src/test/ui/parser/wrong-escape-of-curly-braces.stderr b/src/test/ui/parser/wrong-escape-of-curly-braces.stderr
new file mode 100644 (file)
index 0000000..6c3e261
--- /dev/null
@@ -0,0 +1,31 @@
+error: unknown character escape: {
+  --> $DIR/wrong-escape-of-curly-braces.rs:13:17
+   |
+LL |     let bad = "/{it is wrong/}";
+   |                 ^
+   |
+help: if used in a formatting string, curly braces are escaped with `{{` and `}}`
+  --> $DIR/wrong-escape-of-curly-braces.rs:13:17
+   |
+LL |     let bad = "/{it is wrong/}";
+   |                 ^
+
+error: unknown character escape: }
+  --> $DIR/wrong-escape-of-curly-braces.rs:13:30
+   |
+LL |     let bad = "/{it is wrong/}";
+   |                              ^
+   |
+help: if used in a formatting string, curly braces are escaped with `{{` and `}}`
+  --> $DIR/wrong-escape-of-curly-braces.rs:13:30
+   |
+LL |     let bad = "/{it is wrong/}";
+   |                              ^
+
+error[E0601]: `main` function not found in crate `wrong_escape_of_curly_braces`
+   |
+   = note: consider adding a `main` function to `$DIR/wrong-escape-of-curly-braces.rs`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0601`.