Skip to content

Rollup of 8 pull requests #120665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4272f1b
get rid of nontrivial_structural_match lint and custom_eq const qualif
RalfJung Jan 27, 2024
32e4862
show indirect_structural_match and pointer_structural_match in future…
RalfJung Jan 27, 2024
0808691
update the tracking issue for structural match violations
RalfJung Jan 27, 2024
efbfb04
merge the accepted-structural-match tests into one
RalfJung Jan 28, 2024
c367983
Suggest name value cfg when only value is used for check-cfg
chenyukang Jan 28, 2024
0213c87
limit the names_possiblilities to less than 3
chenyukang Jan 30, 2024
ca243e7
add testcase for more than 3 cfg names
chenyukang Jan 30, 2024
d34b0fa
Add test for method on unbounded type parameter receiver
estebank Jan 26, 2024
20b1c2a
Account for unbounded type param receiver in suggestions
estebank Jan 26, 2024
9ccc770
fix rebase
estebank Jan 30, 2024
5c41409
Account for non-overlapping unmet trait bounds in suggestion
estebank Jan 30, 2024
0f55e1b
Simplify `impl_zeroable_primitive` macro.
reitermarkus Jan 31, 2024
a5042de
Make `NonZero` constructors generic.
reitermarkus Jan 22, 2024
3cc601a
Switch OwnedStore handle count to AtomicU32
GnomedDev Jan 31, 2024
a2a3c61
Already poison the `type_of` result of the anon const used in the `ty…
oli-obk Feb 1, 2024
009f970
inline a function that is only used in clippy
oli-obk Feb 1, 2024
0c4d089
Taint borrowck results without running any borrowck if the MIR body w…
oli-obk Feb 1, 2024
0f3976b
Continue to borrowck even if there were previous errors
oli-obk Feb 1, 2024
6fb1566
Simplify codegen diagnostic handling.
nnethercote Feb 2, 2024
4c038bd
Remove `SharedEmitterMessage::AbortIfErrors`.
nnethercote Feb 2, 2024
f4dce1e
Make `Emitter::emit_diagnostic` consuming.
nnethercote Feb 2, 2024
9adcd19
Rollup merge of #120396 - estebank:method-on-unbounded-type-param, r=…
matthiaskrgr Feb 5, 2024
e01ee4c
Rollup merge of #120423 - RalfJung:indirect-structural-match, r=petro…
matthiaskrgr Feb 5, 2024
0acfc79
Rollup merge of #120435 - chenyukang:yukang-fix-120427-cfg-name, r=Ur…
matthiaskrgr Feb 5, 2024
d4f90d3
Rollup merge of #120507 - estebank:issue-108428, r=davidtwco
matthiaskrgr Feb 5, 2024
5e7fb36
Rollup merge of #120521 - reitermarkus:generic-nonzero-constructors, …
matthiaskrgr Feb 5, 2024
a66a9f6
Rollup merge of #120527 - GnomedDev:atomicu32-handle, r=petrochenkov
matthiaskrgr Feb 5, 2024
749af61
Rollup merge of #120550 - oli-obk:track_errors8, r=estebank
matthiaskrgr Feb 5, 2024
bc0d618
Rollup merge of #120575 - nnethercote:simplify-codegen-diag-handling,…
matthiaskrgr Feb 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add testcase for more than 3 cfg names
  • Loading branch information
chenyukang committed Jan 30, 2024
commit ca243e750118ae679c7c3413f21e5e772bf694da
12 changes: 12 additions & 0 deletions tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// #120427
// This test checks we won't suggest more than 3 span suggestions for cfg names
//
// check-pass
// compile-flags: -Z unstable-options
// compile-flags: --check-cfg=cfg(foo,values("value")) --check-cfg=cfg(bar,values("value")) --check-cfg=cfg(bee,values("value")) --check-cfg=cfg(cow,values("value"))

#[cfg(value)]
//~^ WARNING unexpected `cfg` condition name: `value`
fn x() {}

fn main() {}
13 changes: 13 additions & 0 deletions tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
warning: unexpected `cfg` condition name: `value`
--> $DIR/cfg-value-for-cfg-name-duplicate.rs:8:7
|
LL | #[cfg(value)]
| ^^^^^
|
= help: expected names are: `bar`, `bee`, `cow`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
= help: to expect this configuration use `--check-cfg=cfg(value)`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default

warning: 1 warning emitted