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

Octal literals #6563

Closed
emberian opened this issue May 17, 2013 · 6 comments
Closed

Octal literals #6563

emberian opened this issue May 17, 2013 · 6 comments

Comments

@emberian
Copy link
Member

It's a strange omission. There are hex and binary literals, but no octal!

@emberian
Copy link
Member Author

Proposed syntax: 0o432

@emberian
Copy link
Member Author

An octal! macro would be equally acceptable.

@emberian
Copy link
Member Author

Meh, closing, not important.

@setharnold
Copy link

Please reconsider this feature request; Unix permissions are most easily expressed using octal permissions.

While expressing permissions via binary 0b111_101_101 is workable, I suspect most of us would do the mental arithmetic to re-write that to 0o755. Clever macros can mask some of this -- see e.g., https://gist.github.com/kmcallister/7312179 -- but asking each chmod() or umask() user to either re-implement them or discover and import such a package feels awkward compared to supporting 0o ... syntax directly in the language.

Thanks

@emberian
Copy link
Member Author

emberian commented Nov 5, 2013

@setharnold see #10243

@sanxiyn sanxiyn reopened this Nov 5, 2013
bors added a commit that referenced this issue Nov 8, 2013
Associated with Issue #6563.

Useful for Apollo Guidance Computer simulation, Unix file system permissions, and maybe one or two other things.
@emberian
Copy link
Member Author

Since fixed.

flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 7, 2021
Re-write shadow lints

changelog: Move shadow_unrelated to restriction
changelog: The shadow lints find a lot more shadows and are not limited to certain patterns

Drastically simplifies the implementation. Catches a lot more cases.

I removed the "initialization happens here" note. It is not helpful IMO.

Closes rust-lang#318
Fixes rust-lang#2890
Fixes rust-lang#6563
Fixes rust-lang#7588
Fixes rust-lang#7620
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

No branches or pull requests

3 participants