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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-30730.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-46576.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-46576.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-47390-unused-variable-in-struct-pattern.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-47390-unused-variable-in-struct-pattern.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54180-unused-ref-field.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54180-unused-ref-field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54180-unused-ref-field.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-59896.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67691-unused-field-in-or-pattern.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67691-unused-field-in-or-pattern.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-70041.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-70041.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-71290-unused-paren-binop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-74883-unused-paren-baren-yield.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-74883-unused-paren-baren-yield.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-81314-unused-span-ident.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-81314-unused-span-ident.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-81314-unused-span-ident.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85913.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85913.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88519-unused-paren.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90807-unused-paren-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90807-unused-paren-error.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90807-unused-paren.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-92751.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-92751.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 fix #105061, Fix unused_parens issue for higher ranked function pointers 2023-01-14 17:11:04 +08:00
issue-105061.stderr fix #105061, Fix unused_parens issue for higher ranked function pointers 2023-01-14 17:11:04 +08:00
lint-unused-extern-crate.rs Adjust UI tests for unit_bindings 2023-06-12 20:24:48 +08:00
lint-unused-extern-crate.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lint-unused-imports.rs Adjust UI tests for unit_bindings 2023-06-12 20:24:48 +08:00
lint-unused-imports.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lint-unused-mut-self.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lint-unused-mut-self.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lint-unused-mut-self.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must_use-array.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must_use-in-stdlib-traits.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must_use-in-stdlib-traits.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must_use-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must_use-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must_use-tuple.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must_use-tuple.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must_use-unit.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must-use-ops.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no-unused-parens-return-block.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-alias-supertrait.rs Broken tests 2023-04-11 17:45:42 +00:00
unused_attributes-must_use.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-attr-duplicate.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-attr-macro-rules.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-attr-macro-rules.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-doc-comments-edge-cases.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-doc-comments-edge-cases.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-doc-comments-for-macros.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-doc-comments-for-macros.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-rules-compile-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-rules-compile-error.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-rules-decl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-rules-decl.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-rules-malformed-rule.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-rules-malformed-rule.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-rules.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-rules.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-with-bad-frag-spec.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-with-bad-frag-spec.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-with-follow-violation.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macro-with-follow-violation.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macros-decl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macros-decl.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macros-malformed-rule.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macros-malformed-rule.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macros.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-macros.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-mut-warning-captured-var.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-mut-warning-captured-var.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-mut-warning-captured-var.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-result.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-result.stderr error-msg: expand suggestion for unused lint 2023-03-15 23:30:12 +13:00
unused-supertrait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-supertrait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
useless-comment.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
useless-comment.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00