]>
Commit | Line | Data |
---|---|---|
60c5eb7d | 1 | // build-pass |
0bf4aa26 XL |
2 | #![allow(dead_code)] |
3 | #![allow(unused_imports)] | |
b7449926 XL |
4 | #![allow(stable_features)] |
5 | ||
1a4d82fc | 6 | // A reduced version of the rustbook ice. The problem this encountered |
94b46f34 | 7 | // had to do with codegen ignoring binders. |
1a4d82fc | 8 | |
c34b1796 AL |
9 | // pretty-expanded FIXME #23616 |
10 | ||
11 | #![feature(os)] | |
1a4d82fc JJ |
12 | |
13 | use std::iter; | |
14 | use std::os; | |
c34b1796 AL |
15 | use std::fs::File; |
16 | use std::io::prelude::*; | |
17 | use std::env; | |
18 | use std::path::Path; | |
1a4d82fc | 19 | |
c34b1796 | 20 | pub fn parse_summary<R: Read>(_: R, _: &Path) { |
1a4d82fc | 21 | let path_from_root = Path::new(""); |
c34b1796 | 22 | Path::new(&iter::repeat("../") |
1a4d82fc JJ |
23 | .take(path_from_root.components().count() - 1) |
24 | .collect::<String>()); | |
25 | } | |
26 | ||
c34b1796 AL |
27 | fn foo() { |
28 | let cwd = env::current_dir().unwrap(); | |
1a4d82fc | 29 | let src = cwd.clone(); |
c34b1796 | 30 | let summary = File::open(&src.join("SUMMARY.md")).unwrap(); |
1a4d82fc JJ |
31 | let _ = parse_summary(summary, &src); |
32 | } | |
c34b1796 AL |
33 | |
34 | fn main() {} |