From 73d3d00ec437f87ac665b4e4da3bedec8ce4f9ef Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Thu, 26 Sep 2013 17:21:59 -0700 Subject: path2: Replace the path module outright Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process. --- src/librustdoc/rustdoc.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/librustdoc/rustdoc.rs') diff --git a/src/librustdoc/rustdoc.rs b/src/librustdoc/rustdoc.rs index a724ff3bf74..470ae7f9dfe 100644 --- a/src/librustdoc/rustdoc.rs +++ b/src/librustdoc/rustdoc.rs @@ -134,13 +134,13 @@ pub fn main_args(args: &[~str]) -> int { info2!("going to format"); let started = time::precise_time_ns(); - let output = matches.opt_str("o").map(|s| Path(s)); + let output = matches.opt_str("o").map(|s| Path::from_str(s)); match matches.opt_str("w") { Some(~"html") | None => { - html::render::run(crate, output.unwrap_or(Path("doc"))) + html::render::run(crate, output.unwrap_or(Path::from_str("doc"))) } Some(~"json") => { - json_output(crate, res, output.unwrap_or(Path("doc.json"))) + json_output(crate, res, output.unwrap_or(Path::from_str("doc.json"))) } Some(s) => { println!("unknown output format: {}", s); @@ -188,8 +188,8 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output { let mut plugins = matches.opt_strs("plugins"); // First, parse the crate and extract all relevant information. - let libs = Cell::new(matches.opt_strs("L").map(|s| Path(*s))); - let cr = Cell::new(Path(cratefile)); + let libs = Cell::new(matches.opt_strs("L").map(|s| Path::from_str(*s))); + let cr = Cell::new(Path::from_str(cratefile)); info2!("starting to run rustc"); let crate = do std::task::try { let cr = cr.take(); @@ -230,7 +230,7 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output { // Load all plugins/passes into a PluginManager let path = matches.opt_str("plugin-path").unwrap_or(~"/tmp/rustdoc_ng/plugins"); - let mut pm = plugins::PluginManager::new(Path(path)); + let mut pm = plugins::PluginManager::new(Path::from_str(path)); for pass in passes.iter() { let plugin = match PASSES.iter().position(|&(p, _, _)| p == *pass) { Some(i) => PASSES[i].n1(), @@ -254,7 +254,7 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output { /// This input format purely deserializes the json output file. No passes are /// run over the deserialized output. fn json_input(input: &str) -> Result { - let input = match ::std::io::file_reader(&Path(input)) { + let input = match ::std::io::file_reader(&Path::from_str(input)) { Ok(i) => i, Err(s) => return Err(s), }; -- cgit 1.4.1-3-g733a5