-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustc panicked at byte index 4 is out of bounds of #41652
Labels
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
sfackler
added
the
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
label
Apr 30, 2017
Reduced test case: Crate extern crate b;
struct S;
impl b::Tr for S {
fn f() {
3.f()
}
} Crate pub trait Tr {
fn f() // <-- new line is needed to trigger the ICE
where Self: Sized;
} Output: error: no method named `f` found for type `{integer}` in the current scope
--> src/lib.rs:5:11
|
5 | 3.f()
| ^
|
= note: found the following associated functions; to be used as methods, functions must have a `self` parameter
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'byte index 4 is out of bounds of ``', src/libcore/str/mod.rs:2162
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: Could not compile `a`. Rust stable (1.17.0) doesn't ICE, but produces a span that refers to no source code. error: no method named `f` found for type `{integer}` in the current scope
--> src/lib.rs:5:11
|
5 | 3.f()
| ^
|
= note: found the following associated functions; to be used as methods, functions must have a `self` parameter
note: candidate #1 is defined in the trait `b::Tr`
--> b/src/lib.rs:2:5
|
2 |
| _____^ starting here...
3 | |
| |__________________________^ ...ending here
= help: to disambiguate the method call, write `b::Tr::f(3)` instead
error: aborting due to previous error
error: Could not compile `a`.
To learn more, run the command again with --verbose. (BTW your code is wrong anyway, there are no |
@kennytm I know the code is wrong, I was trying to let the compiler guide me through the upgrading process then it panicked. |
Merged
kennytm
added a commit
to kennytm/rust
that referenced
this issue
May 3, 2017
Don't print the source code in emit_message_default() and render_source_line() if the source code is None.
bors
added a commit
that referenced
this issue
May 7, 2017
Fix issue #41652 Fix issue #41652. Don't print anything in `render_source_line()` if no source code is given. (cc @jonathandturner #34789)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this code:
sozu-proxy/sozu#173
rustc --version --verbose
:Backtrace:
The text was updated successfully, but these errors were encountered: