-
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
ICE with lifetimes in generic default methods #13204
Labels
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
I think that I was running an out of date rustc. I don't think that this is a problem on master. |
Actually, I hit this on rustc that I just built from master. |
I talked to @carllerche and he gave me access to his codebase, which I used to narrow down: pub trait Foo {
fn bar<'a, I: Iterator<&'a ()>>(&mut self, _: I) {}
}
pub struct Baz;
impl Foo for Baz {}
fn main() {} Converting cc @pnkfelix |
huonw
changed the title
task 'rustc' failed at 'OwnedSlice: index out of bounds', /Users/carllerche/Code/oss/rust/src/libstd/option.rs:245
ICE with lifetimes in generic default methods
Mar 30, 2014
edwardw
added a commit
to edwardw/rust
that referenced
this issue
Apr 16, 2014
When instantiating trait default methods for certain implementation, `typeck` correctly combined type parameters from trait bound with those from method bound, but didn't do so for lifetime parameters. Applies the same logic to lifetime parameters. Closes rust-lang#13204
bors
added a commit
that referenced
this issue
Apr 17, 2014
When instantiating trait default methods for certain implementation, `typeck` correctly combined type parameters from trait bound with those from method bound, but didn't do so for lifetime parameters. Applies the same logic to lifetime parameters. Closes #13204
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Oct 18, 2024
Add manual_ignore_cast_cmp lint ```rust // bad fn compare(a: &str, b: &str) -> bool { a.to_ascii_lowercase() == b.to_ascii_lowercase() || a.to_ascii_lowercase() == "abc" } // good fn compare(a: &str, b: &str) -> bool { a.eq_ignore_ascii_case(b) || a.eq_ignore_ascii_case("abc") } ``` - [x] Followed [lint naming conventions][lint_naming] - [x] Added passing UI tests (including committed `.stderr` file) - [x] `cargo test` passes locally - [x] Executed `cargo dev update_lints` - [x] Added lint documentation - [x] Run `cargo dev fmt` changelog: New lint: [`manual_ignore_case_cmp`] `perf` [rust-lang#13334](rust-lang/rust-clippy#13334) Closes rust-lang#13204
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not exactly sure what the minimal failing test case is yet.
The text was updated successfully, but these errors were encountered: