Skip to content

Commit

Permalink
Merge branch 'ia0-rust_issues_61053'
Browse files Browse the repository at this point in the history
  • Loading branch information
paholg committed Mar 12, 2021
2 parents 603c26e + 397133a commit a0d7b2d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ crate. Pretty much everything else is for ergonomics.
html_favicon_url = "https://raw.githubusercontent.com/paholg/dimensioned/master/favicon.png"
)]
#![warn(missing_docs)]
#![deny(meta_variable_misuse)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(feature = "oibit", feature(auto_traits))]
#![cfg_attr(feature = "oibit", feature(negative_impls))]
Expand Down
26 changes: 13 additions & 13 deletions src/make_units.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ macro_rules! make_units {
use $crate::traits::*;
#[allow(unused_imports)]
use $crate::typenum::consts::*;
__make_units_internal!(@base_arrays $Unitless $($Unit)*);
__make_units_internal!(@base_arrays $Unitless $($Unit)+);
$(#[allow(missing_docs)] pub type $Derived =
__derived_internal!(@mu commas $($derived_rhs)+);)*
}
Expand All @@ -290,7 +290,7 @@ macro_rules! make_units {
$(#[allow(missing_docs)]
pub type $Unit<V> = $System<V, inner::$Unit>;
$(impl<V> $crate::dimensions::$base_dim for $Unit<V> {})*
)*
)+

impl<Value> $crate::Dimensionless for $Unitless<Value> {
#[inline]
Expand Down Expand Up @@ -318,7 +318,7 @@ macro_rules! make_units {
$System { value_unsafe: 1.0, _marker: PhantomData };
$(#[allow(dead_code, missing_docs)]
pub const $base: $Unit<$t> =
$System { value_unsafe: 1.0, _marker: PhantomData };)*
$System { value_unsafe: 1.0, _marker: PhantomData };)+
$(#[allow(dead_code, missing_docs)]
pub const $derived_const: $Derived<$t> =
$System { value_unsafe: 1.0, _marker: PhantomData };)*
Expand All @@ -342,7 +342,7 @@ macro_rules! make_units {
$System { value_unsafe: 1, _marker: PhantomData };
$(#[allow(dead_code, missing_docs)]
pub const $base: $Unit<$t> =
$System { value_unsafe: 1, _marker: PhantomData };)*
$System { value_unsafe: 1, _marker: PhantomData };)+
$(#[allow(dead_code, missing_docs)]
pub const $derived_const: $Derived<$t> =
$System { value_unsafe: 1, _marker: PhantomData };)*
Expand All @@ -369,15 +369,15 @@ macro_rules! make_units {
use $crate::generic_array::{GenericArray, ArrayLength};
use $crate::array::ToGA;

__make_units_internal!(@fmt true S $System $(P $print_as;)* T Debug E "{:?}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)* T Display E "{}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)* T Octal E "{:o}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)* T LowerHex E "{:x}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)* T UpperHex E "{:X}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)* T Pointer E "{:p}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)* T Binary E "{:b}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)* T LowerExp E "{:e}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)* T UpperExp E "{:E}");
__make_units_internal!(@fmt true S $System $(P $print_as;)+ T Debug E "{:?}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)+ T Display E "{}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)+ T Octal E "{:o}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)+ T LowerHex E "{:x}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)+ T UpperHex E "{:X}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)+ T Pointer E "{:p}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)+ T Binary E "{:b}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)+ T LowerExp E "{:e}");
__make_units_internal!(@fmt $to_fmt S $System $(P $print_as;)+ T UpperExp E "{:E}");

// --------------------------------------------------------------------------------
// Operator traits from this crate
Expand Down

0 comments on commit a0d7b2d

Please # to comment.