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

impl ICE #3410

Closed
jesse99 opened this issue Sep 7, 2012 · 4 comments
Closed

impl ICE #3410

jesse99 opened this issue Sep 7, 2012 · 4 comments
Labels
A-type-system Area: Type system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Milestone

Comments

@jesse99
Copy link
Contributor

jesse99 commented Sep 7, 2012

Added , ToStr to an impl and the compiler ICEd with

rust: task failed at 'multiple traits!!', /Users/jessejones/Source/Third_Party/rust/src/rustc/metadata/encoder.rs:716
error: internal compiler error: unexpected failure

Was not able to boil this down to a simple repro, but rrdf commit 8fe284d4d08677d00a3eefb5180549d43faeec98 fails with rust from master on Sep 1.

Was able to work around this by adding a dedicated ToStr impl.

@ghost ghost assigned catamorphism Sep 7, 2012
@catamorphism
Copy link
Contributor

I'll look.

@catamorphism
Copy link
Contributor

@pcwalton says that multiple traits in an impl are not legal anymore. I'll make it so that you get a better error than an ICE.

@jesse99
Copy link
Contributor Author

jesse99 commented Sep 7, 2012

Perhaps the Sep 1 master was in some half-baked intermediate state but when I tried to produce a simple test case it compiled and ran.

@catamorphism
Copy link
Contributor

Did your test case have the impl in the same crate with code that used the impl? That was working, I think, but using an impl with multiple traits cross-crate isn't.

flip1995 pushed a commit to flip1995/rust that referenced this issue Feb 25, 2021
Rework use_self impl based on ty::Ty comparison rust-lang#3410 | Take 2

This builds on top of rust-lang#5531

I already reviewed and approved the commits by `@montrivo.` So only the review of my commits should be necessary.

I would also appreciate your review `@montrivo,` since you are familiar with the challenges here.

Fixes rust-lang#3410 and Fixes rust-lang#4143 (same problem)
Fixes rust-lang#2843
Fixes rust-lang#3859
Fixes rust-lang#4734 and fixes rust-lang#6221
Fixes rust-lang#4305
Fixes rust-lang#5078 (even at expression level now 🎉)
Fixes rust-lang#3881 and Fixes rust-lang#4887 (same problem)
Fixes rust-lang#3909

Not yet: rust-lang#4140 (test added)

All the credit for the fixes goes to `@montrivo.` I only refactored and copy and pasted his code.

changelog: rewrite [`use_self`] lint and fix multiple (8) FPs. One to go.
RalfJung pushed a commit to RalfJung/rust that referenced this issue Mar 25, 2024
CONTRIBUTING: vsocde settings: add --all-targets

Seems like when setting a custom command, one needs to pass this flag manually, it's no longer automatically added by RA.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants