Nope. Path is in the prelude. The problem is he is using 0.8, which
didn't have `Path::new`.

On Sat, Oct 26, 2013 at 8:16 AM, clonejo <[email protected]> wrote:
> It seems you never told the compiler that the Path struct is to be found in
> the path module.
>
> So either import the Path struct ("use std::path::Path;") or call
> "path::Path::new(…)".
>
> Regards, clonejo
>
>
>
> Ramakrishnan Muthukrishnan <[email protected]> schrieb:
>>
>> 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.
>
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to