Skip to content

Commit f80ff03

Browse files
committed
---
yaml --- r: 36854 b: refs/heads/try2 c: e06ca65 h: refs/heads/master v: v3
1 parent 124c843 commit f80ff03

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 0b0b50aaaeb3ebbff233eacd08b8820353df1837
8+
refs/heads/try2: e06ca6524447fc0e1adeef683a52a8bfd4a27707
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

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