Rollup merge of #79158 - lcnr:lazy-norm-coerce, r=oli-obk
type is too big -> values of the type are too big strictly speaking, `[u8; usize::MAX]` or even `[[[u128; usize::MAX]; usize::MAX]; usize::MAX]` are absolutely fine types as long as you don't try to deal with any values of it. This error message seems to cause some confusion imo, for example in https://github.com/rust-lang/rust/pull/79135#issuecomment-729361380 so I would prefer us to be more precise here. See the added test case which uses one of these types without causing an error. r? ``@oli-obk``
This commit is contained in:
commit
43d13e2d58
19 changed files with 33 additions and 19 deletions
|
@ -176,7 +176,7 @@ impl<'tcx> fmt::Display for LayoutError<'tcx> {
|
|||
match *self {
|
||||
LayoutError::Unknown(ty) => write!(f, "the type `{}` has an unknown layout", ty),
|
||||
LayoutError::SizeOverflow(ty) => {
|
||||
write!(f, "the type `{}` is too big for the current architecture", ty)
|
||||
write!(f, "values of the type `{}` are too big for the current architecture", ty)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue