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

Incorrect use of unreachable!() #68

Closed
dtolnay opened this issue Feb 25, 2017 · 2 comments
Closed

Incorrect use of unreachable!() #68

dtolnay opened this issue Feb 25, 2017 · 2 comments

Comments

@dtolnay
Copy link

@dtolnay dtolnay commented Feb 25, 2017

extern crate byteorder;

fn main() {
    byteorder::LittleEndian::default();
}
thread 'main' panicked at 'internal error: entered unreachable code'

Unreachable doesn't mean "please don't call this," it means "you can't get here." I think it is okay for this method to panic but it should be something other than unreachable. A handwritten message explaining why this method exists would be nice.

cc @fitzgen

@brson brson mentioned this issue Mar 4, 2017
7 of 7 tasks complete
brson added a commit to brson/byteorder that referenced this issue Mar 4, 2017
@frewsxcv
Copy link

@frewsxcv frewsxcv commented Mar 10, 2017

Why does this Default implementation need to exist?

@BurntSushi
Copy link
Owner

@BurntSushi BurntSushi commented Mar 10, 2017

@frewsxcv So that it works with derive seamlessly. See #52.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.