Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
3ea464f
Add tests
Nadrieril Jan 21, 2024
96ff1a4
Move `Or` test out of the loop
Nadrieril Jan 21, 2024
e902878
Clarify the binding dance
Nadrieril Jan 21, 2024
09d4613
Put new bindings first in refutable cases too
Nadrieril Jan 21, 2024
0825ad3
Clarify the new binding dance
Nadrieril Jan 21, 2024
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
c10a52e
tidy: wrap regexes with lazy_static
klensy Jan 16, 2024
a9ba383
update ignore crate
klensy Jan 16, 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
d5b340a
Rollup merge of #120023 - klensy:tidy-alloc, r=Mark-Simulacrum
matthiaskrgr Feb 5, 2024
3567d99
Rollup merge of #120214 - Nadrieril:fix-120210, r=pnkfelix
matthiaskrgr Feb 5, 2024
f689d64
Rollup merge of #120396 - estebank:method-on-unbounded-type-param, r=…
matthiaskrgr Feb 5, 2024
fa48e53
Rollup merge of #120423 - RalfJung:indirect-structural-match, r=petro…
matthiaskrgr Feb 5, 2024
62fcddd
Rollup merge of #120435 - chenyukang:yukang-fix-120427-cfg-name, r=Ur…
matthiaskrgr Feb 5, 2024
c0b4566
Rollup merge of #120507 - estebank:issue-108428, r=davidtwco
matthiaskrgr Feb 5, 2024
9b8f1a9
Rollup merge of #120521 - reitermarkus:generic-nonzero-constructors, …
matthiaskrgr Feb 5, 2024
d6ea81b
Rollup merge of #120527 - GnomedDev:atomicu32-handle, r=petrochenkov
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
merge the accepted-structural-match tests into one
  • Loading branch information
RalfJung committed Jan 28, 2024
commit efbfb041085a547bdad323a6277fdb4423e1a5a6
34 changes: 0 additions & 34 deletions tests/ui/consts/const_in_pattern/accept_corner_cases.rs

This file was deleted.

14 changes: 14 additions & 0 deletions tests/ui/consts/const_in_pattern/accept_structural.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,18 @@ fn main() {

const ADDR_OF: &OND = &None;
match &None { ADDR_OF => dbg!(ADDR_OF), _ => panic!("whoops"), };

// These ones are more subtle: the final value is fine, but statically analyzing the expression
// that computes the value would likely (incorrectly) have us conclude that this may match on
// values that do not have structural equality.
const INDEX: Option<NoDerive> = [None, Some(NoDerive(10))][0];
match None { Some(_) => panic!("whoops"), INDEX => dbg!(INDEX), };

const fn build() -> Option<NoDerive> { None }
const CALL: Option<NoDerive> = build();
match None { Some(_) => panic!("whoops"), CALL => dbg!(CALL), };

impl NoDerive { const fn none() -> Option<NoDerive> { None } }
const METHOD_CALL: Option<NoDerive> = NoDerive::none();
match None { Some(_) => panic!("whoops"), METHOD_CALL => dbg!(METHOD_CALL), };
}