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

ICE probably connected to const generics #66987

Closed
MikailBag opened this issue Dec 3, 2019 · 2 comments
Closed

ICE probably connected to const generics #66987

MikailBag opened this issue Dec 3, 2019 · 2 comments

Comments

@MikailBag
Copy link
Contributor

Playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=e37f6d10c9fa79a691d84a3042c3fcb6
AFAIU, there is out-of-bounds-panic connected with good_transmute fn. Probably, compiler fails on buf array, because it's length is size_of() generic type.

@jonas-schievink
Copy link
Contributor

Backtrace:

thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', /rustc/fdc0011561c6365c596dfd8fa1ef388162bc89c7/src/libcore/slice/mod.rs:2797:10
stack backtrace:
<snip>
  14: core::panicking::panic_bounds_check
             at src/libcore/panicking.rs:60
  15: rustc_mir::borrow_check::nll::type_check::type_check
  16: rustc_mir::borrow_check::nll::compute_regions
  17: rustc_mir::borrow_check::do_mir_borrowck
<snip>

@jonas-schievink
Copy link
Contributor

Duplicate of #62456

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