【发布时间】:2019-04-03 23:53:36
【问题描述】:
我正在尝试构建一个包含 Rust 和 mdbook 的 Docker 容器。我已经尝试了很多变化
FROM rust:latest
RUN cargo install mdbook
包括指定确切的版本。例如,这些也不起作用
RUN cargo install --git https://github.com/rust-lang-nursery/mdBook.git mdbook
和
RUN cargo install mdbook --vers "^0.1.0"
安装到编译lazycell v1.2.0 时出现问题:
Compiling lazycell v1.2.0
error: `<core::cell::UnsafeCell<T>>::new` is not yet stable as a const fn
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/lazycell-1.2.0/src/lib.rs:233:16
|
233 | inner: UnsafeCell::new(None),
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: in Nightly builds, add `#![feature(const_unsafe_cell_new)]` to the crate attributes to enable
【问题讨论】:
标签: docker rust rust-cargo