]>
git.proxmox.com Git - rustc.git/blob - 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.
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.
11 // A reduced version of the rustbook ice. The problem this encountered
12 // had to do with trans ignoring binders.
14 // pretty-expanded FIXME #23616
15 // ignore-cloudabi no std::fs
22 use std
::io
::prelude
::*;
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
>());
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
);