Skip to content

Commit 3bd5f73

Browse files
committed
---
yaml --- r: 105461 b: refs/heads/master c: 749e527 h: refs/heads/master i: 105459: 24716ff v: v3
1 parent b7efcdd commit 3bd5f73

File tree

36 files changed

+635
-855
lines changed

36 files changed

+635
-855
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: 87e72c38122cbd24199365232217ca8c15ebe995
2+
refs/heads/master: 749e527be61c05775e5c797b302e3863a955fd89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b8601a3d8b91ad3b653d143307611f2f5c75617e
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13

trunk/src/doc/rust.md

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

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

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.
3139+
A value of type `char` is a Unicode character,
3140+
represented as a 32-bit unsigned word holding a UCS-4 codepoint.
31453141

31463142
A value of type `str` is a Unicode string,
31473143
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 paragraph will be used as the "summary" of an item in the
46+
is that the first paragrah 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 hierarchy that one
82+
The web pages generated by rustdoc present the same logical heirarchy 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 code fences confuse sundown => indentation + comment to
111+
# nested codefences 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 code fences confuse sundown => indentation + comment to
129+
# nested codefences 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 code fences confuse sundown => indentation + comment to
141+
# nested codefences 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 code fences confuse sundown => indentation + comment to
156+
# nested codefences 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 actually being documented.
165+
# // what's actualy 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 accommodate this,
193+
and this code often requires `use`-ing paths from the crate. To accomodate 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: 1 addition & 1 deletion
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-
#[deny(missing_doc)];
86+
#[allow(missing_doc)];
8787
#[allow(deprecated_owned_vector)];
8888

8989
#[feature(globs, phase)];

trunk/src/librustc/driver/driver.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ pub fn phase_1_parse_input(sess: &Session, cfg: ast::CrateConfig, input: &Input)
186186
});
187187

188188
if sess.opts.debugging_opts & session::AST_JSON_NOEXPAND != 0 {
189-
let mut stdout = io::BufferedWriter::new(io::stdout());
189+
let mut stdout = io::stdout();
190190
let mut json = json::PrettyEncoder::new(&mut stdout);
191191
krate.encode(&mut json);
192192
}
@@ -261,7 +261,7 @@ pub fn phase_2_configure_and_expand(sess: &Session,
261261
front::assign_node_ids_and_map::assign_node_ids_and_map(sess, krate));
262262

263263
if sess.opts.debugging_opts & session::AST_JSON != 0 {
264-
let mut stdout = io::BufferedWriter::new(io::stdout());
264+
let mut stdout = io::stdout();
265265
let mut json = json::PrettyEncoder::new(&mut stdout);
266266
krate.encode(&mut json);
267267
}
@@ -596,15 +596,15 @@ struct IdentifiedAnnotation;
596596

597597
impl pprust::PpAnn for IdentifiedAnnotation {
598598
fn pre(&self,
599-
s: &mut pprust::State,
599+
s: &mut pprust::State<IdentifiedAnnotation>,
600600
node: pprust::AnnNode) -> io::IoResult<()> {
601601
match node {
602602
pprust::NodeExpr(_) => s.popen(),
603603
_ => Ok(())
604604
}
605605
}
606606
fn post(&self,
607-
s: &mut pprust::State,
607+
s: &mut pprust::State<IdentifiedAnnotation>,
608608
node: pprust::AnnNode) -> io::IoResult<()> {
609609
match node {
610610
pprust::NodeItem(item) => {
@@ -634,15 +634,15 @@ struct TypedAnnotation {
634634
635635
impl pprust::PpAnn for TypedAnnotation {
636636
fn pre(&self,
637-
s: &mut pprust::State,
637+
s: &mut pprust::State<TypedAnnotation>,
638638
node: pprust::AnnNode) -> io::IoResult<()> {
639639
match node {
640640
pprust::NodeExpr(_) => s.popen(),
641641
_ => Ok(())
642642
}
643643
}
644644
fn post(&self,
645-
s: &mut pprust::State,
645+
s: &mut pprust::State<TypedAnnotation>,
646646
node: pprust::AnnNode) -> io::IoResult<()> {
647647
let tcx = &self.analysis.ty_cx;
648648
match node {

trunk/src/librustc/front/test.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ impl<'a> fold::Folder for TestHarnessGenerator<'a> {
9595
debug!("current path: {}",
9696
ast_util::path_name_i(self.cx.path.get().as_slice()));
9797

98-
if is_test_fn(&self.cx, i) || is_bench_fn(&self.cx, i) {
98+
if is_test_fn(&self.cx, i) || is_bench_fn(i) {
9999
match i.node {
100-
ast::ItemFn(_, ast::UnsafeFn, _, _, _) => {
100+
ast::ItemFn(_, purity, _, _, _)
101+
if purity == ast::UnsafeFn => {
101102
let sess = self.cx.sess;
102103
sess.span_fatal(i.span,
103104
"unsafe functions cannot be used for \
@@ -108,7 +109,7 @@ impl<'a> fold::Folder for TestHarnessGenerator<'a> {
108109
let test = Test {
109110
span: i.span,
110111
path: self.cx.path.get(),
111-
bench: is_bench_fn(&self.cx, i),
112+
bench: is_bench_fn(i),
112113
ignore: is_ignored(&self.cx, i),
113114
should_fail: should_fail(i)
114115
};
@@ -232,7 +233,7 @@ fn is_test_fn(cx: &TestCtxt, i: @ast::Item) -> bool {
232233
return has_test_attr && has_test_signature(i);
233234
}
234235

235-
fn is_bench_fn(cx: &TestCtxt, i: @ast::Item) -> bool {
236+
fn is_bench_fn(i: @ast::Item) -> bool {
236237
let has_bench_attr = attr::contains_name(i.attrs.as_slice(), "bench");
237238

238239
fn has_test_signature(i: @ast::Item) -> bool {
@@ -253,12 +254,6 @@ fn is_bench_fn(cx: &TestCtxt, i: @ast::Item) -> bool {
253254
}
254255
}
255256

256-
if has_bench_attr && !has_test_signature(i) {
257-
let sess = cx.sess;
258-
sess.span_err(i.span, "functions used as benches must have signature \
259-
`fn(&mut BenchHarness) -> ()`");
260-
}
261-
262257
return has_bench_attr && has_test_signature(i);
263258
}
264259

trunk/src/librustc/lib/llvm.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,24 @@ pub enum Visibility {
4343
ProtectedVisibility = 2,
4444
}
4545

46-
// This enum omits the obsolete (and no-op) linkage types DLLImportLinkage,
47-
// DLLExportLinkage, GhostLinkage and LinkOnceODRAutoHideLinkage.
48-
// LinkerPrivateLinkage and LinkerPrivateWeakLinkage are not included either;
49-
// they've been removed in upstream LLVM commit r203866.
5046
pub enum Linkage {
5147
ExternalLinkage = 0,
5248
AvailableExternallyLinkage = 1,
5349
LinkOnceAnyLinkage = 2,
5450
LinkOnceODRLinkage = 3,
51+
LinkOnceODRAutoHideLinkage = 4,
5552
WeakAnyLinkage = 5,
5653
WeakODRLinkage = 6,
5754
AppendingLinkage = 7,
5855
InternalLinkage = 8,
5956
PrivateLinkage = 9,
57+
DLLImportLinkage = 10,
58+
DLLExportLinkage = 11,
6059
ExternalWeakLinkage = 12,
60+
GhostLinkage = 13,
6161
CommonLinkage = 14,
62+
LinkerPrivateLinkage = 15,
63+
LinkerPrivateWeakLinkage = 16,
6264
}
6365

6466
#[deriving(Clone)]

trunk/src/librustc/middle/dataflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct LoopScope<'a> {
8585

8686
impl<'a, O:DataFlowOperator> pprust::PpAnn for DataFlowContext<'a, O> {
8787
fn pre(&self,
88-
ps: &mut pprust::State,
88+
ps: &mut pprust::State<DataFlowContext<'a, O>>,
8989
node: pprust::AnnNode) -> io::IoResult<()> {
9090
let id = match node {
9191
pprust::NodeExpr(expr) => expr.id,

trunk/src/librustc/middle/trans/foreign.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ pub fn llvm_linkage_by_name(name: &str) -> Option<Linkage> {
121121
"extern_weak" => Some(lib::llvm::ExternalWeakLinkage),
122122
"external" => Some(lib::llvm::ExternalLinkage),
123123
"internal" => Some(lib::llvm::InternalLinkage),
124+
"linker_private" => Some(lib::llvm::LinkerPrivateLinkage),
125+
"linker_private_weak" => Some(lib::llvm::LinkerPrivateWeakLinkage),
124126
"linkonce" => Some(lib::llvm::LinkOnceAnyLinkage),
125127
"linkonce_odr" => Some(lib::llvm::LinkOnceODRLinkage),
126128
"private" => Some(lib::llvm::PrivateLinkage),

trunk/src/librustc/middle/typeck/collect.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ use util::ppaux::Repr;
4848
use std::rc::Rc;
4949
use std::vec_ng::Vec;
5050
use std::vec_ng;
51-
use collections::HashSet;
52-
5351
use syntax::abi::AbiSet;
5452
use syntax::ast::{RegionTyParamBound, TraitTyParamBound};
5553
use syntax::ast;
@@ -480,12 +478,7 @@ fn convert_methods(ccx: &CrateCtxt,
480478
rcvr_visibility: ast::Visibility)
481479
{
482480
let tcx = ccx.tcx;
483-
let mut seen_methods = HashSet::new();
484481
for m in ms.iter() {
485-
if !seen_methods.insert(m.ident.repr(ccx.tcx)) {
486-
tcx.sess.span_err(m.span, "duplicate method in trait impl");
487-
}
488-
489482
let num_rcvr_ty_params = rcvr_ty_generics.type_param_defs().len();
490483
let m_ty_generics = ty_generics_for_fn_or_method(ccx, &m.generics,
491484
num_rcvr_ty_params);

0 commit comments

Comments
 (0)