Skip to content

Commit 0465fd7

Browse files
committed
Fixed fourcc example doc
1 parent 4c967e7 commit 0465fd7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/libfourcc/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ To load the extension and use it:
2626
extern mod fourcc;
2727
2828
fn main() {
29-
let val = fourcc!("\xC0\xFF\xEE!")
30-
// val is 0xC0FFEE21
31-
let big_val = fourcc!("foo ", big);
32-
// big_val is 0x21EEFFC0
29+
let val = fourcc!("\xC0\xFF\xEE!");
30+
assert_eq!(val, 0xC0FFEE21u32);
31+
let little_val = fourcc!("foo ", little);
32+
assert_eq!(little_val, 0x21EEFFC0u32);
3333
}
3434
```
3535
@@ -60,7 +60,6 @@ use syntax::parse::token;
6060
use syntax::parse::token::InternedString;
6161

6262
#[macro_registrar]
63-
#[cfg(not(test))]
6463
pub fn macro_registrar(register: |Name, SyntaxExtension|) {
6564
register(token::intern("fourcc"),
6665
NormalTT(~BasicMacroExpander {
@@ -155,6 +154,6 @@ fn target_endian_little(cx: &ExtCtxt, sp: Span) -> bool {
155154
contains(cx.cfg(), meta)
156155
}
157156

158-
// Fixes LLVM assert on Windows
157+
// FIXME (10872): This is required to prevent an LLVM assert on Windows
159158
#[test]
160159
fn dummy_test() { }

0 commit comments

Comments
 (0)