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 Dont check must_use on nested impl Future from fn 2023-05-12 02:08:43 +00:00
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 emit unused_parens for break if it is not immediately followed by a block 2023-04-13 18:09:47 +02:00
issue-54538-unused-parens-lint.rs emit unused_parens for break if it is not immediately followed by a block 2023-04-13 18:09:47 +02:00
issue-54538-unused-parens-lint.stderr emit unused_parens for break if it is not immediately followed by a block 2023-04-13 18:09:47 +02:00
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 Emit warnings on unused parens/braces in index expressions 2023-02-02 12:46:31 -07:00
issue-96606.stderr Emit warnings on unused parens/braces in index expressions 2023-02-02 12:46:31 -07:00
issue-103320-must-use-ops.rs Fix #103320, add explanatory message for [#must_use] 2023-02-04 00:27:03 +08:00
issue-103320-must-use-ops.stderr Fix #103320, add explanatory message for [#must_use] 2023-02-04 00:27:03 +08:00
issue-104397.rs
issue-105061-array-lint.rs add test case for issue 105601 2023-01-14 17:11:05 +08:00
issue-105061-array-lint.stderr add test case for issue 105601 2023-01-14 17:11:05 +08:00
issue-105061-should-lint.rs comments feedback 2023-01-16 20:44:14 +08:00
issue-105061-should-lint.stderr comments feedback 2023-01-16 20:44:14 +08:00
issue-105061.rs
issue-105061.stderr
lint-unused-extern-crate.rs Adjust UI tests for unit_bindings 2023-06-12 20:24:48 +08:00
lint-unused-extern-crate.stderr
lint-unused-imports.rs Adjust UI tests for unit_bindings 2023-06-12 20:24:48 +08:00
lint-unused-imports.stderr
lint-unused-mut-self.fixed
lint-unused-mut-self.rs
lint-unused-mut-self.stderr
lint-unused-mut-variables.rs fix false negative for unused_mut 2023-04-28 19:35:40 +02:00
lint-unused-mut-variables.stderr fix false negative for unused_mut 2023-04-28 19:35:40 +02:00
lint-unused-variables.rs Adjust UI tests for unit_bindings 2023-06-12 20:24:48 +08:00
lint-unused-variables.stderr Run check_match and check_liveness when MIR is built instead of having an explicit phase for them 2023-04-21 22:32:38 +00:00
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 error-msg: expand suggestion for unused lint 2023-03-15 23:30:12 +13:00
must-use-block-expr.fixed Extend unused_must_use to cover block exprs 2023-06-15 17:59:13 +08:00
must-use-block-expr.rs Extend unused_must_use to cover block exprs 2023-06-15 17:59:13 +08:00
must-use-block-expr.stderr Extend unused_must_use to cover block exprs 2023-06-15 17:59:13 +08:00
must-use-box-from-raw.rs
must-use-box-from-raw.stderr error-msg: expand suggestion for unused lint 2023-03-15 23:30:12 +13:00
must-use-foreign.rs Dont check must_use on nested impl Future from fn 2023-05-12 02:08:43 +00:00
must-use-ops.rs
must-use-ops.stderr
no-unused-parens-return-block.rs
trait-alias-supertrait.rs Broken tests 2023-04-11 17:45:42 +00:00
unused_attributes-must_use.rs
unused_attributes-must_use.stderr error-msg: expand suggestion for unused lint 2023-03-15 23:30:12 +13:00
unused-allocation.rs Remove feature(box_syntax) from unused allocation list test 2023-03-03 19:02:35 +00:00
unused-allocation.stderr Remove feature(box_syntax) from unused allocation list test 2023-03-03 19:02:35 +00:00
unused-async.rs Dont check must_use on nested impl Future from fn 2023-05-12 02:08:43 +00:00
unused-async.stderr Dont check must_use on nested impl Future from fn 2023-05-12 02:08:43 +00:00
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 error-msg: expand suggestion for unused lint 2023-03-15 23:30:12 +13:00
unused-supertrait.rs
unused-supertrait.stderr
useless-comment.rs
useless-comment.stderr