Skip to content

Commit 85fecd0

Browse files
committed
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2 parents d2c4b64 + a660bb3 commit 85fecd0

File tree

236 files changed

+1504
-1192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+1504
-1192
lines changed

doc/tutorial.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,11 +2304,10 @@ mod farm {
23042304
farmer: Human
23052305
}
23062306
2307-
// Note - visibility modifiers on impls currently have no effect
23082307
impl Farm {
23092308
priv fn feed_chickens(&self) { ... }
23102309
priv fn feed_cows(&self) { ... }
2311-
fn add_chicken(&self, c: Chicken) { ... }
2310+
pub fn add_chicken(&self, c: Chicken) { ... }
23122311
}
23132312
23142313
pub fn feed_animals(farm: &Farm) {

src/etc/gedit/readme.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Add syntax highlighting for Mozilla Rust in GtkSourceView (used by GEdit).
2+
3+
4+
Instructions for Ubuntu Linux 12.04+
5+
6+
1) Close all instances of GEdit
7+
8+
2) Copy the included "share" folder into "~/.local/"
9+
10+
3) Open a shell in "~/.local/share/" and run "update-mime-database mime"
11+
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!-- Syntax highlighting for the under-development Mozilla Rust language -->
4+
5+
<language id="rust" _name="Rust" version="2.0" _section="Sources">
6+
<metadata>
7+
<property name="mimetypes">text/x-rust</property>
8+
<property name="globs">*.rs;*.rc</property>
9+
<property name="line-comment-start">//</property>
10+
<property name="block-comment-start">/*</property>
11+
<property name="block-comment-end">*/</property>
12+
</metadata>
13+
14+
<styles>
15+
<style id="comment" _name="Comment" map-to="def:comment"/>
16+
<style id="string" _name="String" map-to="def:string"/>
17+
<style id="char" _name="Character" map-to="def:character"/>
18+
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
19+
<style id="type" _name="Data Type" map-to="def:type"/>
20+
<style id="constant" _name="Constant" map-to="def:constant"/>
21+
<style id="identifier" _name="Identifier" map-to="def:identifier"/>
22+
<style id="number" _name="Number" map-to="def:decimal"/>
23+
<style id="scope" _name="Scope" map-to="def:preprocessor"/>
24+
</styles>
25+
26+
<definitions>
27+
28+
<context id="function" style-ref="keyword">
29+
<keyword>fn</keyword>
30+
</context>
31+
32+
<context id="type" style-ref="keyword">
33+
<keyword>type</keyword>
34+
</context>
35+
36+
<context id="keywords" style-ref="keyword">
37+
<keyword>as</keyword>
38+
<keyword>assert</keyword>
39+
<keyword>break</keyword>
40+
<keyword>const</keyword>
41+
<keyword>copy</keyword>
42+
<keyword>do</keyword>
43+
<keyword>drop</keyword>
44+
<keyword>else</keyword>
45+
<keyword>enum</keyword>
46+
<keyword>export</keyword>
47+
<keyword>extern</keyword>
48+
<keyword>fail</keyword>
49+
<keyword>for</keyword>
50+
<keyword>if</keyword>
51+
<keyword>impl</keyword>
52+
<keyword>let</keyword>
53+
<keyword>log</keyword>
54+
<keyword>loop</keyword>
55+
<keyword>match</keyword>
56+
<keyword>mod</keyword>
57+
<keyword>move</keyword>
58+
<keyword>mut</keyword>
59+
<keyword>priv</keyword>
60+
<keyword>pub</keyword>
61+
<keyword>pure</keyword>
62+
<keyword>ref</keyword>
63+
<keyword>return</keyword>
64+
<keyword>static</keyword>
65+
<keyword>struct</keyword>
66+
<keyword>trait</keyword>
67+
<keyword>unsafe</keyword>
68+
<keyword>use</keyword>
69+
<keyword>while</keyword>
70+
</context>
71+
72+
<context id="types" style-ref="type">
73+
<keyword>bool</keyword>
74+
<keyword>int</keyword>
75+
<keyword>uint</keyword>
76+
<keyword>i8</keyword>
77+
<keyword>i16</keyword>
78+
<keyword>i32</keyword>
79+
<keyword>i64</keyword>
80+
<keyword>u8</keyword>
81+
<keyword>u16</keyword>
82+
<keyword>u32</keyword>
83+
<keyword>u64</keyword>
84+
<keyword>f32</keyword>
85+
<keyword>f64</keyword>
86+
<keyword>float</keyword>
87+
<keyword>char</keyword>
88+
<keyword>str</keyword>
89+
<keyword>Either</keyword>
90+
<keyword>Option</keyword>
91+
<keyword>Result</keyword>
92+
</context>
93+
94+
<context id="ctypes" style-ref="type">
95+
<keyword>c_float</keyword>
96+
<keyword>c_double</keyword>
97+
<keyword>c_void</keyword>
98+
<keyword>FILE</keyword>
99+
<keyword>fpos_t</keyword>
100+
<keyword>DIR</keyword>
101+
<keyword>dirent</keyword>
102+
<keyword>c_char</keyword>
103+
<keyword>c_schar</keyword>
104+
<keyword>c_uchar</keyword>
105+
<keyword>c_short</keyword>
106+
<keyword>c_ushort</keyword>
107+
<keyword>c_int</keyword>
108+
<keyword>c_uint</keyword>
109+
<keyword>c_long</keyword>
110+
<keyword>c_ulong</keyword>
111+
<keyword>size_t</keyword>
112+
<keyword>ptrdiff_t</keyword>
113+
<keyword>clock_t</keyword>
114+
<keyword>time_t</keyword>
115+
<keyword>c_longlong</keyword>
116+
<keyword>c_ulonglong</keyword>
117+
<keyword>intptr_t</keyword>
118+
<keyword>uintptr_t</keyword>
119+
<keyword>off_t</keyword>
120+
<keyword>dev_t</keyword>
121+
<keyword>ino_t</keyword>
122+
<keyword>pid_t</keyword>
123+
<keyword>mode_t</keyword>
124+
<keyword>ssize_t</keyword>
125+
</context>
126+
127+
<context id="self" style-ref="identifier">
128+
<keyword>self</keyword>
129+
</context>
130+
131+
<context id="constants" style-ref="constant">
132+
<keyword>true</keyword>
133+
<keyword>false</keyword>
134+
<keyword>Some</keyword>
135+
<keyword>None</keyword>
136+
<keyword>Left</keyword>
137+
<keyword>Right</keyword>
138+
<keyword>Ok</keyword>
139+
<keyword>Err</keyword>
140+
<keyword>Success</keyword>
141+
<keyword>Failure</keyword>
142+
<keyword>Cons</keyword>
143+
<keyword>Nil</keyword>
144+
</context>
145+
146+
<context id="cconstants" style-ref="constant">
147+
<keyword>EXIT_FAILURE</keyword>
148+
<keyword>EXIT_SUCCESS</keyword>
149+
<keyword>RAND_MAX</keyword>
150+
<keyword>EOF</keyword>
151+
<keyword>SEEK_SET</keyword>
152+
<keyword>SEEK_CUR</keyword>
153+
<keyword>SEEK_END</keyword>
154+
<keyword>_IOFBF</keyword>
155+
<keyword>_IONBF</keyword>
156+
<keyword>_IOLBF</keyword>
157+
<keyword>BUFSIZ</keyword>
158+
<keyword>FOPEN_MAX</keyword>
159+
<keyword>FILENAME_MAX</keyword>
160+
<keyword>L_tmpnam</keyword>
161+
<keyword>TMP_MAX</keyword>
162+
<keyword>O_RDONLY</keyword>
163+
<keyword>O_WRONLY</keyword>
164+
<keyword>O_RDWR</keyword>
165+
<keyword>O_APPEND</keyword>
166+
<keyword>O_CREAT</keyword>
167+
<keyword>O_EXCL</keyword>
168+
<keyword>O_TRUNC</keyword>
169+
<keyword>S_IFIFO</keyword>
170+
<keyword>S_IFCHR</keyword>
171+
<keyword>S_IFBLK</keyword>
172+
<keyword>S_IFDIR</keyword>
173+
<keyword>S_IFREG</keyword>
174+
<keyword>S_IFMT</keyword>
175+
<keyword>S_IEXEC</keyword>
176+
<keyword>S_IWRITE</keyword>
177+
<keyword>S_IREAD</keyword>
178+
<keyword>S_IRWXU</keyword>
179+
<keyword>S_IXUSR</keyword>
180+
<keyword>S_IWUSR</keyword>
181+
<keyword>S_IRUSR</keyword>
182+
<keyword>F_OK</keyword>
183+
<keyword>R_OK</keyword>
184+
<keyword>W_OK</keyword>
185+
<keyword>X_OK</keyword>
186+
<keyword>STDIN_FILENO</keyword>
187+
<keyword>STDOUT_FILENO</keyword>
188+
<keyword>STDERR_FILENO</keyword>
189+
</context>
190+
191+
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
192+
<start>//</start>
193+
<include>
194+
<context ref="def:in-line-comment"/>
195+
</include>
196+
</context>
197+
198+
<context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
199+
<start>/\*</start>
200+
<end>\*/</end>
201+
<include>
202+
<context ref="def:in-comment"/>
203+
</include>
204+
</context>
205+
206+
<context id="number" style-ref="number">
207+
<match extended="true">
208+
(?&lt;![\w\.])
209+
(
210+
0x[0-9a-fA-F_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?|
211+
0b[0-1_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?|
212+
[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?|
213+
[0-9][0-9_]*(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?
214+
)
215+
(?![\w\.])
216+
</match>
217+
</context>
218+
219+
<context id="scope" style-ref="scope">
220+
<match extended="true">
221+
[a-zA-Z_][a-zA-Z0-9_]*::
222+
</match>
223+
</context>
224+
225+
<context id="string" style-ref="string" class="string" class-disabled="no-spell-check">
226+
<start>"</start>
227+
<end>"</end>
228+
<include>
229+
<context ref="def:escape"/>
230+
<context ref="def:line-continue"/>
231+
</include>
232+
</context>
233+
234+
<context id="char" style-ref="char" end-at-line-end="true" class="char" class-disabled="no-spell-check">
235+
<start>'</start>
236+
<end>'</end>
237+
<include>
238+
<context ref="def:escape"/>
239+
</include>
240+
</context>
241+
242+
<context id="rust" class="no-spell-check">
243+
<include>
244+
<context ref="function"/>
245+
<context ref="type"/>
246+
<context ref="keywords"/>
247+
<context ref="types"/>
248+
<context ref="ctypes"/>
249+
<context ref="self"/>
250+
<context ref="constants"/>
251+
<context ref="cconstants"/>
252+
<context ref="line-comment"/>
253+
<context ref="block-comment"/>
254+
<context ref="number"/>
255+
<context ref="scope"/>
256+
<context ref="string"/>
257+
<context ref="char"/>
258+
</include>
259+
</context>
260+
261+
</definitions>
262+
263+
</language>
264+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
2+
<mime-type type="text/x-rust">
3+
<comment>Rust Source</comment>
4+
<glob pattern="*.rs"/>
5+
<glob pattern="*.rc"/>
6+
</mime-type>
7+
</mime-info>

src/libcore/cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub pure fn empty_cell<T>() -> Cell<T> {
2828
Cell { value: None }
2929
}
3030

31-
impl<T> Cell<T> {
31+
pub impl<T> Cell<T> {
3232
/// Yields the value, failing if the cell is empty.
3333
fn take() -> T {
3434
if self.is_empty() {

src/libcore/comm.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// Transitional -- needs snapshot
12-
#[allow(structural_records)];
13-
1411
use either::{Either, Left, Right};
1512
use kinds::Owned;
1613
use option;
@@ -190,7 +187,7 @@ pub fn PortSet<T: Owned>() -> PortSet<T>{
190187
}
191188
}
192189
193-
impl<T: Owned> PortSet<T> {
190+
pub impl<T: Owned> PortSet<T> {
194191
195192
fn add(port: Port<T>) {
196193
self.ports.push(port)
@@ -323,12 +320,12 @@ pub fn oneshot<T: Owned>() -> (PortOne<T>, ChanOne<T>) {
323320
(port, chan)
324321
}
325322
326-
impl<T: Owned> PortOne<T> {
323+
pub impl<T: Owned> PortOne<T> {
327324
fn recv(self) -> T { recv_one(self) }
328325
fn try_recv(self) -> Option<T> { try_recv_one(self) }
329326
}
330327
331-
impl<T: Owned> ChanOne<T> {
328+
pub impl<T: Owned> ChanOne<T> {
332329
fn send(self, data: T) { send_one(self, data) }
333330
fn try_send(self, data: T) -> bool { try_send_one(self, data) }
334331
}

src/libcore/condition.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub struct Condition<T, U> {
2525
key: task::local_data::LocalDataKey<Handler<T, U>>
2626
}
2727

28-
impl<T, U> Condition<T, U> {
28+
pub impl<T, U> Condition<T, U> {
2929
fn trap(&self, h: &self/fn(T) -> U) -> Trap/&self<T, U> {
3030
unsafe {
3131
let p : *RustClosure = ::cast::transmute(&h);
@@ -69,7 +69,7 @@ struct Trap<T, U> {
6969
handler: @Handler<T, U>
7070
}
7171

72-
impl<T, U> Trap<T, U> {
72+
pub impl<T, U> Trap<T, U> {
7373
fn in<V>(&self, inner: &self/fn() -> V) -> V {
7474
unsafe {
7575
let _g = Guard { cond: self.cond };

src/libcore/core.rc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,6 @@ pub const debug : u32 = 4_u32;
227227

228228
// The runtime interface used by the compiler
229229
#[cfg(notest)] pub mod rt;
230-
// The runtime and compiler interface to fmt!
231-
#[cfg(stage0)]
232-
#[path = "private/extfmt.rs"]
233-
pub mod extfmt;
234230
// Private APIs
235231
pub mod private;
236232

src/libcore/dlist.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ priv impl<T> DListNode<T> {
6262
}
6363
}
6464
65-
impl<T> DListNode<T> {
65+
pub impl<T> DListNode<T> {
6666
/// Get the next node in the list, if there is one.
6767
pure fn next_link(@mut self) -> DListLink<T> {
6868
self.assert_links();
@@ -208,7 +208,7 @@ priv impl<T> DList<T> {
208208
}
209209
}
210210
211-
impl<T> DList<T> {
211+
pub impl<T> DList<T> {
212212
/// Get the size of the list. O(1).
213213
pure fn len(@mut self) -> uint { self.size }
214214
/// Returns true if the list is empty. O(1).
@@ -457,7 +457,7 @@ impl<T> DList<T> {
457457
}
458458
}
459459

460-
impl<T:Copy> DList<T> {
460+
pub impl<T:Copy> DList<T> {
461461
/// Remove data from the head of the list. O(1).
462462
fn pop(@mut self) -> Option<T> {
463463
self.pop_n().map(|nobe| nobe.data)

0 commit comments

Comments
 (0)