[rust-dev] Failure

Renato Lenzi rexlen at gmail.com
Sat Jan 11 09:17:21 PST 2014


The code is trivial:

fn main()
{
let x = 3;
println(x.to_str());
}

the error is this (on Win7)

d:\Rust09\bin>rustc 00025.rs
00025.rs:4:11: 4:22 error: multiple applicable methods in scope
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #1 is `std::int::ToStr$int::to_str`
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #2 is `std::i8::ToStr$i8::to_str`
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #3 is `std::i16::ToStr$i16::to_str`
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #4 is `std::i32::ToStr$i32::to_str`
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #5 is `std::i64::ToStr$i64::to_str`
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #6 is `std::uint::ToStr$uint::to_str`
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #7 is `std::u8::ToStr$u8::to_str`
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #8 is `std::u16::ToStr$u16::to_str`
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #9 is `std::u32::ToStr$u32::to_str`
00025.rs:4              println(x.to_str());
                                ^~~~~~~~~~~
00025.rs:4:11: 4:22 note: candidate #10 is `std::u64::ToStr$u64::to_str`
00025.rs:4              println(x.to_str());

                              ^~~~~~~~~~~
error: aborting due to previous error
task 'rustc' failed at 'explicit failure',
C:\bot\slave\dist2-win\build\src\libs
yntax\diagnostic.rs:75
task '<main>' failed at 'explicit failure',
C:\bot\slave\dist2-win\build\src\lib
rustc\lib.rs:453

any idea?
thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140111/8e0524a6/attachment.html>


More information about the Rust-dev mailing list