Skip to content

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

Closed
GuillaumeGomez wants to merge 2 commits into
rust-lang:masterfrom
GuillaumeGomez:audit-integer-libcore-panicking
Closed

Replace uint by usize in libcore/panicking.rs#22507
GuillaumeGomez wants to merge 2 commits into
rust-lang:masterfrom
GuillaumeGomez:audit-integer-libcore-panicking

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Part of #22240.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @huonw

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

@huonw

huonw commented Feb 18, 2015

Copy link
Copy Markdown
Contributor

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.

Comment thread src/libcore/panicking.rs Outdated

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member Author

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

@pnkfelix

Copy link
Copy Markdown
Contributor

cc #22240

Conflicts:
	src/libcore/panicking.rs
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

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

@alexcrichton

Copy link
Copy Markdown
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
lnicola pushed a commit to lnicola/rust that referenced this pull request Jun 8, 2026
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