Does it really make sense for me to be able to use the type 'int' if I haven't declared the module for it? Or the opposite perspective, does it really make sense for me to not be able to use the functions in int's module if I can use int? I understand it's a built-in, implicit type, but it still feels inconsistent. On Jul 10, 2013 4:45 PM, "Corey Richardson" <[email protected]> wrote:
> On Wed, Jul 10, 2013 at 5:37 PM, Josh Leverette <[email protected]> > wrote: > > I fixed it by declaring "x" to be an int and then just saying > x.to_str()... > > but why was int::to_str unresolved? > > > > Because the `int` module wasn't in scope. Thus the error "use of > undeclared module `int`". `use std::int;` brings it in scope. But, I > don't know that that free function still exists... generally you want > the method (there's a free-function crusade going on). >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
