Skip to content

Commit 33d3047

Browse files
committed
---
yaml --- r: 114619 b: refs/heads/auto c: 061db52 h: refs/heads/master i: 114617: 079f8c0 114615: 316b15b v: v3
1 parent 8dcf6d3 commit 33d3047

File tree

5 files changed

+27
-10
lines changed

5 files changed

+27
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 809a2f8a7b84b3d59b9f1742c4fe0457df9f2b72
16+
refs/heads/auto: 061db52b2b3a68477819fa7709350d3c25bb5741
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ message explaining why.
3333

3434
In the licensing header at the beginning of any files you change,
3535
please make sure the listed date range includes the current year. For
36-
example, if it's 2013, and you change a Rust file that was created in
36+
example, if it's 2014, and you change a Rust file that was created in
3737
2010, it should begin:
3838

3939
```
40-
// Copyright 2010-2013 The Rust Project Developers.
40+
// Copyright 2010-2014 The Rust Project Developers.
4141
```
4242

4343
For more details, please refer to

branches/auto/src/doc/guide-tasks.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ closure in the new task.
8989
fn print_message() { println!("I am running in a different task!"); }
9090
spawn(print_message);
9191
92-
// Print something more profound in a different task using a lambda expression
93-
// This uses the proc() keyword to assign to spawn a function with no name
94-
// That function will call println!(...) as requested
92+
// Print something profound in a different task using a `proc` expression
93+
// The `proc` expression evaluates to an (unnamed) owned closure.
94+
// That closure will call `println!(...)` when the spawned task runs.
95+
9596
spawn(proc() println!("I am also running in a different task!") );
9697
~~~~
9798

branches/auto/src/doc/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ fn main() {
370370
```
371371

372372
This example is starting to get more subtle,
373-
but it hints at the powerful compositionality of Rust's concurrent types.
373+
but it hints at the powerful composability of Rust's concurrent types.
374374
This time we've put our array of numbers inside a `Mutex` and then put *that* inside the `Arc`.
375375
Like immutable data,
376376
`Mutex`es are sharable,

branches/auto/src/etc/vim/indent/rust.vim

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif
3030

3131
" Come here when loading the script the first time.
3232

33-
function s:get_line_trimmed(lnum)
33+
function! s:get_line_trimmed(lnum)
3434
" Get the line and remove a trailing comment.
3535
" Use syntax highlighting attributes when possible.
3636
" NOTE: this is not accurate; /* */ or a line continuation could trick it
@@ -61,6 +61,20 @@ function s:get_line_trimmed(lnum)
6161
endif
6262
endfunction
6363

64+
function! s:is_string_comment(lnum, col)
65+
if has('syntax_items')
66+
for id in synstack(a:lnum, a:col)
67+
let synname = synIDattr(id, "name")
68+
if synname == "rustString" || synname =~ "^rustComment"
69+
return 1
70+
endif
71+
endfor
72+
else
73+
" without syntax, let's not even try
74+
return 0
75+
endif
76+
endfunction
77+
6478
function GetRustIndent(lnum)
6579

6680
" Starting assumption: cindent (called at the end) will do it right
@@ -152,8 +166,10 @@ function GetRustIndent(lnum)
152166
" column zero)
153167

154168
call cursor(a:lnum, 1)
155-
if searchpair('{\|(', '', '}\|)', 'nbW') == 0
156-
if searchpair('\[', '', '\]', 'nbW') == 0
169+
if searchpair('{\|(', '', '}\|)', 'nbW'
170+
\ 's:is_string_comment(line("."), col("."))') == 0
171+
if searchpair('\[', '', '\]', 'nbW',
172+
\ 's:is_string_comment(line("."), col("."))') == 0
157173
" Global scope, should be zero
158174
return 0
159175
else

0 commit comments

Comments
 (0)