Skip to content

Fails to compile: ToStrRadix does not exist #17

Closed
@wackywendell

Description

@wackywendell

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions