Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
04d9b08
Promote aarch64-apple-darwin to Tier 1
evieluvsrainbows Aug 3, 2024
ccfd94e
Break up `print::Pat` printing into several helper functions
Zalathar Aug 2, 2024
74f76ae
Unify `Variant` and `Leaf` into `print::PatKind::StructLike`
Zalathar Aug 2, 2024
4cd8005
Remove an impossible case under `EnumInfo::NotEnum`
Zalathar Aug 2, 2024
e98e19e
Replace an unnecessary slice pattern with `has_dot_dot: bool`
Zalathar Aug 2, 2024
7f48851
Split out a `hoist` helper in `hoist_witness_pat`
Zalathar Aug 1, 2024
a5ed6fb
Split out hoisting/printing of `box` patterns
Zalathar Aug 1, 2024
c764bea
Simplify hoisting of struct-like patterns
Zalathar Aug 2, 2024
c4c518d
Use more slice patterns inside the compiler
fmease Aug 7, 2024
a245bfa
Simplify hoisting of array/slice patterns
Zalathar Aug 2, 2024
582208b
Simplify hoisting of ref patterns (`&` and `&mut`)
Zalathar Aug 2, 2024
29245ec
Avoid using `ty::tls::with` in `write_struct_like`
Zalathar Aug 2, 2024
482412c
Use `TyCtxt::is_diagnostic_item`
Zalathar Aug 2, 2024
ae09340
make LocalWaker::will_wake consistent with Waker::will_wake
RalfJung Aug 9, 2024
7d1de7f
core: optimise Debug impl for ascii::Char
mina86 Jan 24, 2024
1c02e2b
fix incorrect value
evieluvsrainbows Aug 9, 2024
217ee32
rm `import.used`
bvanjoi Aug 9, 2024
acb0ecc
rust-analyzer: use in-tree pattern_analysis crate
Nadrieril Aug 10, 2024
d1176a2
Rollup merge of #120314 - mina86:i, r=Mark-Simulacrum
matthiaskrgr Aug 11, 2024
202e5c1
Rollup merge of #128536 - Zalathar:print-cleanup, r=Nadrieril
matthiaskrgr Aug 11, 2024
825f0b5
Rollup merge of #128592 - evelynharthbrooke:master, r=Mark-Simulacrum
matthiaskrgr Aug 11, 2024
d4ca5fa
Rollup merge of #128762 - fmease:use-more-slice-pats, r=compiler-errors
matthiaskrgr Aug 11, 2024
16c9055
Rollup merge of #128875 - bvanjoi:cleanup-import-used, r=petrochenkov
matthiaskrgr Aug 11, 2024
72ddd9a
Rollup merge of #128882 - RalfJung:local-waker-will-wake, r=cuviper
matthiaskrgr Aug 11, 2024
fdcb89b
Rollup merge of #128922 - Nadrieril:r-a-use-upstream-pat-ana, r=Veykril
matthiaskrgr Aug 11, 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
rust-analyzer: use in-tree pattern_analysis crate
  • Loading branch information
Nadrieril committed Aug 10, 2024
commit acb0ecc2399b5a977fcf2396085d4c84d7cbb937
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ impl<'db> MatchCheckCtx<'db> {
&Str(void) => match void {},
Wildcard | NonExhaustive | Hidden | PrivateUninhabited => PatKind::Wild,
Never => PatKind::Never,
Missing | F32Range(..) | F64Range(..) | Opaque(..) | Or => {
Missing | F16Range(..) | F32Range(..) | F64Range(..) | F128Range(..) | Opaque(..)
| Or => {
never!("can't convert to pattern: {:?}", pat.ctor());
PatKind::Wild
}
Expand Down Expand Up @@ -356,8 +357,9 @@ impl<'db> PatCx for MatchCheckCtx<'db> {
},
Ref => 1,
Slice(..) => unimplemented!(),
Never | Bool(..) | IntRange(..) | F32Range(..) | F64Range(..) | Str(..)
| Opaque(..) | NonExhaustive | PrivateUninhabited | Hidden | Missing | Wildcard => 0,
Never | Bool(..) | IntRange(..) | F16Range(..) | F32Range(..) | F64Range(..)
| F128Range(..) | Str(..) | Opaque(..) | NonExhaustive | PrivateUninhabited
| Hidden | Missing | Wildcard => 0,
Or => {
never!("The `Or` constructor doesn't have a fixed arity");
0
Expand Down Expand Up @@ -419,8 +421,9 @@ impl<'db> PatCx for MatchCheckCtx<'db> {
}
},
Slice(_) => unreachable!("Found a `Slice` constructor in match checking"),
Never | Bool(..) | IntRange(..) | F32Range(..) | F64Range(..) | Str(..)
| Opaque(..) | NonExhaustive | PrivateUninhabited | Hidden | Missing | Wildcard => {
Never | Bool(..) | IntRange(..) | F16Range(..) | F32Range(..) | F64Range(..)
| F128Range(..) | Str(..) | Opaque(..) | NonExhaustive | PrivateUninhabited
| Hidden | Missing | Wildcard => {
smallvec![]
}
Or => {
Expand Down
6 changes: 4 additions & 2 deletions src/tools/rust-analyzer/crates/hir-ty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ extern crate rustc_abi;
#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_abi as rustc_abi;

// Use the crates.io version unconditionally until the API settles enough that we can switch to
// using the in-tree one.
#[cfg(feature = "in-rust-tree")]
extern crate rustc_pattern_analysis;

#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_pattern_analysis as rustc_pattern_analysis;

mod builder;
Expand Down