Skip to content

Commit 82061f5

Browse files
committed
---
yaml --- r: 231882 b: refs/heads/auto c: 04fff50 h: refs/heads/master v: v3
1 parent df9ed6b commit 82061f5

File tree

25 files changed

+318
-170
lines changed

25 files changed

+318
-170
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 5d9dc1d7a1d2ee601673bf17003852255c577144
11+
refs/heads/auto: 04fff50d512b7f2f5a9133fbebd814b80d483044
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/COPYRIGHT

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,104 @@ The Rust Project includes packages written by third parties.
2222
The following third party packages are included, and carry
2323
their own copyright notices and license terms:
2424

25+
* Two header files that are part of the Valgrind
26+
package. These files are found at src/rt/valgrind/valgrind.h and
27+
src/rt/valgrind/memcheck.h, within this distribution. These files
28+
are redistributed under the following terms, as noted in
29+
them:
30+
31+
for src/rt/valgrind/valgrind.h:
32+
33+
This file is part of Valgrind, a dynamic binary
34+
instrumentation framework.
35+
36+
Copyright (C) 2000-2010 Julian Seward. All rights
37+
reserved.
38+
39+
Redistribution and use in source and binary forms, with
40+
or without modification, are permitted provided that the
41+
following conditions are met:
42+
43+
1. Redistributions of source code must retain the above
44+
copyright notice, this list of conditions and the
45+
following disclaimer.
46+
47+
2. The origin of this software must not be
48+
misrepresented; you must not claim that you wrote the
49+
original software. If you use this software in a
50+
product, an acknowledgment in the product
51+
documentation would be appreciated but is not
52+
required.
53+
54+
3. Altered source versions must be plainly marked as
55+
such, and must not be misrepresented as being the
56+
original software.
57+
58+
4. The name of the author may not be used to endorse or
59+
promote products derived from this software without
60+
specific prior written permission.
61+
62+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
63+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
64+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
65+
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
66+
NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
67+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
68+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
69+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
70+
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
71+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
72+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
73+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
74+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
75+
OF SUCH DAMAGE.
76+
77+
for src/rt/valgrind/memcheck.h:
78+
79+
This file is part of MemCheck, a heavyweight Valgrind
80+
tool for detecting memory errors.
81+
82+
Copyright (C) 2000-2010 Julian Seward. All rights
83+
reserved.
84+
85+
Redistribution and use in source and binary forms, with
86+
or without modification, are permitted provided that the
87+
following conditions are met:
88+
89+
1. Redistributions of source code must retain the above
90+
copyright notice, this list of conditions and the
91+
following disclaimer.
92+
93+
2. The origin of this software must not be
94+
misrepresented; you must not claim that you wrote the
95+
original software. If you use this software in a
96+
product, an acknowledgment in the product
97+
documentation would be appreciated but is not
98+
required.
99+
100+
3. Altered source versions must be plainly marked as
101+
such, and must not be misrepresented as being the
102+
original software.
103+
104+
4. The name of the author may not be used to endorse or
105+
promote products derived from this software without
106+
specific prior written permission.
107+
108+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
109+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
110+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
111+
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
112+
NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
113+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
114+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
115+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
116+
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
117+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
118+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
119+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
120+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
121+
OF SUCH DAMAGE.
122+
25123
* The src/rt/miniz.c file, carrying an implementation of
26124
RFC1950/RFC1951 DEFLATE, by Rich Geldreich
27125
<[email protected]>. All uses of this file are

branches/auto/src/doc/trpl/macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ fn main() {
313313
}
314314
```
315315

316-
This works because Rust has a [hygienic macro system]. Each macro expansion
316+
This works because Rust has a [hygienic macro system][https://en.wikipedia.org/wiki/Hygienic_macro]. Each macro expansion
317317
happens in a distinct ‘syntax context’, and each variable is tagged with the
318318
syntax context where it was introduced. It’s as though the variable `state`
319319
inside `main` is painted a different "color" from the variable `state` inside

branches/auto/src/doc/trpl/mutability.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn foo(mut x: i32) {
6262
# Interior vs. Exterior Mutability
6363

6464
However, when we say something is ‘immutable’ in Rust, that doesn’t mean that
65-
it’s not able to be changed: we mean something has ‘exterior mutability’. Consider,
65+
it’s not able to be changed: We mean something has ‘exterior mutability’. Consider,
6666
for example, [`Arc<T>`][arc]:
6767

6868
```rust
@@ -85,8 +85,8 @@ philosophy, memory safety, and the mechanism by which Rust guarantees it, the
8585
> You may have one or the other of these two kinds of borrows, but not both at
8686
> the same time:
8787
>
88-
> * one or more references (`&T`) to a resource,
89-
> * exactly one mutable reference (`&mut T`).
88+
> * one or more references (`&T`) to a resource.
89+
> * exactly one mutable reference (`&mut T`)
9090
9191
[ownership]: ownership.html
9292
[borrowing]: references-and-borrowing.html#borrowing

branches/auto/src/doc/trpl/patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ match x {
251251
}
252252
```
253253

254-
This prints `Some("Steve")`: we’ve bound the inner `name` to `a`.
254+
This prints `Some("Steve")`: We’ve bound the inner `name` to `a`.
255255

256256
If you use `@` with `|`, you need to make sure the name is bound in each part
257257
of the pattern:

branches/auto/src/doc/trpl/references-and-borrowing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ First, any borrow must last for a scope no greater than that of the owner.
159159
Second, you may have one or the other of these two kinds of borrows, but not
160160
both at the same time:
161161

162-
* one or more references (`&T`) to a resource,
163-
* exactly one mutable reference (`&mut T`).
162+
* one or more references (`&T`) to a resource.
163+
* exactly one mutable reference (`&mut T`)
164164

165165

166166
You may notice that this is very similar, though not exactly the same as,
@@ -298,8 +298,8 @@ We can’t modify `v` because it’s borrowed by the loop.
298298

299299
### use after free
300300

301-
References must not live longer than the resource they refer to. Rust will
302-
check the scopes of your references to ensure that this is true.
301+
References must live as long as the resource they refer to. Rust will check the
302+
scopes of your references to ensure that this is true.
303303

304304
If Rust didn’t check this property, we could accidentally use a reference
305305
which was invalid. For example:

branches/auto/src/librustc/middle/infer/error_reporting.rs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ use rustc_front::hir;
7878
use rustc_front::print::pprust;
7979

8080
use middle::def;
81-
use middle::def_id::DefId;
8281
use middle::infer;
8382
use middle::region;
8483
use middle::subst;
@@ -227,8 +226,6 @@ pub trait ErrorReporting<'tcx> {
227226

228227
fn report_type_error(&self, trace: TypeTrace<'tcx>, terr: &ty::TypeError<'tcx>);
229228

230-
fn check_and_note_conflicting_crates(&self, terr: &ty::TypeError<'tcx>, sp: Span);
231-
232229
fn report_and_explain_type_error(&self,
233230
trace: TypeTrace<'tcx>,
234231
terr: &ty::TypeError<'tcx>);
@@ -487,60 +484,13 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
487484
expected_found_str,
488485
terr);
489486

490-
self.check_and_note_conflicting_crates(terr, trace.origin.span());
491-
492487
match trace.origin {
493488
infer::MatchExpressionArm(_, arm_span) =>
494489
self.tcx.sess.span_note(arm_span, "match arm with an incompatible type"),
495490
_ => ()
496491
}
497492
}
498493

499-
/// Adds a note if the types come from similarly named crates
500-
fn check_and_note_conflicting_crates(&self, terr: &ty::TypeError<'tcx>, sp: Span) {
501-
let report_path_match = |did1: DefId, did2: DefId| {
502-
// Only external crates, if either is from a local
503-
// module we could have false positives
504-
if !(did1.is_local() || did2.is_local()) && did1.krate != did2.krate {
505-
let exp_path = self.tcx.with_path(did1,
506-
|p| p.map(|x| x.to_string())
507-
.collect::<Vec<_>>());
508-
let found_path = self.tcx.with_path(did2,
509-
|p| p.map(|x| x.to_string())
510-
.collect::<Vec<_>>());
511-
// We compare strings because PathMod and PathName can be different
512-
// for imported and non-imported crates
513-
if exp_path == found_path {
514-
let crate_name = self.tcx.sess.cstore
515-
.get_crate_data(did1.krate).name();
516-
self.tcx.sess.span_note(sp, &format!("Perhaps two different versions \
517-
of crate `{}` are being used?",
518-
crate_name));
519-
}
520-
}
521-
};
522-
match *terr {
523-
ty::TypeError::Sorts(ref exp_found) => {
524-
// if they are both "path types", there's a chance of ambiguity
525-
// due to different versions of the same crate
526-
match (&exp_found.expected.sty, &exp_found.found.sty) {
527-
(&ty::TyEnum(ref exp_adt, _), &ty::TyEnum(ref found_adt, _)) |
528-
(&ty::TyStruct(ref exp_adt, _), &ty::TyStruct(ref found_adt, _)) |
529-
(&ty::TyEnum(ref exp_adt, _), &ty::TyStruct(ref found_adt, _)) |
530-
(&ty::TyStruct(ref exp_adt, _), &ty::TyEnum(ref found_adt, _)) => {
531-
report_path_match(exp_adt.did, found_adt.did);
532-
},
533-
_ => ()
534-
}
535-
},
536-
ty::TypeError::Traits(ref exp_found) => {
537-
self.tcx.sess.note("errrr0");
538-
report_path_match(exp_found.expected, exp_found.found);
539-
},
540-
_ => () // FIXME(#22750) handle traits and stuff
541-
}
542-
}
543-
544494
fn report_and_explain_type_error(&self,
545495
trace: TypeTrace<'tcx>,
546496
terr: &ty::TypeError<'tcx>) {

branches/auto/src/librustc/middle/ty.rs

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5311,16 +5311,6 @@ impl<'tcx> TyS<'tcx> {
53115311
impl<'tcx> fmt::Display for TypeError<'tcx> {
53125312
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
53135313
use self::TypeError::*;
5314-
fn report_maybe_different(f: &mut fmt::Formatter,
5315-
expected: String, found: String) -> fmt::Result {
5316-
// A naive approach to making sure that we're not reporting silly errors such as:
5317-
// (expected closure, found closure).
5318-
if expected == found {
5319-
write!(f, "expected {}, found a different {}", expected, found)
5320-
} else {
5321-
write!(f, "expected {}, found {}", expected, found)
5322-
}
5323-
}
53245314

53255315
match *self {
53265316
CyclicTy => write!(f, "cyclic type of infinite size"),
@@ -5381,15 +5371,20 @@ impl<'tcx> fmt::Display for TypeError<'tcx> {
53815371
found bound lifetime parameter {}", br)
53825372
}
53835373
Sorts(values) => tls::with(|tcx| {
5384-
report_maybe_different(f, values.expected.sort_string(tcx),
5385-
values.found.sort_string(tcx))
5374+
// A naive approach to making sure that we're not reporting silly errors such as:
5375+
// (expected closure, found closure).
5376+
let expected_str = values.expected.sort_string(tcx);
5377+
let found_str = values.found.sort_string(tcx);
5378+
if expected_str == found_str {
5379+
write!(f, "expected {}, found a different {}", expected_str, found_str)
5380+
} else {
5381+
write!(f, "expected {}, found {}", expected_str, found_str)
5382+
}
53865383
}),
53875384
Traits(values) => tls::with(|tcx| {
5388-
report_maybe_different(f,
5389-
format!("trait `{}`",
5390-
tcx.item_path_str(values.expected)),
5391-
format!("trait `{}`",
5392-
tcx.item_path_str(values.found)))
5385+
write!(f, "expected trait `{}`, found trait `{}`",
5386+
tcx.item_path_str(values.expected),
5387+
tcx.item_path_str(values.found))
53935388
}),
53945389
BuiltinBoundsMismatch(values) => {
53955390
if values.expected.is_empty() {

branches/auto/src/librustc_back/target/dragonfly_base.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ pub fn opts() -> TargetOptions {
1919
linker_is_gnu: true,
2020
has_rpath: true,
2121
pre_link_args: vec!(
22+
"-L/usr/local/lib".to_string(),
23+
"-L/usr/lib/gcc47".to_string(),
2224
// GNU-style linkers will use this to omit linking to libraries
2325
// which don't actually fulfill any relocations, but only for
2426
// libraries which follow this flag. Thus, use it before

branches/auto/src/librustc_trans/trans/context.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,6 @@ fn declare_intrinsic(ccx: &CrateContext, key: &str) -> Option<ValueRef> {
798798
if key == $name {
799799
let f = declare::declare_cfn(ccx, $name, Type::func(&[], &$ret),
800800
ccx.tcx().mk_nil());
801-
llvm::SetUnnamedAddr(f, false);
802801
ccx.intrinsics().borrow_mut().insert($name, f.clone());
803802
return Some(f);
804803
}
@@ -807,7 +806,6 @@ fn declare_intrinsic(ccx: &CrateContext, key: &str) -> Option<ValueRef> {
807806
if key == $name {
808807
let f = declare::declare_cfn(ccx, $name, Type::func(&[$($arg),*], &$ret),
809808
ccx.tcx().mk_nil());
810-
llvm::SetUnnamedAddr(f, false);
811809
ccx.intrinsics().borrow_mut().insert($name, f.clone());
812810
return Some(f);
813811
}

branches/auto/src/librustdoc/html/layout.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ r##"<!DOCTYPE html>
6262
6363
{before_content}
6464
65-
<nav class="sidebar">
65+
<section class="sidebar">
6666
{logo}
6767
{sidebar}
68-
</nav>
68+
</section>
6969
7070
<nav class="sub">
7171
<form class="search-form js-only">
@@ -83,12 +83,10 @@ r##"<!DOCTYPE html>
8383
8484
<section class="footer"></section>
8585
86-
<aside id="help" class="hidden">
86+
<div id="help" class="hidden">
8787
<div>
88-
<h1 class="hidden">Help</h1>
89-
9088
<div class="shortcuts">
91-
<h2>Keyboard Shortcuts</h2>
89+
<h1>Keyboard Shortcuts</h1>
9290
9391
<dl>
9492
<dt>?</dt>
@@ -105,7 +103,7 @@ r##"<!DOCTYPE html>
105103
</div>
106104
107105
<div class="infos">
108-
<h2>Search Tricks</h2>
106+
<h1>Search Tricks</h1>
109107
110108
<p>
111109
Prefix searches with a type followed by a colon (e.g.
@@ -125,7 +123,7 @@ r##"<!DOCTYPE html>
125123
</p>
126124
</div>
127125
</div>
128-
</aside>
126+
</div>
129127
130128
{after_content}
131129

0 commit comments

Comments
 (0)