rust/src/test/run-pass/issue-3424.rs
Kevin Ballard d6d9b92683 path2: Adjust the API to remove all the _str mutation methods
Add a new trait BytesContainer that is implemented for both byte vectors
and strings.

Convert Path::from_vec and ::from_str to one function, Path::new().

Remove all the _str-suffixed mutation methods (push, join, with_*,
set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15 22:18:30 -07:00

31 lines
844 B
Rust

// xfail-fast
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// rustc --test ignores2.rs && ./ignores2
extern mod extra;
use std::path::{Path};
use std::path;
use std::result;
type rsrc_loader = ~fn(path: &Path) -> result::Result<~str, ~str>;
fn tester()
{
let loader: rsrc_loader = |_path| {result::Ok(~"more blah")};
let path = path::Path::new("blah");
assert!(loader(&path).is_ok());
}
pub fn main() {}