diff --git a/ui/frontend/Help.tsx b/ui/frontend/Help.tsx index d371df1a0..dfb8a6b08 100644 --- a/ui/frontend/Help.tsx +++ b/ui/frontend/Help.tsx @@ -21,9 +21,9 @@ const ORIGINAL_PLAYGROUND_URL = 'https://github.com/rust-lang/rust-playpen'; const REPO_URL = 'https://github.com/rust-lang/rust-playground'; const RUSTFMT_URL = 'https://github.com/rust-lang-nursery/rustfmt'; const SHEPMASTER_URL = 'https://github.com/shepmaster/'; +const RUST_EDITION_2018_URL = 'https://doc.rust-lang.org/edition-guide/rust-2018/index.html'; -const CRATE_EXAMPLE = `extern crate rand; -use rand::Rng; +const CRATE_EXAMPLE = `use rand::Rng; fn main() { let mut rng = rand::thread_rng(); @@ -115,7 +115,10 @@ const Help: React.FC = () => { the Rust Cookbook, and all of their dependencies. To use a crate, add the appropriate {' '} - extern crate foo line to the code. + extern crate foo line to the code, or, since + Rust Edition 2018, just + {' '} + use any item from that crate.