Skip to content

Commit c7cc58f

Browse files
committed
---
yaml --- r: 31123 b: refs/heads/incoming c: f016fd4 h: refs/heads/master i: 31121: 87b6f84 31119: 90273c1 v: v3
1 parent abf21b2 commit c7cc58f

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
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: fe1165f5610a5c35ec94e3524200977fdf64ef0c
9+
refs/heads/incoming: f016fd43f868cffa8759f18c4772a1423e48ccd1
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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