Skip to content

Commit eec9e76

Browse files
committed
---
yaml --- r: 39519 b: refs/heads/incoming c: e06ca65 h: refs/heads/master i: 39517: 578f42a 39515: 06164bf 39511: ef75dbe 39503: 858c93a 39487: ce07aa2 v: v3
1 parent cd24917 commit eec9e76

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: 0b0b50aaaeb3ebbff233eacd08b8820353df1837
9+
refs/heads/incoming: e06ca6524447fc0e1adeef683a52a8bfd4a27707
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/tutorial.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -342,34 +342,6 @@ character, such as `\n`, `\r`, and `\t`. String literals,
342342
written between double quotes, allow the same escape sequences. Rust strings
343343
may contain newlines.
344344

345-
## Constants
346-
347-
Compile-time constants are declared with `const`. A constant may have any
348-
scalar type (for example, integer or float). Other allowable constant types
349-
are fixed-length vectors, static strings (more on this later), and
350-
structs. Constants may be declared in any scope and may refer to other
351-
constants. The compiler does not infer types for constants, so constants must
352-
always be declared with a type annotation. By convention, they are written in
353-
all capital letters.
354-
355-
~~~
356-
// Scalars can be constants
357-
const MY_PASSWORD: int = 12345;
358-
359-
// Scalar constants can be combined with other constants
360-
const MY_DOGGIES_PASSWORD: int = MY_PASSWORD + 1;
361-
362-
// Fixed-length vectors
363-
const MY_VECTORY_PASSWORD: [int * 5] = [1, 2, 3, 4, 5];
364-
365-
// Static strings
366-
const MY_STRINGY_PASSWORD: &static/str = "12345";
367-
368-
// Structs
369-
struct Password { value: int }
370-
const MY_STRUCTY_PASSWORD: Password = Password { value: MY_PASSWORD };
371-
~~~
372-
373345
## Operators
374346

375347
Rust's set of operators contains very few surprises. Arithmetic is done with

0 commit comments

Comments
 (0)