[tor-bugs] #25727 [Core Tor/Tor]: Add bool types to Rust coding standards guidelines
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Apr 18 18:38:26 UTC 2018
#25727: Add bool types to Rust coding standards guidelines
-------------------------------------+------------------------------------
Reporter: isis | Owner: isis
Type: enhancement | Status: needs_revision
Priority: Medium | Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: torspec, rust, fast-fix | Actual Points:
Parent ID: | Points: .1
Reviewer: catalyst | Sponsor: SponsorM-can
-------------------------------------+------------------------------------
Changes (by catalyst):
* status: needs_review => needs_revision
Comment:
Summarizing yesterday's IRC discussion:
* Rust has debated whether Rust's `bool` is identical to C99's `_Bool` for
a while.
* Rust now [https://github.com/rust-lang/rust/pull/46156 specifies] that
its `bool` is one byte.
* There is a [https://github.com/rust-lang/rfcs/pull/954 postponed RFC] to
define Rust's `bool` and C99's `_Bool` to be FFI-compatible.
We should either postpone merging this until Rust decides to accept RFC
954 or point to that RFC (and maybe the follow up RFC 992) in our doc.
There seems to be a consensus that it should be accepted but it seems they
haven't gone through the formalities yet.
This patch also adds a non-ASCII character in a file that previously had
none. I think we lack a style guide that covers the acceptability of non-
ASCII in various files, but this is a change. On the other hand
CodingStandardsRust.md already had some non-ASCII characters in it so
maybe we don't actually care that much?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25727#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list