]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Rollup merge of #79158 - lcnr:lazy-norm-coerce, r=oli-obk
authorMara Bos <m-ou.se@m-ou.se>
Wed, 18 Nov 2020 14:46:40 +0000 (15:46 +0100)
committerGitHub <noreply@github.com>
Wed, 18 Nov 2020 14:46:40 +0000 (15:46 +0100)
commit43d13e2d584c32b125d61f055e6e7127a77b1d54
treeca8ebb464fe87caa0665186f44cec18e2ba19558
parent5a9104fcdd42f64641ac3112bad5a293dff9e437
parent88584d5800247f4040a45637a88034ddaadb1a9a
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``
compiler/rustc_middle/src/ty/layout.rs
compiler/rustc_trait_selection/src/traits/query/normalize.rs