Skip to content

Commit 1106fce

Browse files
committed
Add workaround for doc bug
See: rust-lang/rust#16019
1 parent 8944ea0 commit 1106fce

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/rust-crypto/aessafe.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ macro_rules! define_aes_struct(
149149
$rounds:expr
150150
) => (
151151
pub struct $name {
152-
sk: [Bs8State<u32>, ..$rounds + 1]
152+
sk: [Bs8State<u32>, ..($rounds + 1)]
153153
}
154154
)
155155
)
@@ -164,9 +164,9 @@ macro_rules! define_aes_impl(
164164
impl $name {
165165
pub fn new(key: &[u8]) -> $name {
166166
let mut a = $name {
167-
sk: [Bs8State(0, 0, 0, 0, 0, 0, 0, 0), ..$rounds + 1]
167+
sk: [Bs8State(0, 0, 0, 0, 0, 0, 0, 0), ..($rounds + 1)]
168168
};
169-
let mut tmp = [[0u32, ..4], ..$rounds + 1];
169+
let mut tmp = [[0u32, ..4], ..($rounds + 1)];
170170
create_round_keys(key, $mode, tmp);
171171
for i in range(0u, $rounds + 1) {
172172
a.sk[i] = bit_slice_4x4_with_u32(tmp[i][0], tmp[i][1], tmp[i][2], tmp[i][3]);
@@ -236,7 +236,7 @@ macro_rules! define_aes_struct_x8(
236236
$rounds:expr
237237
) => (
238238
pub struct $name {
239-
sk: [Bs8State<u32x4>, ..$rounds + 1]
239+
sk: [Bs8State<u32x4>, ..($rounds + 1)]
240240
}
241241
)
242242
)
@@ -251,9 +251,9 @@ macro_rules! define_aes_impl_x8(
251251
impl $name {
252252
pub fn new(key: &[u8]) -> $name {
253253
let mut a = $name {
254-
sk: [Bs8State(o!(), o!(), o!(), o!(), o!(), o!(), o!(), o!()), ..$rounds + 1]
254+
sk: [Bs8State(o!(), o!(), o!(), o!(), o!(), o!(), o!(), o!()), ..($rounds + 1)]
255255
};
256-
let mut tmp = [[0u32, ..4], ..$rounds + 1];
256+
let mut tmp = [[0u32, ..4], ..($rounds + 1)];
257257
create_round_keys(key, $mode, tmp);
258258
for i in range(0u, $rounds + 1) {
259259
a.sk[i] = bit_slice_fill_4x4_with_u32x4(

0 commit comments

Comments
 (0)