Skip to content

ICE: Autoderef but type not derefable on fmt!("%?", None) #5062

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

Closed
ben0x539 opened this issue Feb 21, 2013 · 3 comments
Closed

ICE: Autoderef but type not derefable on fmt!("%?", None) #5062

ben0x539 opened this issue Feb 21, 2013 · 3 comments
Labels
A-type-system Area: Type system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@ben0x539
Copy link
Contributor

This is probably bad code because there's no way for the compiler to guess the complete type of None, but maybe it could be an explicit failure.

foo.rs:1:17: 1:21 error: internal compiler error: Autoderef but type not derefable: [type error]
foo.rs:1 fn main() { fmt!("%?", None); }
                          ^~~~
note: in expansion of fmt!
foo.rs:1:12: 1:29 note: expansion site
@ghost ghost assigned catamorphism Feb 21, 2013
@catamorphism
Copy link
Contributor

Not critical for 0.6; de-milestoning

@pnkfelix
Copy link
Member

pnkfelix commented May 2, 2013

Nominating for Maturity Milestone 5: "Production Ready"

@graydon
Copy link
Contributor

graydon commented May 2, 2013

Bug, yeah. Accepted for production ready.

@Blei Blei mentioned this issue Jun 7, 2013
bors added a commit that referenced this issue Jun 8, 2013
bors added a commit to rust-lang-ci/rust that referenced this issue May 2, 2020
Allow `unused_self` lint at the function level

Another approach of rust-lang#5062.
Fixes rust-lang#5053

changelog: Allow `unused_self` lint at the function level
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

4 participants