Skip to content

Commit aa9fe4b

Browse files
committed
---
yaml --- r: 220853 b: refs/heads/master c: a66af87 h: refs/heads/master i: 220851: 20c85fd v: v3
1 parent 07640df commit aa9fe4b

File tree

29 files changed

+100
-980
lines changed

29 files changed

+100
-980
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: 2e5b165e1801c2ddb5d3cc49ff96b9f264a4545c
2+
refs/heads/master: a66af8788d904a2c197803d5289de01274010891
33
refs/heads/snap-stage3: d4432b37378ec55450e06799f5344b4b0f4b94e0
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/doc/trpl/ffi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ libraries:
340340
Note that frameworks are only available on OSX targets.
341341
342342
The different `kind` values are meant to differentiate how the native library
343-
participates in linkage. From a linkage perspective, the Rust compiler creates
343+
participates in linkage. From a linkage perspective, the rust compiler creates
344344
two flavors of artifacts: partial (rlib/staticlib) and final (dylib/binary).
345345
Native dynamic library and framework dependencies are propagated to the final
346346
artifact boundary, while static library dependencies are not propagated at
@@ -350,9 +350,9 @@ artifact.
350350
A few examples of how this model can be used are:
351351
352352
* A native build dependency. Sometimes some C/C++ glue is needed when writing
353-
some Rust code, but distribution of the C/C++ code in a library format is just
353+
some rust code, but distribution of the C/C++ code in a library format is just
354354
a burden. In this case, the code will be archived into `libfoo.a` and then the
355-
Rust crate would declare a dependency via `#[link(name = "foo", kind =
355+
rust crate would declare a dependency via `#[link(name = "foo", kind =
356356
"static")]`.
357357
358358
Regardless of the flavor of output for the crate, the native static library
@@ -361,7 +361,7 @@ A few examples of how this model can be used are:
361361
362362
* A normal dynamic dependency. Common system libraries (like `readline`) are
363363
available on a large number of systems, and often a static copy of these
364-
libraries cannot be found. When this dependency is included in a Rust crate,
364+
libraries cannot be found. When this dependency is included in a rust crate,
365365
partial targets (like rlibs) will not link to the library, but when the rlib
366366
is included in a final target (like a binary), the native library will be
367367
linked in.

trunk/src/doc/trpl/installing-rust.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The first step to using Rust is to install it! There are a number of ways to
44
install Rust, but the easiest is to use the `rustup` script. If you're on Linux
5-
or a Mac, all you need to do is this:
5+
or a Mac, all you need to do is this:
66

77
> Note: you don't need to type in the `$`s, they just indicate the start of
88
> each command. You’ll see many tutorials and examples around the web that
@@ -25,12 +25,6 @@ $ sh rustup.sh
2525
[insecurity]: http://curlpipesh.tumblr.com
2626

2727
If you're on Windows, please download the appropriate [installer][install-page].
28-
**NOTE:** By default, the Windows installer will not add Rust to the %PATH%
29-
system variable. If this is the only version of Rust you are installing and you
30-
want to be able to run it from the command line, click on "Advanced" on the
31-
install dialog and on the "Product Features" page ensure "Add to PATH" is
32-
installed on the local hard drive.
33-
3428

3529
[install-page]: http://www.rust-lang.org/install.html
3630

@@ -93,11 +87,6 @@ rustc 1.0.0 (a59de37e9 2015-05-13)
9387

9488
If you did, Rust has been installed successfully! Congrats!
9589

96-
If you didn't and you're on Windows, check that Rust is in your %PATH% system
97-
variable. If it isn't, run the installer again, select "Change" on the "Change,
98-
repair, or remove installation" page and ensure "Add to PATH" is installed on
99-
the local hard drive.
100-
10190
This installer also installs a copy of the documentation locally, so you can
10291
read it offline. On UNIX systems, `/usr/local/share/doc/rust` is the location.
10392
On Windows, it's in a `share/doc` directory, inside wherever you installed Rust
@@ -112,5 +101,5 @@ resources include [the user’s forum][users], and
112101

113102
[irc]: irc://irc.mozilla.org/#rust
114103
[mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
115-
[users]: http://users.rust-lang.org/
104+
[users]: http://users.rust-lang.org/
116105
[stackoverflow]: http://stackoverflow.com/questions/tagged/rust

trunk/src/doc/trpl/release-channels.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,3 @@ This will help alert the team in case there’s an accidental regression.
4343
Additionally, testing against nightly can catch regressions even sooner, and so
4444
if you don’t mind a third build, we’d appreciate testing against all channels.
4545

46-
As an example, many Rust programmers use [Travis](https://travis-ci.org/) to
47-
test their crates, which is free for open source projects. Travis [supports
48-
Rust directly][travis], and you can use a `.travis.yml` file like this to
49-
test on all channels:
50-
51-
```yaml
52-
language: rust
53-
rust:
54-
- nightly
55-
- beta
56-
- stable
57-
58-
matrix:
59-
allow_failures:
60-
- rust: nightly
61-
```
62-
63-
[travis]: http://docs.travis-ci.com/user/languages/rust/
64-
65-
With this configuration, Travis will test all three channels, but if something
66-
breaks on nightly, it won’t fail your build. A similar configuration is
67-
recommended for any CI system, check the documentation of the one you’re
68-
using for more details.

trunk/src/doc/trpl/unsafe.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,10 @@ that you normally can not do. Just three. Here they are:
100100

101101
That’s it. It’s important that `unsafe` does not, for example, ‘turn off the
102102
borrow checker’. Adding `unsafe` to some random Rust code doesn’t change its
103-
semantics, it won’t just start accepting anything. But it will let you write
104-
things that _do_ break some of the rules.
103+
semantics, it won’t just start accepting anything.
105104

106-
You will also encounter the `unsafe` keyword when writing bindings to foreign
107-
(non-Rust) interfaces. You're encouraged to write a safe, native Rust interface
108-
around the methods provided by the library.
109-
110-
Let’s go over the basic three abilities listed, in order.
105+
But it will let you write things that _do_ break some of the rules. Let’s go
106+
over these three abilities in order.
111107

112108
## Access or update a `static mut`
113109

trunk/src/libcore/iter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2555,7 +2555,7 @@ impl<I: RandomAccessIterator, F> RandomAccessIterator for Inspect<I, F>
25552555
#[unstable(feature = "iter_unfold")]
25562556
#[derive(Clone)]
25572557
#[deprecated(since = "1.2.0",
2558-
reason = "has not gained enough traction to retain its position \
2558+
reason = "has gained enough traction to retain its position \
25592559
in the standard library")]
25602560
#[allow(deprecated)]
25612561
pub struct Unfold<St, F> {
@@ -2567,7 +2567,7 @@ pub struct Unfold<St, F> {
25672567

25682568
#[unstable(feature = "iter_unfold")]
25692569
#[deprecated(since = "1.2.0",
2570-
reason = "has not gained enough traction to retain its position \
2570+
reason = "has gained enough traction to retain its position \
25712571
in the standard library")]
25722572
#[allow(deprecated)]
25732573
impl<A, St, F> Unfold<St, F> where F: FnMut(&mut St) -> Option<A> {
@@ -3018,7 +3018,7 @@ type IterateState<T, F> = (F, Option<T>, bool);
30183018
/// from a given seed value.
30193019
#[unstable(feature = "iter_iterate")]
30203020
#[deprecated(since = "1.2.0",
3021-
reason = "has not gained enough traction to retain its position \
3021+
reason = "has gained enough traction to retain its position \
30223022
in the standard library")]
30233023
#[allow(deprecated)]
30243024
pub type Iterate<T, F> = Unfold<IterateState<T, F>, fn(&mut IterateState<T, F>) -> Option<T>>;
@@ -3027,7 +3027,7 @@ pub type Iterate<T, F> = Unfold<IterateState<T, F>, fn(&mut IterateState<T, F>)
30273027
/// repeated applications of the given function `f`.
30283028
#[unstable(feature = "iter_iterate")]
30293029
#[deprecated(since = "1.2.0",
3030-
reason = "has not gained enough traction to retain its position \
3030+
reason = "has gained enough traction to retain its position \
30313031
in the standard library")]
30323032
#[allow(deprecated)]
30333033
pub fn iterate<T, F>(seed: T, f: F) -> Iterate<T, F> where

trunk/src/libcore/str/mod.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,12 +871,12 @@ impl<'a> DoubleEndedIterator for LinesAny<'a> {
871871
Section: Comparing strings
872872
*/
873873

874-
/// Bytewise slice equality
874+
// share the implementation of the lang-item vs. non-lang-item
875+
// eq_slice.
875876
/// NOTE: This function is (ab)used in rustc::middle::trans::_match
876877
/// to compare &[u8] byte slices that are not necessarily valid UTF-8.
877-
#[lang = "str_eq"]
878878
#[inline]
879-
fn eq_slice(a: &str, b: &str) -> bool {
879+
fn eq_slice_(a: &str, b: &str) -> bool {
880880
// NOTE: In theory n should be libc::size_t and not usize, but libc is not available here
881881
#[allow(improper_ctypes)]
882882
extern { fn memcmp(s1: *const i8, s2: *const i8, n: usize) -> i32; }
@@ -887,6 +887,15 @@ fn eq_slice(a: &str, b: &str) -> bool {
887887
}
888888
}
889889

890+
/// Bytewise slice equality
891+
/// NOTE: This function is (ab)used in rustc::middle::trans::_match
892+
/// to compare &[u8] byte slices that are not necessarily valid UTF-8.
893+
#[lang = "str_eq"]
894+
#[inline]
895+
fn eq_slice(a: &str, b: &str) -> bool {
896+
eq_slice_(a, b)
897+
}
898+
890899
/*
891900
Section: Misc
892901
*/

trunk/src/librustc/middle/intrinsicck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl<'a, 'tcx> IntrinsicCheckingVisitor<'a, 'tcx> {
165165
if from_tc.interior_param() || to_tc.interior_param() {
166166
span_err!(self.tcx.sess, span, E0139,
167167
"cannot transmute to or from a type that contains \
168-
unsubstituted type parameters");
168+
type parameters in its interior");
169169
return;
170170
}
171171

trunk/src/librustc/middle/resolve_lifetime.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub fn krate(sess: &Session, krate: &ast::Crate, def_map: &DefMap) -> NamedRegio
109109

110110
impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
111111
fn visit_item(&mut self, item: &ast::Item) {
112-
// Items save/restore the set of labels. This way inner items
112+
// Items save/restore the set of labels. This way innner items
113113
// can freely reuse names, be they loop labels or lifetimes.
114114
let saved = replace(&mut self.labels_in_fn, vec![]);
115115

@@ -151,29 +151,6 @@ impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
151151
replace(&mut self.labels_in_fn, saved);
152152
}
153153

154-
fn visit_foreign_item(&mut self, item: &ast::ForeignItem) {
155-
// Items save/restore the set of labels. This way inner items
156-
// can freely reuse names, be they loop labels or lifetimes.
157-
let saved = replace(&mut self.labels_in_fn, vec![]);
158-
159-
// Items always introduce a new root scope
160-
self.with(RootScope, |_, this| {
161-
match item.node {
162-
ast::ForeignItemFn(_, ref generics) => {
163-
this.visit_early_late(subst::FnSpace, generics, |this| {
164-
visit::walk_foreign_item(this, item);
165-
})
166-
}
167-
ast::ForeignItemStatic(..) => {
168-
visit::walk_foreign_item(this, item);
169-
}
170-
}
171-
});
172-
173-
// Done traversing the item; restore saved set of labels.
174-
replace(&mut self.labels_in_fn, saved);
175-
}
176-
177154
fn visit_fn(&mut self, fk: visit::FnKind<'v>, fd: &'v ast::FnDecl,
178155
b: &'v ast::Block, s: Span, _: ast::NodeId) {
179156
match fk {

0 commit comments

Comments
 (0)