-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE: begin <= end (12 <= 11) when slicing 'Self::Assoc<'_>'
#123414
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Similar variants: trait MemoryUnit {
extern "C" fn read_word(&mut self) -> u8;
extern "C" fn read_dword(x: &Self<'_>) -> u16;
}
struct ROM {}
impl MemoryUnit for ROM {
extern "C" fn read_dword(&'_ self) -> u16 {
let a16 = self.read_word() as u16;
let b16 = self.read_word() as u16;
(b16 << 8) | a16
}
} the suggestion that's triggering the ICE is not ready for HIR typeck to not fail before MIR borrowck is reached. rust/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs Lines 1075 to 1078 in 385fa9d
Since now it doesn't fail in HIR typeck, the diagnostic can no longer use |
…rom ref to mut ref Do not ICE when encountering a lifetime error involving an argument with an immutable reference of a method that differs from the trait definition. Fix rust-lang#123414.
…rom ref to mut ref Do not ICE when encountering a lifetime error involving an argument with an immutable reference of a method that differs from the trait definition. Fix rust-lang#123414.
Account for trait/impl difference when suggesting changing argument from ref to mut ref Do not ICE when encountering a lifetime error involving an argument with an immutable reference of a method that differs from the trait definition. Fix rust-lang#123414.
Rollup merge of rust-lang#123523 - estebank:issue-123414, r=BoxyUwU Account for trait/impl difference when suggesting changing argument from ref to mut ref Do not ICE when encountering a lifetime error involving an argument with an immutable reference of a method that differs from the trait definition. Fix rust-lang#123414.
searched nightlies: from nightly-2024-01-01 to nightly-2024-04-04 bisected with cargo-bisect-rustc v0.6.8Host triple: x86_64-apple-darwin cargo bisect-rustc --start=2024-01-01 --end=2024-04-04 --preserve --regress=ice |
Note
This issue is almost identical to closed issue #121807 , but ICE-triggering input is slightly differnent from previous one.
Code
original test-case's
read_dword(&'s self)
is mutated toread_dword(&'_ self)
.Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: