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

Replace uint by usize in libcore/panicking.rs #22507

Closed
wants to merge 2 commits into from
Closed

Replace uint by usize in libcore/panicking.rs #22507

wants to merge 2 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Part of #22240.

@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@huonw
Copy link
Member

huonw commented Feb 18, 2015

I suspect most of these should be u32: the memory size of the target architecture doesn't relate to the size of the source on the host.

@@ -34,25 +34,25 @@ use fmt;

#[cold] #[inline(never)] // this is the slow path, always
#[lang="panic"]
pub fn panic(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
pub fn panic(expr_file_line: &(&'static str, &'static str, usize)) -> ! {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be either u32 or u64, you could make an argument for either -- I'd suggest u64 based on the maximum file length we report and the lack of performance issues here.

@GuillaumeGomez
Copy link
Member Author

I was speaking with @aturon about the argument size, I was more for u32 but u64 seems better.

@pnkfelix
Copy link
Member

cc #22240

Conflicts:
	src/libcore/panicking.rs
@GuillaumeGomez
Copy link
Member Author

I updated the code. Any thoughts ? @aturon, @huonw ?

@alexcrichton
Copy link
Member

I believe this actually ended up getting taken care of in #22853 actually, but thanks for the PR!

@GuillaumeGomez GuillaumeGomez deleted the audit-integer-libcore-panicking branch February 27, 2015 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants