Skip to content

Fix error when compiling rusttype #194

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

Merged
merged 1 commit into from
Apr 3, 2018

Conversation

caulagi
Copy link
Contributor

@caulagi caulagi commented Apr 3, 2018

I got the following error with compiling rusttype when I did vagrant up after a fresh checkout

    default: error[E0277]: the trait bound `std::sync::Arc<[u8]>: std::convert::From<std::boxed::Box<[u8]>>` is not satisfied
    default:    --> /home/cratesfyi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusttype-0.4.0/src/lib.rs:146:34
    default:     |
    default: 146 |         SharedBytes::ByArc(bytes.into())
    default:     |                                  ^^^^ the trait `std::convert::From<std::boxed::Box<[u8]>>` is not implemented for `std::sync::Arc<[u8]>`
    default:     |
    default:     = help: the following implementations were found:
    default:               <std::sync::Arc<T> as std::convert::From<T>>
    default:     = note: required because of the requirements on the impl of `std::convert::Into<std::sync::Arc<[u8]>>` for `std::boxed::Box<[u8]>`
    default: error[E0277]: the trait bound `std::sync::Arc<[u8]>: std::convert::From<std::vec::Vec<u8>>` is not satisfied
    default:    --> /home/cratesfyi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusttype-0.4.0/src/lib.rs:151:34
    default:     |
    default: 151 |         SharedBytes::ByArc(bytes.into())
    default:     |                                  ^^^^ the trait `std::convert::From<std::vec::Vec<u8>>` is not implemented for `std::sync::Arc<[u8]>`
    default:     |
    default:     = help: the following implementations were found:
    default:               <std::sync::Arc<T> as std::convert::From<T>>
    default:     = note: required because of the requirements on the impl of `std::convert::Into<std::sync::Arc<[u8]>>` for `std::vec::Vec<u8>`
    default: error
    default: : aborting due to 2 previous errors
    default: error: Could not compile `rusttype`.
    default: Build failed, waiting for other jobs to finish...

This seems very similar to https://github.com/redox-os/rusttype/issues/71. Updating the nightly version used by vagrant fixed the issue for me. I see that the latest travis build on master uses rustc 1.24.1 (d3ae9a9e0 2018-02-27), which could explain why build didn't fail.

@onur
Copy link
Member

onur commented Apr 3, 2018

@caulagi thanks! I forgot to update Vagrantfile.

@onur onur merged commit 8a31bf7 into rust-lang:master Apr 3, 2018
@caulagi caulagi deleted the rusttype-compile-error branch April 3, 2018 20:27
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

Successfully merging this pull request may close these issues.

2 participants