]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-20644.rs
New upstream version 1.50.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-20644.rs
CommitLineData
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
13use std::iter;
14use std::os;
c34b1796
AL
15use std::fs::File;
16use std::io::prelude::*;
17use std::env;
18use std::path::Path;
1a4d82fc 19
c34b1796 20pub 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
27fn 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
34fn main() {}