Skip to content

Commit 76ff858

Browse files
committed
---
yaml --- r: 128763 b: refs/heads/try c: 86ecfa4 h: refs/heads/master i: 128761: ad84d62 128759: 95528d0 v: v3
1 parent 7ab818e commit 76ff858

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
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: 07d86b46a949a94223da714e35b343243e4ecce4
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a86d9ad15e339ab343a12513f9c90556f677b9ca
5-
refs/heads/try: 0edc55dc21089ba50e5dc49b3aa5f894b7675f3b
5+
refs/heads/try: 86ecfa491fcaf3dfbc8275fbda5c6e31841a1866
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/doc/rust.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,9 @@ A *static item* is a named _constant value_ stored in the global data section of
13561356
Immutable static items are stored in the read-only data section.
13571357
The constant value bound to a static item is, like all constant values, evaluated at compile time.
13581358
Static items have the `static` lifetime, which outlives all other lifetimes in a Rust program.
1359+
Only values stored in the global data section (such as string constants
1360+
and static items) can have the `static` lifetime;
1361+
dynamically constructed values cannot safely be assigned the `static` lifetime.
13591362
Static items are declared with the `static` keyword.
13601363
A static item must have a _constant expression_ giving its definition.
13611364

@@ -3621,7 +3624,10 @@ There are four varieties of pointer in Rust:
36213624
References arise by (automatic) conversion from owning pointers, managed pointers,
36223625
or by applying the borrowing operator `&` to some other value,
36233626
including [lvalues, rvalues or temporaries](#lvalues,-rvalues-and-temporaries).
3624-
References are written `&content`, or in some cases `&'f content` for some lifetime-variable `f`,
3627+
A borrow expression is written `&content`.
3628+
3629+
A reference type is written `&'f type` for some lifetime-variable `f`,
3630+
or just `&type` when the lifetime can be elided;
36253631
for example `&int` means a reference to an integer.
36263632
Copying a reference is a "shallow" operation:
36273633
it involves only copying the pointer itself.

0 commit comments

Comments
 (0)