]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/issue-20644.rs
rustdoc: Replace no-pretty-expanded with pretty-expanded
[rust.git] / src / test / run-pass / issue-20644.rs
1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // A reduced version of the rustbook ice. The problem this encountered
12 // had to do with trans ignoring binders.
13
14 // pretty-expanded FIXME #23616
15
16 #![feature(os)]
17
18 use std::iter;
19 use std::os;
20 use std::fs::File;
21 use std::io::prelude::*;
22 use std::env;
23 use std::path::Path;
24
25 pub fn parse_summary<R: Read>(_: R, _: &Path) {
26      let path_from_root = Path::new("");
27      Path::new(&iter::repeat("../")
28                .take(path_from_root.components().count() - 1)
29                .collect::<String>());
30  }
31
32 fn foo() {
33     let cwd = env::current_dir().unwrap();
34     let src = cwd.clone();
35     let summary = File::open(&src.join("SUMMARY.md")).unwrap();
36     let _ = parse_summary(summary, &src);
37 }
38
39 fn main() {}