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