You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was labelled with: A-docs, B-RFC in the Rust repository
There are many examples in the docs that require some adjustments to get to compile, e.g. the following requires a main function:
let a = [0];let b = [1];letmut it = a.iter().chain(b.iter());assert_eq!(it.next().get(),&0);assert_eq!(it.next().get(),&1);assert!(it.next().is_none());
(Iterator.chain at the time of filing.)
And others that are entirely self-contained, and can just be copy-pasted to be run.
use std::rand;fnmain(){let tuple_ptr = rand::random::<~(f64,char)>();printfln!(tuple_ptr)}
(One of the examples at the top of std::rand.)
It seems like it would be good to be consistent about this. I prefer the latter, and it would make automatically running the tests much easier (#2925).
The text was updated successfully, but these errors were encountered:
Issue by huonw
Sunday Sep 22, 2013 at 07:49 GMT
For earlier discussion, see rust-lang/rust#9403
This issue was labelled with: A-docs, B-RFC in the Rust repository
There are many examples in the docs that require some adjustments to get to compile, e.g. the following requires a
main
function:(
Iterator.chain
at the time of filing.)And others that are entirely self-contained, and can just be copy-pasted to be run.
(One of the examples at the top of
std::rand
.)It seems like it would be good to be consistent about this. I prefer the latter, and it would make automatically running the tests much easier (#2925).
The text was updated successfully, but these errors were encountered: