]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-20644.rs
Rollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahc
[rust.git] / src / test / ui / issues / issue-20644.rs
1 // build-pass
2 #![allow(dead_code)]
3 #![allow(unused_imports)]
4 #![allow(stable_features)]
5
6 // A reduced version of the rustbook ice. The problem this encountered
7 // had to do with codegen ignoring binders.
8
9 // pretty-expanded FIXME #23616
10
11 #![feature(os)]
12
13 use std::iter;
14 use std::os;
15 use std::fs::File;
16 use std::io::prelude::*;
17 use std::env;
18 use std::path::Path;
19
20 pub fn parse_summary<R: Read>(_: R, _: &Path) {
21      let path_from_root = Path::new("");
22      Path::new(&"../".repeat(path_from_root.components().count() - 1));
23  }
24
25 fn foo() {
26     let cwd = env::current_dir().unwrap();
27     let src = cwd.clone();
28     let summary = File::open(&src.join("SUMMARY.md")).unwrap();
29     let _ = parse_summary(summary, &src);
30 }
31
32 fn main() {}