diff options
| author | Lukas Markeffsky <@> | 2024-09-16 21:04:20 +0200 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2024-09-17 00:06:56 +0200 |
| commit | 3db930a463e32daa5052065cedf2d52472b67076 (patch) | |
| tree | 91a005d0779a1f0989c61af432b99cf79de7ba98 /src/tools/rust-analyzer | |
| parent | 697450151c0b674eae406a4d1e0854e9386ac7ea (diff) | |
| download | rust-3db930a463e32daa5052065cedf2d52472b67076.tar.gz rust-3db930a463e32daa5052065cedf2d52472b67076.zip | |
assert that unexpectedly unsized fields are sized in the param env
Diffstat (limited to 'src/tools/rust-analyzer')
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir-ty/src/layout.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs index cc1f19c6b17..25362d23d55 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs @@ -106,10 +106,10 @@ impl fmt::Display for LayoutError { } } -impl From<LayoutCalculatorError> for LayoutError { - fn from(err: LayoutCalculatorError) -> Self { +impl<F> From<LayoutCalculatorError<F>> for LayoutError { + fn from(err: LayoutCalculatorError<F>) -> Self { match err { - LayoutCalculatorError::UnexpectedUnsized | LayoutCalculatorError::EmptyUnion => { + LayoutCalculatorError::UnexpectedUnsized(_) | LayoutCalculatorError::EmptyUnion => { LayoutError::Unknown } LayoutCalculatorError::SizeOverflow => LayoutError::SizeOverflow, |
