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