2019-10-28 19:00:00 -05:00
|
|
|
// build-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_imports)]
|
2018-08-31 08:02:01 -05:00
|
|
|
#![allow(stable_features)]
|
|
|
|
|
2015-01-06 04:03:42 -06:00
|
|
|
// A reduced version of the rustbook ice. The problem this encountered
|
2018-05-08 08:10:16 -05:00
|
|
|
// had to do with codegen ignoring binders.
|
2015-01-06 04:03:42 -06:00
|
|
|
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-03-05 20:33:58 -06:00
|
|
|
#![feature(os)]
|
|
|
|
|
2015-01-06 04:03:42 -06:00
|
|
|
use std::iter;
|
|
|
|
use std::os;
|
2015-03-17 15:33:26 -05:00
|
|
|
use std::fs::File;
|
|
|
|
use std::io::prelude::*;
|
|
|
|
use std::env;
|
|
|
|
use std::path::Path;
|
2015-01-06 04:03:42 -06:00
|
|
|
|
2015-03-17 15:33:26 -05:00
|
|
|
pub fn parse_summary<R: Read>(_: R, _: &Path) {
|
2015-01-06 04:03:42 -06:00
|
|
|
let path_from_root = Path::new("");
|
2021-06-04 07:32:47 -05:00
|
|
|
Path::new(&"../".repeat(path_from_root.components().count() - 1));
|
2015-01-06 04:03:42 -06:00
|
|
|
}
|
|
|
|
|
2015-03-17 15:33:26 -05:00
|
|
|
fn foo() {
|
|
|
|
let cwd = env::current_dir().unwrap();
|
2015-01-06 04:03:42 -06:00
|
|
|
let src = cwd.clone();
|
2015-03-17 15:33:26 -05:00
|
|
|
let summary = File::open(&src.join("SUMMARY.md")).unwrap();
|
2015-01-06 04:03:42 -06:00
|
|
|
let _ = parse_summary(summary, &src);
|
|
|
|
}
|
2015-03-17 15:33:26 -05:00
|
|
|
|
|
|
|
fn main() {}
|