Skip to content

Commit f4a456e

Browse files
committed
---
yaml --- r: 234462 b: refs/heads/tmp c: a1758ae h: refs/heads/master v: v3
1 parent 955a211 commit f4a456e

File tree

15 files changed

+138
-178
lines changed

15 files changed

+138
-178
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: d2e13e822a73e0ea46ae9e21afdd3155fc997f6d
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 3a4fb823e26c512d14d97bd86e2ac7b1e7d3d0fa
28+
refs/heads/tmp: a1758aea18e9008e5b47a99706cab21ca12f1b0a
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: ab792abf1fcc28afbd315426213f6428da25c085
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/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/tmp/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/tmp/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/tmp/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/tmp/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/tmp/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/tmp/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/tmp/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

branches/tmp/src/librustdoc/html/static/main.css

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ h3.impl, h3.method, h4.method, h3.type, h4.type {
104104
h3.impl, h3.method, h3.type {
105105
margin-top: 15px;
106106
}
107-
h1, h2, h3, h4, .sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
107+
h1, h2, h3, h4, section.sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
108108
font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
109109
}
110110

@@ -189,16 +189,11 @@ nav.sub {
189189
padding: 0 10px;
190190
margin-bottom: 14px;
191191
}
192-
.block h2, .block h3 {
192+
.block h2 {
193193
margin-top: 0;
194194
margin-bottom: 8px;
195195
text-align: center;
196196
}
197-
.block ul, .block li {
198-
margin: 0;
199-
padding: 0;
200-
list-style: none;
201-
}
202197

203198
.block a {
204199
display: block;
@@ -386,7 +381,7 @@ nav.main .separator {
386381
nav.sum { text-align: right; }
387382
nav.sub form { display: inline; }
388383

389-
nav.sub, .content {
384+
nav, .content {
390385
margin-left: 230px;
391386
}
392387

@@ -412,7 +407,6 @@ a {
412407
.content span.method, .content a.method, .block a.current.method { color: #8c6067; }
413408
.content span.tymethod, .content a.tymethod, .block a.current.tymethod { color: #8c6067; }
414409
.content .fnname { color: #8c6067; }
415-
.block a.current.crate { font-weight: 500; }
416410

417411
.search-input {
418412
width: 100%;
@@ -495,7 +489,7 @@ body.blur > :not(#help) {
495489
}
496490
#help dd { margin: 5px 33px; }
497491
#help .infos { padding-left: 0; }
498-
#help h1, #help h2 { margin-top: 0; }
492+
#help h1 { margin-top: 0; }
499493
#help > div div {
500494
width: 50%;
501495
float: left;

0 commit comments

Comments
 (0)