Skip to content

Commit

Permalink
Work around broken Nightly rustc.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Dec 24, 2017
1 parent f154115 commit 0a198e8
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 23 deletions.
10 changes: 0 additions & 10 deletions STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions src/ec/ec.rs → src/ec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
1 change: 0 additions & 1 deletion src/ec/suite_b/suite_b.rs → src/ec/suite_b/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ pub mod ecdsa;
pub mod ecdh;

#[macro_use]
#[path = "ops/ops.rs"]
mod ops;

mod private_key;
Expand Down
File renamed without changes.
9 changes: 0 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#![doc(html_root_url="https://briansmith.org/rustdoc/")]

#![allow(
legacy_directory_ownership,
missing_copy_implementations,
missing_debug_implementations,
unsafe_code,
Expand Down Expand Up @@ -88,7 +87,6 @@ extern crate std;

extern crate untrusted;

#[path = "arithmetic/arithmetic.rs"]
mod arithmetic;

#[macro_use]
Expand All @@ -97,9 +95,7 @@ mod bssl;
#[macro_use]
mod polyfill;

#[path = "aead/aead.rs"]
pub mod aead;

pub mod agreement;

#[cfg(feature = "use_heap")]
Expand All @@ -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;
Expand All @@ -129,7 +121,6 @@ mod poly1305;
pub mod rand;

#[cfg(feature = "use_heap")]
#[path = "rsa/rsa.rs"]
mod rsa;

pub mod signature;
Expand Down
File renamed without changes.

0 comments on commit 0a198e8

Please sign in to comment.