Skip to content

Commit d51eda6

Browse files
committed
---
yaml --- r: 105471 b: refs/heads/master c: 7532d20 h: refs/heads/master i: 105469: 3e6d2c2 105467: f38e452 105463: 438ee62 105455: 813deb3 105439: 51bf737 105407: 5ce4f32 105343: 29db2b1 105215: 3315137 104959: e1f0ef3 104447: cbf0a6d v: v3
1 parent 2c2fa06 commit d51eda6

File tree

182 files changed

+7969
-6588
lines changed

Some content is hidden

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

182 files changed

+7969
-6588
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 7180b5de4452095b032e6c77a77d8c6f81c4f6d3
2+
refs/heads/master: 7532d20a17dce417e9040e31623e7fcf01971db7
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b8601a3d8b91ad3b653d143307611f2f5c75617e
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13

trunk/src/doc/rust.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3136,8 +3136,12 @@ machine.
31363136

31373137
The types `char` and `str` hold textual data.
31383138

3139-
A value of type `char` is a Unicode character,
3140-
represented as a 32-bit unsigned word holding a UCS-4 codepoint.
3139+
A value of type `char` is a [Unicode scalar value](
3140+
http://www.unicode.org/glossary/#unicode_scalar_value)
3141+
(ie. a code point that is not a surrogate),
3142+
represented as a 32-bit unsigned word in the 0x0000 to 0xD7FF
3143+
or 0xE000 to 0x10FFFF range.
3144+
A `[char]` vector is effectively an UCS-4 / UTF-32 string.
31413145

31423146
A value of type `str` is a Unicode string,
31433147
represented as a vector of 8-bit unsigned bytes holding a sequence of UTF-8 codepoints.

trunk/src/doc/rustdoc.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub fn recalibrate() {
4343
Doc comments are markdown, and are currently parsed with the
4444
[sundown][sundown] library. rustdoc does not yet do any fanciness such as
4545
referencing other items inline, like javadoc's `@see`. One exception to this
46-
is that the first paragrah will be used as the "summary" of an item in the
46+
is that the first paragraph will be used as the "summary" of an item in the
4747
generated documentation:
4848

4949
~~~
@@ -79,11 +79,11 @@ rustdoc can also generate JSON, for consumption by other tools, with
7979

8080
# Using the Documentation
8181

82-
The web pages generated by rustdoc present the same logical heirarchy that one
82+
The web pages generated by rustdoc present the same logical hierarchy that one
8383
writes a library with. Every kind of item (function, struct, etc) has its own
8484
color, and one can always click on a colored type to jump to its
8585
documentation. There is a search bar at the top, which is powered by some
86-
javascript and a statically-generated search index. No special web server is
86+
JavaScript and a statically-generated search index. No special web server is
8787
required for the search.
8888

8989
[sundown]: https://github.com/vmg/sundown/
@@ -108,7 +108,7 @@ code, the `ignore` string can be added to the three-backtick form of markdown
108108
code block.
109109

110110
/**
111-
# nested codefences confuse sundown => indentation + comment to
111+
# nested code fences confuse sundown => indentation + comment to
112112
# avoid failing tests
113113
```
114114
// This is a testable code block
@@ -126,7 +126,7 @@ You can specify that the test's execution should fail with the `should_fail`
126126
directive.
127127

128128
/**
129-
# nested codefences confuse sundown => indentation + comment to
129+
# nested code fences confuse sundown => indentation + comment to
130130
# avoid failing tests
131131
```should_fail
132132
// This code block is expected to generate a failure when run
@@ -138,7 +138,7 @@ You can specify that the code block should be compiled but not run with the
138138
`no_run` directive.
139139

140140
/**
141-
# nested codefences confuse sundown => indentation + comment to
141+
# nested code fences confuse sundown => indentation + comment to
142142
# avoid failing tests
143143
```no_run
144144
// This code will be compiled but not executed
@@ -153,7 +153,7 @@ testing the code block (NB. the space after the `#` is required, so
153153
that one can still write things like `#[deriving(Eq)]`).
154154

155155
/**
156-
# nested codefences confuse sundown => indentation + comment to
156+
# nested code fences confuse sundown => indentation + comment to
157157
# avoid failing tests
158158
```rust
159159
# /!\ The three following lines are comments, which are usually stripped off by
@@ -162,7 +162,7 @@ that one can still write things like `#[deriving(Eq)]`).
162162
# these first five lines but a non breakable one.
163163
#
164164
# // showing 'fib' in this documentation would just be tedious and detracts from
165-
# // what's actualy being documented.
165+
# // what's actually being documented.
166166
# fn fib(n: int) { n + 2 }
167167

168168
do spawn { fib(200); }
@@ -190,7 +190,7 @@ $ rustdoc --test lib.rs --test-args '--help'
190190
~~~
191191

192192
When testing a library, code examples will often show how functions are used,
193-
and this code often requires `use`-ing paths from the crate. To accomodate this,
193+
and this code often requires `use`-ing paths from the crate. To accommodate this,
194194
rustdoc will implicitly add `extern crate <crate>;` where `<crate>` is the name of
195195
the crate being tested to the top of each code example. This means that rustdoc
196196
must be able to find a compiled version of the library crate being tested. Extra

trunk/src/libgetopts/lib.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
8484
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
8585
html_root_url = "http://static.rust-lang.org/doc/master")];
86-
#[allow(missing_doc)];
86+
#[deny(missing_doc)];
8787
#[allow(deprecated_owned_vector)];
8888

8989
#[feature(globs, phase)];
@@ -98,27 +98,34 @@ use std::vec;
9898

9999
/// Name of an option. Either a string or a single char.
100100
#[deriving(Clone, Eq)]
101-
#[allow(missing_doc)]
102101
pub enum Name {
102+
/// A string representing the long name of an option.
103+
/// For example: "help"
103104
Long(~str),
105+
/// A char representing the short name of an option.
106+
/// For example: 'h'
104107
Short(char),
105108
}
106109

107110
/// Describes whether an option has an argument.
108111
#[deriving(Clone, Eq)]
109-
#[allow(missing_doc)]
110112
pub enum HasArg {
113+
/// The option requires an argument.
111114
Yes,
115+
/// The option is just a flag, therefore no argument.
112116
No,
117+
/// The option argument is optional and it could or not exist.
113118
Maybe,
114119
}
115120

116121
/// Describes how often an option may occur.
117122
#[deriving(Clone, Eq)]
118-
#[allow(missing_doc)]
119123
pub enum Occur {
124+
/// The option occurs once.
120125
Req,
126+
/// The option could or not occur.
121127
Optional,
128+
/// The option occurs once or multiple times.
122129
Multi,
123130
}
124131

@@ -176,12 +183,16 @@ pub struct Matches {
176183
/// expected format. Call the `to_err_msg` method to retrieve the
177184
/// error as a string.
178185
#[deriving(Clone, Eq, Show)]
179-
#[allow(missing_doc)]
180186
pub enum Fail_ {
187+
/// The option requires an argument but none was passed.
181188
ArgumentMissing(~str),
189+
/// The passed option is not declared among the possible options.
182190
UnrecognizedOption(~str),
191+
/// A required option is not present.
183192
OptionMissing(~str),
193+
/// A single occurence option is being used multiple times.
184194
OptionDuplicated(~str),
195+
/// There's an argument being passed to a non-argument option.
185196
UnexpectedArgument(~str),
186197
}
187198

trunk/src/libnum/bigint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl TotalOrd for BigUint {
117117
if s_len < o_len { return Less; }
118118
if s_len > o_len { return Greater; }
119119

120-
for (&self_i, &other_i) in self.data.rev_iter().zip(other.data.rev_iter()) {
120+
for (&self_i, &other_i) in self.data.iter().rev().zip(other.data.iter().rev()) {
121121
if self_i < other_i { return Less; }
122122
if self_i > other_i { return Greater; }
123123
}
@@ -788,7 +788,7 @@ impl BigUint {
788788

789789
let mut borrow = 0;
790790
let mut shifted_rev = Vec::with_capacity(self.data.len());
791-
for elem in self.data.rev_iter() {
791+
for elem in self.data.iter().rev() {
792792
shifted_rev.push((*elem >> n_bits) | borrow);
793793
borrow = *elem << (BigDigit::bits - n_bits);
794794
}

trunk/src/librustc/back/archive.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ use syntax::abi;
2828

2929
pub static METADATA_FILENAME: &'static str = "rust.metadata.bin";
3030

31-
pub struct Archive {
32-
priv sess: Session,
31+
pub struct Archive<'a> {
32+
priv sess: &'a Session,
3333
priv dst: Path,
3434
}
3535

3636
pub struct ArchiveRO {
3737
priv ptr: ArchiveRef,
3838
}
3939

40-
fn run_ar(sess: Session, args: &str, cwd: Option<&Path>,
41-
paths: &[&Path]) -> ProcessOutput {
40+
fn run_ar(sess: &Session, args: &str, cwd: Option<&Path>,
41+
paths: &[&Path]) -> ProcessOutput {
4242
let ar = get_ar_prog(sess);
4343

4444
let mut args = vec!(args.to_owned());
@@ -74,16 +74,16 @@ fn run_ar(sess: Session, args: &str, cwd: Option<&Path>,
7474
}
7575
}
7676

77-
impl Archive {
77+
impl<'a> Archive<'a> {
7878
/// Initializes a new static archive with the given object file
79-
pub fn create<'a>(sess: Session, dst: &'a Path,
80-
initial_object: &'a Path) -> Archive {
79+
pub fn create<'b>(sess: &'a Session, dst: &'b Path,
80+
initial_object: &'b Path) -> Archive<'a> {
8181
run_ar(sess, "crus", None, [dst, initial_object]);
8282
Archive { sess: sess, dst: dst.clone() }
8383
}
8484

8585
/// Opens an existing static archive
86-
pub fn open(sess: Session, dst: Path) -> Archive {
86+
pub fn open(sess: &'a Session, dst: Path) -> Archive<'a> {
8787
assert!(dst.exists());
8888
Archive { sess: sess, dst: dst }
8989
}
@@ -206,7 +206,7 @@ impl Archive {
206206
let unixlibname = format!("lib{}.a", name);
207207

208208
let mut rustpath = filesearch::rust_path();
209-
rustpath.push(self.sess.filesearch.get_target_lib_path());
209+
rustpath.push(self.sess.filesearch().get_target_lib_path());
210210
let addl_lib_search_paths = self.sess
211211
.opts
212212
.addl_lib_search_paths

0 commit comments

Comments
 (0)