Last active
September 5, 2015 19:45
-
-
Save m4rw3r/d988e8d7ef8282ab1ec1 to your computer and use it in GitHub Desktop.
Running rustdoc using https://github.com/eddyb/rust/tree/250dc4e5691d68ecb051a1fd11a21cbee8c68fb7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![crate_name = "parser"] | |
#![crate_type = "lib"] | |
use std::ops::Add; | |
/// ``` | |
/// use parser::test; | |
/// | |
/// assert_eq!(test::<i32>(1)(2), 3); | |
/// ``` | |
pub fn test<'a, I: 'a + Add<I, Output=I>>(i: I) -> impl FnOnce(I) -> I + 'a { | |
|a| a + i | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ src rustc lib.rs | |
➜ src rustdoc --test -L. lib.rs | |
running 1 test | |
test test_0 ... FAILED | |
failures: | |
---- test_0 stdout ---- | |
thread 'test_0' panicked at 'lookup_item: id not found: 9', src/librustc/metadata/decoder.rs:99 | |
failures: | |
test_0 | |
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured | |
thread '<unnamed>' panicked at 'Some tests failed', src/libtest/lib.rs:253 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment