Skip to content

Commit c886667

Browse files
committed
---
yaml --- r: 38135 b: refs/heads/try c: e06ca65 h: refs/heads/master i: 38133: cfbb008 38131: cf0c6ae 38127: ed15e91 v: v3
1 parent 1aa7f41 commit c886667

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: 0b0b50aaaeb3ebbff233eacd08b8820353df1837
5+
refs/heads/try: e06ca6524447fc0e1adeef683a52a8bfd4a27707
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/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)