about summary refs log tree commit diff
path: root/tests/ui/lint/non-snake-case
AgeCommit message (Collapse)AuthorLines
2025-08-30On unused binding in pattern, suggest unit struct/variant with similar nameEsteban Küber-3/+29
When encountering a typo in a pattern that gets interpreted as an unused binding, look for unit struct/variant of the same type as the binding: ``` error: unused variable: `Non` --> $DIR/binding-typo-2.rs:36:9 | LL | Non => {} | ^^^ | help: if this is intentional, prefix it with an underscore | LL | _Non => {} | + help: you might have meant to pattern match on the similarly named variant `None` | LL - Non => {} LL + std::prelude::v1::None => {} | ```
2025-04-20Check bare function idents for non snake-case nameUrgau-1/+10
2025-04-10tests: use specific-purpose `needs-crate-type` over `ignore-$target` directivesJieyou Xu-27/+26
Not all existing tests are converted, I only updated ones that I can easily find via directive comments.
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-6/+9
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2024-11-26tests: remove `//@ pretty-expanded` usages许杰友 Jieyou Xu (Joe)-1/+0
Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
2024-10-29Fix directives for lint-non-snake-case-crateTyler Mandry-16/+23
This test fails on targets without unwinding because the proc macro was compiled as the target, not the host. Some targets were explicitly disabled to pass CI, but these directives are more general. Fixes Fuchsia tests.
2024-10-16Ignore lint-non-snake-case-crate#proc_macro_ on targets without unwindCharles Celerier-12/+16
The lint-non-snake-case-crate test may emit a warning in stderr if the target does not support unwinding ``` warning: building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic ``` Consequently, the test will fail on targets that don't support unwinding as written. This change prevents lint-non-snake-case-crate#proc_macro_ from running on targets that don't support unwind by using the needs-unwind directive.
2024-09-21Coalesce `non_snake_case` crate test set with revisions许杰友 Jieyou Xu (Joe)-100/+65
2024-06-15tests/ui/lint: Move 19 tests to new `non-snake-case` subdirMartin Nordholts-0/+673
Mainly so that it is easier to only run all `non-snake-case`-specific tests but no other tests with: ./x test tests/ui/lint/non-snake-case But also to reduce the size of the large `tests/ui/lint` directory. And rename some tests to pass tidy, and remove them from `src/tools/tidy/src/issues.txt`.