You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I'm missing some magic incantation, but adding a #[deriving(ToStr)] to a type in std (here: rt::io::IoError) seems just to leads to these errors for me:
.../rust/src/libstd/rt/io/mod.rs:332:11: 332:16 error: unresolved import: could not find `to_str` in `std`.
.../rust/src/libstd/rt/io/mod.rs:332 #[deriving(ToStr)]
^~~~~
.../rust/src/libstd/rt/io/mod.rs:332:11: 332:16 error: use of undeclared module `::std::to_str`
.../rust/src/libstd/rt/io/mod.rs:332 #[deriving(ToStr)]
^~~~~
.../rust/src/libstd/rt/io/mod.rs:332:11: 332:16 error: attempt to implement a nonexistent trait `std::to_str::ToStr`
.../rust/src/libstd/rt/io/mod.rs:332 #[deriving(ToStr)]
^~~~~
This would be solved by adding a way to specify the path to std and extra, since it's currently just taken to be ::std::..., e.g. at the top of the appropriate crate
// in std#[deriving_path(std="")];// in extra#[deriving_path(extra="")];
These would be std and extra if not specified, so the behaviour doesn't change. (And this might be useful as #[syntaxext_path] since other syntax extensions also assume ::std::....)
Activity
huonw commentedon Aug 3, 2013
This would be solved by adding a way to specify the path to
stdandextra, since it's currently just taken to be::std::..., e.g. at the top of the appropriate crateThese would be
stdandextraif not specified, so the behaviour doesn't change. (And this might be useful as#[syntaxext_path]since other syntax extensions also assume::std::....)emberian commentedon Feb 17, 2014
Visiting for triage. Is this still an issue, @huonw?
sfackler commentedon Feb 17, 2014
If this isn't already working, this is easily fixable by adding
pub use to_strtostd::std.