This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 295225b
Uplift the
- Deprecate clippy::invalid_atomic_ordering
- Use rustc_diagnostic_item for the orderings in the invalid_atomic_ordering lint
- Reduce code duplication
- Give up on making enum variants diagnostic items and just look for
`Ordering` instead
I ran into tons of trouble with this because apparently the change to
store HIR attrs in a side table also gave the DefIds of the
constructor instead of the variant itself. So I had to change
`matches_ordering` to also check the grandparent of the defid as well.
- Rename `atomic_ordering_x` symbols to just the name of the variant
- Fix typos in checks - there were a few places that said "may not be
Release" in the diagnostic but actually checked for SeqCst in the lint.
- Make constant items const
- Use fewer diagnostic items
- Only look at arguments after making sure the method matches
This prevents an ICE when there aren't enough arguments.
- Ignore trait methods
- Only check Ctors instead of going through `qpath_res`
The functions take values, so this couldn't ever be anything else.
- Add if_chain to allowed dependencies
- Fix grammar
- Remove unnecessary allowinvalid_atomic_ordering lint from clippy to rustc1 parent c9e45e4 commit 295225b
File tree
20 files changed
+9
-1425
lines changed- clippy_lints/src
- tests/ui
20 files changed
+9
-1425
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
| |||
537 | 536 | | |
538 | 537 | | |
539 | 538 | | |
540 | | - | |
541 | 539 | | |
542 | 540 | | |
543 | 541 | | |
| |||
1174 | 1172 | | |
1175 | 1173 | | |
1176 | 1174 | | |
1177 | | - | |
1178 | 1175 | | |
1179 | 1176 | | |
1180 | 1177 | | |
| |||
1670 | 1667 | | |
1671 | 1668 | | |
1672 | 1669 | | |
1673 | | - | |
1674 | 1670 | | |
1675 | 1671 | | |
1676 | 1672 | | |
| |||
2044 | 2040 | | |
2045 | 2041 | | |
2046 | 2042 | | |
2047 | | - | |
2048 | 2043 | | |
2049 | 2044 | | |
2050 | 2045 | | |
| |||
2183 | 2178 | | |
2184 | 2179 | | |
2185 | 2180 | | |
| 2181 | + | |
2186 | 2182 | | |
2187 | 2183 | | |
2188 | 2184 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments