Skip to content

Commit 6ad321d

Browse files
committed
---
yaml --- r: 39887 b: refs/heads/dist-snap c: f016fd4 h: refs/heads/master i: 39885: 4da388c 39883: 9777841 39879: 2acaee0 39871: e7821ea v: v3
1 parent 0e6483d commit 6ad321d

File tree

2 files changed

+1
-49
lines changed

2 files changed

+1
-49
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: fe1165f5610a5c35ec94e3524200977fdf64ef0c
10+
refs/heads/dist-snap: f016fd43f868cffa8759f18c4772a1423e48ccd1
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/rust.md

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,54 +2182,6 @@ the *failing* state, a task unwinds its stack, destroying all frames and
21822182
freeing all resources until it reaches its entry frame, at which point it
21832183
halts execution in the *dead* state.
21842184

2185-
### Note expressions
2186-
2187-
~~~~~~~~{.ebnf .gram}
2188-
note_expr : "note" expr ;
2189-
~~~~~~~~
2190-
2191-
**Note: Note expressions are not yet supported by the compiler.**
2192-
2193-
A `note` expression has no effect during normal execution. The purpose of a
2194-
`note` expression is to provide additional diagnostic information to the
2195-
logging subsystem during task failure. See [log
2196-
expressions](#log-expressions). Using `note` expressions, normal diagnostic
2197-
logging can be kept relatively sparse, while still providing verbose
2198-
diagnostic "back-traces" when a task fails.
2199-
2200-
When a task is failing, control frames *unwind* from the innermost frame to
2201-
the outermost, and from the innermost lexical block within an unwinding frame
2202-
to the outermost. When unwinding a lexical block, the runtime processes all
2203-
the `note` expressions in the block sequentially, from the first expression of
2204-
the block to the last. During processing, a `note` expression has equivalent
2205-
meaning to a `log` expression: it causes the runtime to append the argument of
2206-
the `note` to the internal logging diagnostic buffer.
2207-
2208-
An example of a `note` expression:
2209-
2210-
~~~~{.xfail-test}
2211-
fn read_file_lines(path: ~str) -> ~[~str] {
2212-
note path;
2213-
let r: [~str];
2214-
let f: file = open_read(path);
2215-
lines(f) |s| {
2216-
r += ~[s];
2217-
}
2218-
return r;
2219-
}
2220-
~~~~
2221-
2222-
In this example, if the task fails while attempting to open or read a file,
2223-
the runtime will log the path name that was being read. If the function
2224-
completes normally, the runtime will not log the path.
2225-
2226-
A value that is marked by a `note` expression is *not* copied aside
2227-
when control passes through the `note`. In other words, if a `note`
2228-
expression notes a particular `lval`, and code after the `note`
2229-
mutates that slot, and then a subsequent failure occurs, the *mutated*
2230-
value will be logged during unwinding, *not* the original value that was
2231-
denoted by the `lval` at the moment control passed through the `note`
2232-
expression.
22332185

22342186
### Return expressions
22352187

0 commit comments

Comments
 (0)