Skip to content

Commit

Permalink
Merge branch 'master' into remco/fix/no-deny-warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Remco Bloemen committed Aug 27, 2019
2 parents 2457063 + 21b3647 commit cba3de8
Show file tree
Hide file tree
Showing 9 changed files with 518 additions and 167 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ jobs:
- NIGHTLY: nightly-2019-08-15
# Exclude substrate-node (also pulls in a lot of deps, and currently fails)
- PACKAGES: --all --exclude substrate-node
# TODO: Add substrate-runtime to no-std once the hex-literal issue is resolved.
- NO_STD_PACKAGES: macros_decl u256 primefield ecc starkdex stark
- NO_STD_PACKAGES: macros_decl u256 primefield ecc starkdex stark substrate-runtime
steps:
- checkout
- restore-toolchain-cache
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ members = [
opt-level = 3
lto = true
panic = 'unwind'

# HACK: Patch replace substrate's dependency on hex-literal with a local clone
# that sets #[no_std].
# TODO: Remove pending merger of https://github.com/RustCrypto/utils/pull/30
[replace]
"hex-literal:0.1.4" = { path = "./hex-literal" }
13 changes: 13 additions & 0 deletions hex-literal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "hex-literal"
version = "0.1.4"
authors = ["Remco Bloemen <[email protected]>"]
edition = "2018"

[dependencies]
proc-macro-hack = "0.5"
macros-impl = { path = "../macros_impl" }

[features]
default = []
std = []
11 changes: 11 additions & 0 deletions hex-literal/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#![warn(clippy::all)]
#![deny(warnings)]
#![cfg_attr(not(feature = "std"), no_std)]

use proc_macro_hack::proc_macro_hack;

/// Hex literal.
///
/// (Documentation goes here on the re-export, not in the other crate.)
#[proc_macro_hack]
pub use macros_impl::hex;
2 changes: 2 additions & 0 deletions substrate-runtime/src/block_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// allow the lint on the whole file scope.
#![allow(clippy::default_trait_access)]

// TODO - This code will be be reworked to incorporate it into a chain which
// doesn't lock blocks to proofs.
#[cfg(feature = "std")]
use inherents::ProvideInherentData;
use inherents::{InherentData, InherentIdentifier, IsFatalError, ProvideInherent, RuntimeString};
Expand Down
Loading

0 comments on commit cba3de8

Please sign in to comment.