Skip to content

Commit 1a3d0b4

Browse files
committed
---
yaml --- r: 50454 b: refs/heads/auto c: 86d5ce5 h: refs/heads/master v: v3
1 parent 2a9eebf commit 1a3d0b4

File tree

13 files changed

+317
-186
lines changed

13 files changed

+317
-186
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 88e4b5de8350968b69b9e4d9037f35a5eaf3f796
17+
refs/heads/auto: 86d5ce5cef29e388de04c667e8cfd205327629cc
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/COPYRIGHT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ terms.
66

77
Longer version:
88

9-
The Rust Project is copyright 2013, The Rust Project
9+
The Rust Project is copyright 2012, The Rust Project
1010
Developers (given in the file AUTHORS.txt).
1111

1212
Licensed under the Apache License, Version 2.0
@@ -257,7 +257,7 @@ their own copyright notices and license terms:
257257
* LLVM and Clang. Code for this package is found in
258258
src/llvm.
259259

260-
Copyright (c) 2003-2013 University of Illinois at
260+
Copyright (c) 2003-2012 University of Illinois at
261261
Urbana-Champaign. All rights reserved.
262262

263263
Developed by:

branches/auto/LICENSE-MIT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Copyright (c) 2006-2009 Graydon Hoare
2-
Copyright (c) 2009-2013 Mozilla Foundation
1+
Copyright (c) 2006-2012 Graydon Hoare
2+
Copyright (c) 2009-2012 Mozilla Foundation
33

44
Permission is hereby granted, free of charge, to any
55
person obtaining a copy of this software and associated

branches/auto/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ packages:
4242
Assuming you're on a relatively modern *nix system and have met the
4343
prerequisites, something along these lines should work.
4444

45-
$ curl -O http://static.rust-lang.org/dist/rust-0.6.tar.gz
46-
$ tar -xzf rust-0.6.tar.gz
47-
$ cd rust-0.6
45+
$ curl -O http://static.rust-lang.org/dist/rust-0.5.tar.gz
46+
$ tar -xzf rust-0.5.tar.gz
47+
$ cd rust-0.5
4848
$ ./configure
4949
$ make && make install
5050

@@ -59,8 +59,8 @@ When complete, `make install` will place several programs into
5959
API-documentation tool, and `rustpkg`, the Rust package manager and build system.
6060

6161
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
62-
[tarball]: http://static.rust-lang.org/dist/rust-0.6.tar.gz
63-
[win-exe]: http://static.rust-lang.org/dist/rust-0.6-install.exe
62+
[tarball]: http://static.rust-lang.org/dist/rust-0.5.tar.gz
63+
[win-exe]: http://static.rust-lang.org/dist/rust-0.5-install.exe
6464

6565

6666
## License

branches/auto/doc/rust.md

Lines changed: 1 addition & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,111 +1420,13 @@ names are effectively reserved. Some significant attributes include:
14201420

14211421
* The `doc` attribute, for documenting code in-place.
14221422
* The `cfg` attribute, for conditional-compilation by build-configuration.
1423-
* The `lang` attribute, for custom definitions of traits and functions that are known to the Rust compiler (see [Language items](#language-items)).
14241423
* The `link` attribute, for describing linkage metadata for a crate.
14251424
* The `test` attribute, for marking functions as unit tests.
1426-
* The `allow`, `warn`, `forbid`, and `deny` attributes, for controlling lint checks. Lint checks supported
1425+
* The `allow`, `warn`, `forbid`, and `deny` attributes, for controling lint checks. Lint checks supported
14271426
by the compiler can be found via `rustc -W help`.
14281427

14291428
Other attributes may be added or removed during development of the language.
14301429

1431-
### Language items
1432-
1433-
Some primitive Rust operations are defined in Rust code,
1434-
rather than being implemented directly in C or assembly language.
1435-
The definitions of these operations have to be easy for the compiler to find.
1436-
The `lang` attribute makes it possible to declare these operations.
1437-
For example, the `str` module in the Rust core library defines the string equality function:
1438-
1439-
~~~ {.xfail-test}
1440-
#[lang="str_eq"]
1441-
pub fn eq_slice(a: &str, b: &str) -> bool {
1442-
// details elided
1443-
}
1444-
~~~
1445-
1446-
The name `str_eq` has a special meaning to the Rust compiler,
1447-
and the presence of this definition means that it will use this definition
1448-
when generating calls to the string equality function.
1449-
1450-
A complete list of the built-in language items follows:
1451-
1452-
#### Traits
1453-
1454-
`const`
1455-
: Cannot be mutated.
1456-
`copy`
1457-
: Can be implicitly copied.
1458-
`owned`
1459-
: Are uniquely owned.
1460-
`durable`
1461-
: Contain borrowed pointers.
1462-
`drop`
1463-
: Have finalizers.
1464-
`add`
1465-
: Elements can be added (for example, integers and floats).
1466-
`sub`
1467-
: Elements can be subtracted.
1468-
`mul`
1469-
: Elements can be multiplied.
1470-
`div`
1471-
: Elements can be divided.
1472-
`mod`
1473-
: Elements have a modulo operation.
1474-
`neg`
1475-
: Elements can be negated arithmetically.
1476-
`not`
1477-
: Elements can be negated logically.
1478-
`bitxor`
1479-
: Elements have an exclusive-or operation.
1480-
`bitand`
1481-
: Elements have a bitwise `and` operation.
1482-
`bitor`
1483-
: Elements have a bitwise `or` operation.
1484-
`shl`
1485-
: Elements have a left shift operation.
1486-
`shr`
1487-
: Elements have a right shift operation.
1488-
`index`
1489-
: Elements can be indexed.
1490-
`eq`
1491-
: Elements can be compared for equality.
1492-
`ord`
1493-
: Elements have a partial ordering.
1494-
1495-
#### Operations
1496-
1497-
`str_eq`
1498-
: Compare two strings for equality.
1499-
`uniq_str_eq`
1500-
: Compare two owned strings for equality.
1501-
`annihilate`
1502-
: Destroy a box before freeing it.
1503-
`log_type`
1504-
: Generically print a string representation of any type.
1505-
`fail_`
1506-
: Abort the program with an error.
1507-
`fail_bounds_check`
1508-
: Abort the program with a bounds check error.
1509-
`exchange_malloc`
1510-
: Allocate memory on the exchange heap.
1511-
`exchange_free`
1512-
: Free memory that was allocated on the exchange heap.
1513-
`malloc`
1514-
: Allocate memory on the managed heap.
1515-
`free`
1516-
: Free memory that was allocated on the managed heap.
1517-
`borrow_as_imm`
1518-
: Create an immutable borrowed pointer to a mutable value.
1519-
`return_to_mut`
1520-
: Release a borrowed pointer created with `return_to_mut`
1521-
`check_not_borrowed`
1522-
: Fail if a value has existing borrowed pointers to it.
1523-
`strdup_uniq`
1524-
: Return a new unique string containing a copy of the contents of a unique string.
1525-
1526-
> **Note:** This list is likely to become out of date. We should auto-generate it
1527-
> from `librustc/middle/lang_items.rs`.
15281430

15291431
# Statements and expressions
15301432

branches/auto/doc/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ If you've fulfilled those prerequisites, something along these lines
9999
should work.
100100

101101
~~~~ {.notrust}
102-
$ curl -O http://static.rust-lang.org/dist/rust-0.6.tar.gz
103-
$ tar -xzf rust-0.6.tar.gz
104-
$ cd rust-0.6
102+
$ curl -O http://static.rust-lang.org/dist/rust-0.5.tar.gz
103+
$ tar -xzf rust-0.5.tar.gz
104+
$ cd rust-0.5
105105
$ ./configure
106106
$ make && make install
107107
~~~~
@@ -119,8 +119,8 @@ API-documentation tool; `rustpkg`, the Rust package manager;
119119
interface for them, and for a few common command line scenarios.
120120

121121
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
122-
[tarball]: http://static.rust-lang.org/dist/rust-0.6.tar.gz
123-
[win-exe]: http://static.rust-lang.org/dist/rust-0.6-install.exe
122+
[tarball]: http://static.rust-lang.org/dist/rust-0.5.tar.gz
123+
[win-exe]: http://static.rust-lang.org/dist/rust-0.5-install.exe
124124

125125
## Compiling your first program
126126

branches/auto/mk/install.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
119119
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBSYNTAX_GLOB_$(CFG_BUILD_TRIPLE)))
120120
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTI_GLOB_$(CFG_BUILD_TRIPLE)))
121121
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUST_GLOB_$(CFG_BUILD_TRIPLE)))
122-
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTPKG_GLOB_$(CFG_BUILD_TRIPLE)))
123-
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTDOC_GLOB_$(CFG_BUILD_TRIPLE)))
124122
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME_$(CFG_BUILD_TRIPLE)))
125123
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM_$(CFG_BUILD_TRIPLE)))
126124
$(Q)$(call INSTALL,$(S)/man, \

branches/auto/src/etc/pkg/rust.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
SetupIconFile=rust-logo.ico
66
AppName=Rust
77
AppVersion={#CFG_VERSION}
8-
AppCopyright=Copyright (C) 2006-2013 Mozilla Foundation, MIT license
8+
AppCopyright=Copyright (C) 2006-2012 Mozilla Foundation, MIT license
99
AppPublisher=Mozilla Foundation
1010
AppPublisherURL=http://www.rust-lang.org
1111
VersionInfoVersion={#CFG_VERSION}

branches/auto/src/libcore/core.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ pub mod rand;
212212
pub mod run;
213213
pub mod sys;
214214
pub mod cast;
215+
pub mod mutable;
215216
pub mod flate;
216217
pub mod repr;
217218
pub mod cleanup;

branches/auto/src/libcore/io.rs

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,89 @@ pub mod rustrt {
4949

5050
// FIXME (#2004): This is all buffered. We might need an unbuffered variant
5151
// as well
52+
/**
53+
* The SeekStyle enum describes the relationship between the position
54+
* we'd like to seek to from our current position. It's used as an argument
55+
* to the `seek` method defined on the `Reader` trait.
56+
*
57+
* There are three seek styles:
58+
*
59+
* 1. `SeekSet` means that the new position should become our position.
60+
* 2. `SeekCur` means that we should seek from the current position.
61+
* 3. `SeekEnd` means that we should seek from the end.
62+
*
63+
* # Examples
64+
*
65+
* None right now.
66+
*/
5267
pub enum SeekStyle { SeekSet, SeekEnd, SeekCur, }
5368

5469

55-
/// The raw underlying reader trait. All readers must implement this.
70+
/**
71+
* The core Reader trait. All readers must implement this trait.
72+
*
73+
* # Examples
74+
*
75+
* None right now.
76+
*/
5677
pub trait Reader {
5778
// FIXME (#2004): Seekable really should be orthogonal.
5879

59-
/// Read up to len bytes (or EOF) and put them into bytes (which
60-
/// must be at least len bytes long). Return number of bytes read.
6180
// FIXME (#2982): This should probably return an error.
81+
/**
82+
* Reads bytes and puts them into `bytes`. Returns the number of
83+
* bytes read.
84+
*
85+
* The number of bytes to be read is `len` or the end of the file,
86+
* whichever comes first.
87+
*
88+
* The buffer must be at least `len` bytes long.
89+
*
90+
* # Examples
91+
*
92+
* None right now.
93+
*/
6294
fn read(&self, bytes: &mut [u8], len: uint) -> uint;
6395

64-
/// Read a single byte, returning a negative value for EOF or read error.
96+
/**
97+
* Reads a single byte.
98+
*
99+
* In the case of an EOF or an error, returns a negative value.
100+
*
101+
* # Examples
102+
*
103+
* None right now.
104+
*/
65105
fn read_byte(&self) -> int;
66106

67-
/// Return whether the stream is currently at EOF position.
107+
/**
108+
* Returns a boolean value: are we currently at EOF?
109+
*
110+
* # Examples
111+
*
112+
* None right now.
113+
*/
68114
fn eof(&self) -> bool;
69115

70-
/// Move the current position within the stream. The second parameter
71-
/// determines the position that the first parameter is relative to.
116+
/**
117+
* Seek to a given `position` in the stream.
118+
*
119+
* Takes an optional SeekStyle, which affects how we seek from the
120+
* position. See `SeekStyle` docs for more details.
121+
*
122+
* # Examples
123+
*
124+
* None right now.
125+
*/
72126
fn seek(&self, position: int, style: SeekStyle);
73127

74-
/// Return the current position within the stream.
128+
/**
129+
* Returns the current position within the stream.
130+
*
131+
* # Examples
132+
*
133+
* None right now.
134+
*/
75135
fn tell(&self) -> uint;
76136
}
77137

0 commit comments

Comments
 (0)