Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to compile: ToStrRadix does not exist #17

Closed
wackywendell opened this issue Oct 21, 2014 · 4 comments
Closed

Fails to compile: ToStrRadix does not exist #17

wackywendell opened this issue Oct 21, 2014 · 4 comments

Comments

@wackywendell
Copy link

cargo build fails:

   Compiling num v0.0.1 (file:///home/wendell/code/rust-num)
/home/wendell/code/rust-num/src/bigint.rs:656:6: 656:16 error: attempt to implement a nonexistent trait `ToStrRadix`
/home/wendell/code/rust-num/src/bigint.rs:656 impl ToStrRadix for BigUint {
                                                   ^~~~~~~~~~
/home/wendell/code/rust-num/src/bigint.rs:720:22: 720:37 error: unresolved name `Vec::from_slice`. Did you mean to call `BigUint::Vec::from_slice`?
/home/wendell/code/rust-num/src/bigint.rs:720         BigUint::new(Vec::from_slice(slice))
                                                                   ^~~~~~~~~~~~~~~
/home/wendell/code/rust-num/src/bigint.rs:1268:6: 1268:16 error: attempt to implement a nonexistent trait `ToStrRadix`
/home/wendell/code/rust-num/src/bigint.rs:1268 impl ToStrRadix for BigInt {
                                                    ^~~~~~~~~~
/home/wendell/code/rust-num/src/complex.rs:175:9: 175:19 error: attempt to bound type parameter with a nonexistent trait `ToStrRadix`
/home/wendell/code/rust-num/src/complex.rs:175 impl<T: ToStrRadix + Num + PartialOrd> ToStrRadix for Complex<T> {
                                                       ^~~~~~~~~~
/home/wendell/code/rust-num/src/complex.rs:175:40: 175:50 error: attempt to implement a nonexistent trait `ToStrRadix`
/home/wendell/code/rust-num/src/complex.rs:175 impl<T: ToStrRadix + Num + PartialOrd> ToStrRadix for Complex<T> {
                                                                                      ^~~~~~~~~~
/home/wendell/code/rust-num/src/rational.rs:347:9: 347:19 error: attempt to bound type parameter with a nonexistent trait `ToStrRadix`
/home/wendell/code/rust-num/src/rational.rs:347 impl<T: ToStrRadix> ToStrRadix for Ratio<T> {
                                                        ^~~~~~~~~~
/home/wendell/code/rust-num/src/rational.rs:347:21: 347:31 error: attempt to implement a nonexistent trait `ToStrRadix`
/home/wendell/code/rust-num/src/rational.rs:347 impl<T: ToStrRadix> ToStrRadix for Ratio<T> {
                                                                    ^~~~~~~~~~
error: aborting due to 7 previous errors
Could not compile `num`.

To learn more, run the command again with --verbose.

I'm working on fixing this now (replacing ToStrRadix with fmt::radix stuff)... I'm not particularly familiar with fmt::radix so it might take me a bit, but it seemed bite-size. Let me know if that's unnecessary or someone is already on this...

@alexcrichton
Copy link
Contributor

Oh sorry, I was already working on it! I may have taken a bit of a big hammer to it though, (mostly removed things), but feel free to add them back in with fmt::radix or other format-related traits!

@wackywendell
Copy link
Author

No problem, thanks for posting so quickly! I will try and add some back in, but we'll see how it goes!

@jsanders
Copy link

@alexcrichton, @wackywendell: I think this is relevant here - I tried to transition from ToStrRadix to fmt::radix in rust-gmp and ran into rust-lang/rust#18301.

@wackywendell
Copy link
Author

Thanks for the note! I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants