Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc fixes #183

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DOC_VER := $(shell date +"%Y-%m-%d")-snap

all: rust.pdf rust.html

version.texi: Makefile
version.texi: Makefile rust.texi
git log -1 \
--format='@macro gitversion%n%h %ci%n@end macro%n' >$@

Expand Down
12 changes: 6 additions & 6 deletions doc/rust.texi
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ roles.
@item Static control over memory allocation, packing and aliasing.

Many values in Rust are allocated @emph{within} their containing stack-frame
or parent strucure. Numbers, records, tuples and tags are all allocated this
or parent structure. Numbers, records, tuples and tags are all allocated this
way. To allocate such values in the heap, they must be explicitly
@emph{boxed}. A @dfn{box} is a pointer to a heap allocation that holds another
value, its @emph{content}. If the content of a box is a @emph{state} value --
Expand Down Expand Up @@ -1392,7 +1392,7 @@ automatically adjusting reference counts on the associated heap
allocation. For these operations, to access the value held in the box requires
an explicit dereference of the box value. Explicitly dereferencing a box is
indicated with the unary @emph{star} operator @code{*}. Examples of such
@dfn{explicit dererence} operations are:
@dfn{explicit dereference} operations are:
@itemize
@item copying box values (@code{x = y})
@item passing box values to functions (@code{f(x,y)})
Expand Down Expand Up @@ -1845,7 +1845,7 @@ iter range(int lo, int hi) -> int @{
@}

let int sum = 0;
for each (int x = range(0,100)) @{
for each (int x in range(0,100)) @{
sum += x;
@}
@end example
Expand Down Expand Up @@ -2325,7 +2325,7 @@ iter range(int x, int y) -> int @{
@}
@}

for each (int i = range(5,7)) @{
for each (int i in range(5,7)) @{
@dots{};
@}
@end example
Expand Down Expand Up @@ -3149,7 +3149,7 @@ fn read_file_lines(&str path) -> vec[str] @{
note path;
vec[str] r;
file f = open_read(path);
for each (str &s = lines(f)) @{
for each (&str s in lines(f)) @{
vec.append(r,s);
@}
ret r;
Expand Down Expand Up @@ -3282,7 +3282,7 @@ Example of a foreach loop:
@example
let str txt;
let vec[str] lines;
for each (&str s = _str.split(txt, "\n")) @{
for each (&str s in _str.split(txt, "\n")) @{
vec.push(lines, s);
@}
@end example
Expand Down