]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/issue-20644.rs
New upstream version 1.25.0+dfsg1
[rustc.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 // ignore-cloudabi no std::fs
16
17 #![feature(os)]
18
19 use std::iter;
20 use std::os;
21 use std::fs::File;
22 use std::io::prelude::*;
23 use std::env;
24 use std::path::Path;
25
26 pub fn parse_summary<R: Read>(_: R, _: &Path) {
27 let path_from_root = Path::new("");
28 Path::new(&iter::repeat("../")
29 .take(path_from_root.components().count() - 1)
30 .collect::<String>());
31 }
32
33 fn foo() {
34 let cwd = env::current_dir().unwrap();
35 let src = cwd.clone();
36 let summary = File::open(&src.join("SUMMARY.md")).unwrap();
37 let _ = parse_summary(summary, &src);
38 }
39
40 fn main() {}