Skip to content

containing [Self; 0] causes the compiler to think Self is infinite size #54996

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

Closed
Gankra opened this issue Oct 11, 2018 · 1 comment
Closed

Comments

@Gankra
Copy link
Contributor

Gankra commented Oct 11, 2018

This fails to compile:

#[repr(C)]
struct Evil {
  x: u32,
  y: u16,
  should_be_an_offset_to_the_end_of_the_type: [Evil; 0],
}
@varkor
Copy link
Member

varkor commented Oct 11, 2018

This is #11924.

// Fixed-length vectors.
// FIXME(#11924) Behavior undecided for zero-length vectors.
Array(ty, _) => {
is_type_structurally_recursive(tcx, sp, seen, representable_cache, ty)
}

@Gankra Gankra closed this as completed Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants