Skip to content

Commit

Permalink
Merge pull request #962 from schuelermine/fix/remove-extern-crate-fro…
Browse files Browse the repository at this point in the history
…m-help
  • Loading branch information
shepmaster authored Sep 5, 2023
2 parents bc49435 + 53554db commit c67baed
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ui/frontend/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -115,7 +115,10 @@ const Help: React.FC = () => {
the <a href={RUST_COOKBOOK_URL}>Rust Cookbook</a>, and all
of their dependencies. To use a crate, add the appropriate
{' '}
<Code>extern crate foo</Code> line to the code.
<Code>extern crate foo</Code> line to the code, or, since
<a href={RUST_EDITION_2018_URL}>Rust Edition 2018</a>, just
{' '}
<Code>use</Code> any item from that crate.
</p>

<Example code={CRATE_EXAMPLE} />
Expand Down

0 comments on commit c67baed

Please sign in to comment.