about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorMartin Nordholts <enselic@gmail.com>2023-07-25 12:42:54 +0200
committerMartin Nordholts <enselic@gmail.com>2023-07-25 12:49:19 +0200
commit5d32fd1b0623651cca15acd71ecc901324f3170c (patch)
tree8430cb83e0849a627d275e605f4b8059f2447b54 /compiler/rustc_interface/src/errors.rs
parentc026d6a400a342e572bdd0de1abbb51680b28047 (diff)
downloadrust-5d32fd1b0623651cca15acd71ecc901324f3170c.tar.gz
rust-5d32fd1b0623651cca15acd71ecc901324f3170c.zip
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.
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions