Skip to content

Commit cd442a0

Browse files
author
Lukas Markeffsky
committed
assert that unexpectedly unsized fields are sized in the param env
1 parent 08344c2 commit cd442a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/hir-ty/src/layout.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ impl fmt::Display for LayoutError {
106106
}
107107
}
108108

109-
impl From<LayoutCalculatorError> for LayoutError {
110-
fn from(err: LayoutCalculatorError) -> Self {
109+
impl<F> From<LayoutCalculatorError<F>> for LayoutError {
110+
fn from(err: LayoutCalculatorError<F>) -> Self {
111111
match err {
112-
LayoutCalculatorError::UnexpectedUnsized | LayoutCalculatorError::EmptyUnion => {
112+
LayoutCalculatorError::UnexpectedUnsized(_) | LayoutCalculatorError::EmptyUnion => {
113113
LayoutError::Unknown
114114
}
115115
LayoutCalculatorError::SizeOverflow => LayoutError::SizeOverflow,

0 commit comments

Comments
 (0)