mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
[rust/en] Updating comment examples (#1883)
This commit is contained in:
parent
5ec0aba778
commit
5d39704b57
@ -2,6 +2,7 @@
|
|||||||
language: rust
|
language: rust
|
||||||
contributors:
|
contributors:
|
||||||
- ["P1start", "http://p1start.github.io/"]
|
- ["P1start", "http://p1start.github.io/"]
|
||||||
|
- ["Pink401k", "http://github.com/Pink401k"]
|
||||||
filename: learnrust.rs
|
filename: learnrust.rs
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -27,8 +28,15 @@ concepts that are generally found in higher-level languages. This makes
|
|||||||
Rust not only fast, but also easy and efficient to code in.
|
Rust not only fast, but also easy and efficient to code in.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
// This is a comment. Single-line look like this...
|
// This is a comment. Line comments look like this...
|
||||||
/* ...and multi-line comment look like this */
|
// and extend multiple lines like this.
|
||||||
|
|
||||||
|
/// Documentation comments look like this and support markdown notation.
|
||||||
|
/// # Examples
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// let five = 5
|
||||||
|
/// ```
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
// 1. Basics //
|
// 1. Basics //
|
||||||
|
Loading…
Reference in New Issue
Block a user