The path module was rewritten in between 0.8 and master. The documentation you 
are looking at only applies to master. I would strongly encourage you to 
upgrade.

Anyway, as long as you're using 0.8, the correct documentation is 
http://static.rust-lang.org/doc/0.8/std/path/index.html.

-Kevin

On Oct 26, 2013, at 4:30 AM, Ramakrishnan Muthukrishnan <[email protected]> 
wrote:

> Hi,
> 
> This is my first post to the list. Had been playing with Rust for the
> past one week and it is very nice so far. I hope this is the list for
> "users" of Rust as well (as opposed to developers of Rust). I
> apologise if it is the wrong place to ask newbie questions..
> 
> I am trying to follow the documentation on std::path and am trying to
> create a path, just like it is described in the documentation:
> 
> <http://static.rust-lang.org/doc/master/std/path/index.html>
> 
> use std::path;
> 
> fn main() {
>    let mut path = Path::new("/tmp/path");
> }
> 
> When I compile, I get this error:
> 
> $ rustc path.rs
> path.rs:4:19: 4:28 error: unresolved name `Path::new`.
> path.rs:4     let mut path = Path::new("/tmp/path");
>                             ^~~~~~~~~
> error: aborting due to previous error
> 
> I tried to use std::Path as well but that gives me the same error message.
> 
> FYI, this is rust 0.8 compiled from source. Any help to move forward
> will be greatly appreciated. Thanks.
> 
> -- 
>  Ramakrishnan
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to