Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type is too big -> values of the type are too big #79158

Merged
merged 2 commits into from
Nov 18, 2020

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Nov 18, 2020

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 #79135 (comment) 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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 18, 2020
@lcnr lcnr force-pushed the lazy-norm-coerce branch 2 times, most recently from 64d2f40 to 73f95cf Compare November 18, 2020 09:57

fn main() {
let _a: Option<<[u16; usize::MAX] as Foo>::Assoc> = None;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs a trailing newline

@oli-obk
Copy link
Contributor

oli-obk commented Nov 18, 2020

r=me with nit

@bors rollup

@lcnr
Copy link
Contributor Author

lcnr commented Nov 18, 2020

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Nov 18, 2020

📌 Commit df2aa08b909675e11765a685b83d1aa626e3729e has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 18, 2020
@lcnr
Copy link
Contributor Author

lcnr commented Nov 18, 2020

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Nov 18, 2020

📌 Commit 88584d5 has been approved by oli-obk

m-ou-se added a commit to m-ou-se/rust that referenced this pull request Nov 18, 2020
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 rust-lang#79135 (comment) 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`
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 18, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#78361 (Updated the list of white-listed target features for x86)
 - rust-lang#78785 (linux: try to use libc getrandom to allow interposition)
 - rust-lang#78999 (stability: More precise location for deprecation lint on macros)
 - rust-lang#79039 (Tighten the bounds on atomic Ordering in std::sys::unix::weak::Weak)
 - rust-lang#79079 (Turn top-level comments into module docs in MIR visitor)
 - rust-lang#79114 (add trailing_zeros and leading_zeros to non zero types)
 - rust-lang#79131 (Enable AVX512 *epi64 variants by updating stdarch)
 - rust-lang#79133 (bootstrap: use the same version number for rustc and cargo)
 - rust-lang#79145 (Fix handling of panic calls)
 - rust-lang#79151 (Fix typo in `std::io::Write` docs)
 - rust-lang#79158 (type is too big -> values of the type are too big)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 43d13e2 into rust-lang:master Nov 18, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 18, 2020
@lcnr lcnr deleted the lazy-norm-coerce branch November 18, 2020 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants