rust/tests/ui/lint/unused
Martin Nordholts 5d32fd1b06 Add regression test for invalid unused const in method
The warning can be reproduced with 1.63 but not with 1.64.

    $ rustc +1.63 tests/ui/lint/unused/const-local-var.rs
    warning: constant `F` is never used
      --> tests/ui/lint/unused/const-local-var.rs:14:9
       |
    14 |         const F: i32 = 2;
       |         ^^^^^^^^^^^^^^^^^
       |
       = note: `#[warn(dead_code)]` on by default
    $ rustc +1.64 tests/ui/lint/unused/const-local-var.rs

Add a regression test to prevent the problem from re-appearing.
2023-07-25 12:49:19 +02:00
..
auxiliary
const-local-var.rs Add regression test for invalid unused const in method 2023-07-25 12:49:19 +02:00
issue-30730.rs
issue-30730.stderr
issue-46576.rs
issue-46576.stderr
issue-47390-unused-variable-in-struct-pattern.rs
issue-47390-unused-variable-in-struct-pattern.stderr
issue-54180-unused-ref-field.fixed
issue-54180-unused-ref-field.rs
issue-54180-unused-ref-field.stderr
issue-54538-unused-parens-lint.fixed
issue-54538-unused-parens-lint.rs
issue-54538-unused-parens-lint.stderr
issue-59896.rs
issue-59896.stderr
issue-67691-unused-field-in-or-pattern.rs
issue-67691-unused-field-in-or-pattern.stderr
issue-70041.rs
issue-70041.stderr
issue-71290-unused-paren-binop.rs
issue-74883-unused-paren-baren-yield.rs
issue-74883-unused-paren-baren-yield.stderr
issue-81314-unused-span-ident.fixed
issue-81314-unused-span-ident.rs
issue-81314-unused-span-ident.stderr
issue-85913.rs
issue-85913.stderr
issue-88519-unused-paren.rs
issue-90807-unused-paren-error.rs
issue-90807-unused-paren-error.stderr
issue-90807-unused-paren.rs
issue-92751.rs
issue-92751.stderr
issue-96606.rs
issue-96606.stderr
issue-103320-must-use-ops.rs
issue-103320-must-use-ops.stderr
issue-104397.rs
issue-105061-array-lint.rs
issue-105061-array-lint.stderr
issue-105061-should-lint.rs
issue-105061-should-lint.stderr
issue-105061.rs
issue-105061.stderr
lint-unused-extern-crate.rs
lint-unused-extern-crate.stderr
lint-unused-imports.rs
lint-unused-imports.stderr
lint-unused-mut-self.fixed
lint-unused-mut-self.rs
lint-unused-mut-self.stderr
lint-unused-mut-variables.rs
lint-unused-mut-variables.stderr
lint-unused-variables.rs
lint-unused-variables.stderr
must_use-array.rs
must_use-array.stderr
must_use-in-stdlib-traits.rs
must_use-in-stdlib-traits.stderr
must_use-trait.rs
must_use-trait.stderr
must_use-tuple.rs
must_use-tuple.stderr
must_use-unit.rs
must_use-unit.stderr
must-use-block-expr.fixed
must-use-block-expr.rs
must-use-block-expr.stderr
must-use-box-from-raw.rs
must-use-box-from-raw.stderr
must-use-foreign.rs
must-use-ops.rs
must-use-ops.stderr
no-unused-parens-return-block.rs
trait-alias-supertrait.rs
unused_attributes-must_use.rs
unused_attributes-must_use.stderr
unused-allocation.rs
unused-allocation.stderr
unused-async.rs
unused-async.stderr
unused-attr-duplicate.rs
unused-attr-duplicate.stderr
unused-attr-macro-rules.rs
unused-attr-macro-rules.stderr
unused-closure.rs
unused-closure.stderr
unused-doc-comments-edge-cases.rs
unused-doc-comments-edge-cases.stderr
unused-doc-comments-for-macros.rs
unused-doc-comments-for-macros.stderr
unused-macro-rules-compile-error.rs
unused-macro-rules-compile-error.stderr
unused-macro-rules-decl.rs
unused-macro-rules-decl.stderr
unused-macro-rules-malformed-rule.rs
unused-macro-rules-malformed-rule.stderr
unused-macro-rules.rs
unused-macro-rules.stderr
unused-macro-with-bad-frag-spec.rs
unused-macro-with-bad-frag-spec.stderr
unused-macro-with-follow-violation.rs
unused-macro-with-follow-violation.stderr
unused-macros-decl.rs
unused-macros-decl.stderr
unused-macros-malformed-rule.rs
unused-macros-malformed-rule.stderr
unused-macros.rs
unused-macros.stderr
unused-mut-warning-captured-var.fixed
unused-mut-warning-captured-var.rs
unused-mut-warning-captured-var.stderr
unused-result.rs
unused-result.stderr
unused-supertrait.rs
unused-supertrait.stderr
useless-comment.rs
useless-comment.stderr