Work around broken Nightly rustc.

This commit is contained in:
Brian Smith 2017-12-24 09:38:32 -10:00
parent f1541156b2
commit 0a198e8983
10 changed files with 0 additions and 23 deletions

View File

@ -31,16 +31,6 @@ non-public (`mod x`, not `pub mod x`) and the enclosing module must re-export,
using `pub use submodule::x`, the items that are intended to be public. This
way, the implementation details that drove the choice to use nested submodules
do not affect the public API.
Generally the Rust Guidelines for submodules are followed in *ring*. However,
the Rust Guidelines (and rustc/cargo) require (by default) that when a module
*x* has submodules, the module must be in a *x*/mod.rs. This would result in
many files named mod.rs, which would make navigating through the source code
more difficult and confusing. Instead, use `#[path = "x/x.rs"] pub mod x;` (all
on one line, which is an exception to the rule that attributes should each be
on their own line) so that every module's filename is unique. Example:
```
#[path = "good_example/good_example.rs"] pub mod good_example;
```
Note that this is only necessary when the module has submodules.

View File

@ -118,8 +118,5 @@ pub const PUBLIC_KEY_MAX_LEN: usize = 1 + (2 * ELEM_MAX_BYTES);
pub const PKCS8_DOCUMENT_MAX_LEN: usize =
40 + SCALAR_MAX_BYTES + PUBLIC_KEY_MAX_LEN;
#[path = "curve25519/curve25519.rs"]
pub mod curve25519;
#[path = "suite_b/suite_b.rs"]
pub mod suite_b;

View File

@ -216,7 +216,6 @@ pub mod ecdsa;
pub mod ecdh;
#[macro_use]
#[path = "ops/ops.rs"]
mod ops;
mod private_key;

View File

@ -37,7 +37,6 @@
#![doc(html_root_url="https://briansmith.org/rustdoc/")]
#![allow(
legacy_directory_ownership,
missing_copy_implementations,
missing_debug_implementations,
unsafe_code,
@ -88,7 +87,6 @@ extern crate std;
extern crate untrusted;
#[path = "arithmetic/arithmetic.rs"]
mod arithmetic;
#[macro_use]
@ -97,9 +95,7 @@ mod bssl;
#[macro_use]
mod polyfill;
#[path = "aead/aead.rs"]
pub mod aead;
pub mod agreement;
#[cfg(feature = "use_heap")]
@ -112,12 +108,8 @@ pub mod constant_time;
#[doc(hidden)]
pub mod der;
#[path = "digest/digest.rs"]
pub mod digest;
#[path = "ec/ec.rs"]
mod ec;
pub mod error;
pub mod hkdf;
pub mod hmac;
@ -129,7 +121,6 @@ mod poly1305;
pub mod rand;
#[cfg(feature = "use_heap")]
#[path = "rsa/rsa.rs"]
mod rsa;
pub mod signature;