Skip to content

Commit 191c3a9

Browse files
committed
---
yaml --- r: 227479 b: refs/heads/auto c: 8a7b0fa h: refs/heads/master i: 227477: 8069ec1 227475: a798630 227471: 364c2e1 v: v3
1 parent 9535825 commit 191c3a9

File tree

129 files changed

+1893
-4091
lines changed

Some content is hidden

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

129 files changed

+1893
-4091
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: e47eb7c2c850c49d5358d64cb3de6e82ff5fc99a
11+
refs/heads/auto: 8a7b0fad531f2cbb40aace2bdfb5f03060a61d33
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -82,28 +82,6 @@ Read ["Installing Rust"] from [The Book].
8282
$ make && make install
8383
```
8484

85-
## Building Documentation
86-
87-
If you’d like to build the documentation, it’s almost the same:
88-
89-
```sh
90-
./configure
91-
$ make docs
92-
```
93-
94-
Building the documentation requires building the compiler, so the above
95-
details will apply. Once you have the compiler built, you can
96-
97-
```sh
98-
$ make docs NO_REBUILD=1
99-
```
100-
101-
To make sure you don’t re-build the compiler because you made a change
102-
to some documentation.
103-
104-
The generated documentation will appear in a top-level `doc` directory,
105-
created by the `make` rule.
106-
10785
## Notes
10886

10987
Since the Rust compiler is written in Rust, it must be built by a

branches/auto/man/rustc.1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ look for anything here (the default)
4141
.RE
4242
.TP
4343
\fB\-l\fR [\fIKIND\fR=]\fINAME\fR
44-
Link the generated crate(s) to the specified library \fINAME\fR.
44+
Link the generated crate(s) to the specified native library \fINAME\fR.
4545
The optional \fIKIND\fR can be one of \fIstatic\fR, \fIdylib\fR, or
4646
\fIframework\fR.
4747
If omitted, \fIdylib\fR is assumed.
@@ -113,8 +113,7 @@ Print version info and exit.
113113
Use verbose output.
114114
.TP
115115
\fB\-\-extern\fR \fINAME\fR=\fIPATH\fR
116-
Specify where an external rust library is located. These should match
117-
\fIextern\fR declarations in the crate's source code.
116+
Specify where an external rust library is located.
118117
.TP
119118
\fB\-\-sysroot\fR \fIPATH\fR
120119
Override the system root.

branches/auto/mk/crates.mk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ TARGET_CRATES := libc std flate arena term \
5656
alloc_system
5757
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
59-
rustc_data_structures rustc_platform_intrinsics
59+
rustc_data_structures
6060
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
6161
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
6262

@@ -74,16 +74,15 @@ DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_bo
7474
rustc_trans rustc_privacy rustc_lint
7575

7676
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
77-
log syntax serialize rustc_llvm rustc_platform_intrinsics
78-
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics
77+
log syntax serialize rustc_llvm
78+
DEPS_rustc_typeck := rustc syntax
7979
DEPS_rustc_borrowck := rustc log graphviz syntax
8080
DEPS_rustc_resolve := rustc log syntax
8181
DEPS_rustc_privacy := rustc log syntax
8282
DEPS_rustc_lint := rustc log syntax
8383
DEPS_rustc := syntax flate arena serialize getopts rbml \
8484
log graphviz rustc_llvm rustc_back rustc_data_structures
8585
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
86-
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
8786
DEPS_rustc_back := std syntax rustc_llvm flate log libc
8887
DEPS_rustc_data_structures := std log serialize
8988
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \

branches/auto/src/doc/reference.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,11 +2059,6 @@ The following configurations must be defined by the implementation:
20592059
`"mips"`, `"powerpc"`, `"arm"`, or `"aarch64"`.
20602060
* `target_endian = "..."`. Endianness of the target CPU, either `"little"` or
20612061
`"big"`.
2062-
* `target_env = ".."` - an option provided by the compiler by default
2063-
describing the runtime environment of the target platform. Some examples of
2064-
this are `musl` for builds targeting the MUSL libc implementation, `msvc` for
2065-
Windows builds targeting MSVC, and `gnu` frequently the rest of the time. This
2066-
option may also be blank on some platforms.
20672062
* `target_family = "..."`. Operating system family of the target, e. g.
20682063
`"unix"` or `"windows"`. The value of this configuration option is defined
20692064
as a configuration itself, like `unix` or `windows`.

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

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -214,61 +214,11 @@ fn diverges() -> ! {
214214

215215
`panic!` is a macro, similar to `println!()` that we’ve already seen. Unlike
216216
`println!()`, `panic!()` causes the current thread of execution to crash with
217-
the given message. Because this function will cause a crash, it will never
218-
return, and so it has the type ‘`!`’, which is read ‘diverges’.
217+
the given message.
219218

220-
If you add a main function that calls `diverges()` and run it, you’ll get
221-
some output that looks like this:
222-
223-
```text
224-
thread ‘<main>’ panicked at ‘This function never returns!’, hello.rs:2
225-
```
226-
227-
If you want more information, you can get a backtrace by setting the
228-
`RUST_BACKTRACE` environment variable:
229-
230-
```text
231-
$ RUST_BACKTRACE=1 ./diverges
232-
thread '<main>' panicked at 'This function never returns!', hello.rs:2
233-
stack backtrace:
234-
1: 0x7f402773a829 - sys::backtrace::write::h0942de78b6c02817K8r
235-
2: 0x7f402773d7fc - panicking::on_panic::h3f23f9d0b5f4c91bu9w
236-
3: 0x7f402773960e - rt::unwind::begin_unwind_inner::h2844b8c5e81e79558Bw
237-
4: 0x7f4027738893 - rt::unwind::begin_unwind::h4375279447423903650
238-
5: 0x7f4027738809 - diverges::h2266b4c4b850236beaa
239-
6: 0x7f40277389e5 - main::h19bb1149c2f00ecfBaa
240-
7: 0x7f402773f514 - rt::unwind::try::try_fn::h13186883479104382231
241-
8: 0x7f402773d1d8 - __rust_try
242-
9: 0x7f402773f201 - rt::lang_start::ha172a3ce74bb453aK5w
243-
10: 0x7f4027738a19 - main
244-
11: 0x7f402694ab44 - __libc_start_main
245-
12: 0x7f40277386c8 - <unknown>
246-
13: 0x0 - <unknown>
247-
```
248-
249-
`RUST_BACKTRACE` also works with Cargo’s `run` command:
250-
251-
```text
252-
$ RUST_BACKTRACE=1 cargo run
253-
Running `target/debug/diverges`
254-
thread '<main>' panicked at 'This function never returns!', hello.rs:2
255-
stack backtrace:
256-
1: 0x7f402773a829 - sys::backtrace::write::h0942de78b6c02817K8r
257-
2: 0x7f402773d7fc - panicking::on_panic::h3f23f9d0b5f4c91bu9w
258-
3: 0x7f402773960e - rt::unwind::begin_unwind_inner::h2844b8c5e81e79558Bw
259-
4: 0x7f4027738893 - rt::unwind::begin_unwind::h4375279447423903650
260-
5: 0x7f4027738809 - diverges::h2266b4c4b850236beaa
261-
6: 0x7f40277389e5 - main::h19bb1149c2f00ecfBaa
262-
7: 0x7f402773f514 - rt::unwind::try::try_fn::h13186883479104382231
263-
8: 0x7f402773d1d8 - __rust_try
264-
9: 0x7f402773f201 - rt::lang_start::ha172a3ce74bb453aK5w
265-
10: 0x7f4027738a19 - main
266-
11: 0x7f402694ab44 - __libc_start_main
267-
12: 0x7f40277386c8 - <unknown>
268-
13: 0x0 - <unknown>
269-
```
270-
271-
A diverging function can be used as any type:
219+
Because this function will cause a crash, it will never return, and so it has
220+
the type ‘`!`’, which is read ‘diverges’. A diverging function can be used
221+
as any type:
272222

273223
```should_panic
274224
# fn diverges() -> ! {

branches/auto/src/doc/trpl/trait-objects.md

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -300,41 +300,3 @@ let y = TraitObject {
300300
// y.method();
301301
(y.vtable.method)(y.data);
302302
```
303-
304-
## Object Safety
305-
306-
Not every trait can be used to make a trait object. For example, vectors implement
307-
`Clone`, but if we try to make a trait object:
308-
309-
```ignore
310-
let v = vec![1, 2, 3];
311-
let o = &v as &Clone;
312-
```
313-
314-
We get an error:
315-
316-
```text
317-
error: cannot convert to a trait object because trait `core::clone::Clone` is not object-safe [E0038]
318-
let o = &v as &Clone;
319-
^~
320-
note: the trait cannot require that `Self : Sized`
321-
let o = &v as &Clone;
322-
^~
323-
```
324-
325-
The error says that `Clone` is not ‘object-safe’. Only traits that are
326-
object-safe can be made into trait objects. A trait is object-safe if both of
327-
these are true:
328-
329-
* the trait does not require that `Self: Sized`
330-
* all of its methods are object-safe
331-
332-
So what makes a method object-safe? Each method must require that `Self: Sized`
333-
or all of the following:
334-
335-
* must not have any type parameters
336-
* must not use `Self`
337-
338-
Whew! As we can see, almost all of these rules talk about `Self`. A good intuition
339-
is “except in special circumstances, if your trait’s method uses `Self`, it is not
340-
object-safe.”

branches/auto/src/libcollections/binary_heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
//! // 7
113113
//! // +-----------------+
114114
//! // | |
115-
//! // v 1 2 | 2
115+
//! // v 1 2 |
116116
//! // 0 -----> 1 -----> 3 ---> 4
117117
//! // | ^ ^ ^
118118
//! // | | 1 | |

branches/auto/src/libcollections/btree/node.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -387,29 +387,8 @@ impl<K, V> Node<K, V> {
387387

388388
#[inline]
389389
pub fn as_slices_internal_mut<'b>(&'b mut self) -> MutNodeSlice<'b, K, V> {
390-
let len = self.len();
391-
let is_leaf = self.is_leaf();
392-
let keys = unsafe { slice::from_raw_parts_mut(*self.keys, len) };
393-
let vals = unsafe { slice::from_raw_parts_mut(*self.vals, len) };
394-
let edges: &mut [_] = if is_leaf {
395-
&mut []
396-
} else {
397-
unsafe {
398-
let data = match self.edges {
399-
None => heap::EMPTY as *mut Node<K,V>,
400-
Some(ref mut p) => **p as *mut Node<K,V>,
401-
};
402-
slice::from_raw_parts_mut(data, len + 1)
403-
}
404-
};
405-
MutNodeSlice {
406-
keys: keys,
407-
vals: vals,
408-
edges: edges,
409-
head_is_edge: true,
410-
tail_is_edge: true,
411-
has_edges: !is_leaf,
412-
}
390+
// FIXME(#27620): Bad: This relies on structure layout!
391+
unsafe { mem::transmute(self.as_slices_internal()) }
413392
}
414393

415394
#[inline]

branches/auto/src/libcollectionstest/str.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,6 @@ fn test_find_str() {
8585
assert_eq!(data[43..86].find("ย中"), Some(67 - 43));
8686
assert_eq!(data[43..86].find("iệt"), Some(77 - 43));
8787
assert_eq!(data[43..86].find("Nam"), Some(83 - 43));
88-
89-
// find every substring -- assert that it finds it, or an earlier occurence.
90-
let string = "Việt Namacbaabcaabaaba";
91-
for (i, ci) in string.char_indices() {
92-
let ip = i + ci.len_utf8();
93-
for j in string[ip..].char_indices()
94-
.map(|(i, _)| i)
95-
.chain(Some(string.len() - ip))
96-
{
97-
let pat = &string[i..ip + j];
98-
assert!(match string.find(pat) {
99-
None => false,
100-
Some(x) => x <= i,
101-
});
102-
assert!(match string.rfind(pat) {
103-
None => false,
104-
Some(x) => x >= i,
105-
});
106-
}
107-
}
10888
}
10989

11090
fn s(x: &str) -> String { x.to_string() }

branches/auto/src/libcore/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@
7878
#![feature(optin_builtin_traits)]
7979
#![feature(reflect)]
8080
#![feature(rustc_attrs)]
81-
#![cfg_attr(stage0, feature(simd))]
82-
#![cfg_attr(not(stage0), feature(repr_simd, platform_intrinsics))]
81+
#![feature(simd)]
8382
#![feature(staged_api)]
8483
#![feature(unboxed_closures)]
8584

@@ -151,13 +150,7 @@ pub mod iter;
151150
pub mod option;
152151
pub mod raw;
153152
pub mod result;
154-
155-
#[cfg(stage0)]
156-
#[path = "simd_old.rs"]
157-
pub mod simd;
158-
#[cfg(not(stage0))]
159153
pub mod simd;
160-
161154
pub mod slice;
162155
pub mod str;
163156
pub mod hash;

branches/auto/src/libcore/marker.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
//! Rust types can be classified in various useful ways according to
1414
//! intrinsic properties of the type. These classifications, often called
1515
//! 'kinds', are represented as traits.
16+
//!
17+
//! They cannot be implemented by user code, but are instead implemented
18+
//! by the compiler automatically for the types to which they apply.
19+
//!
20+
//! Marker types are special types that are used with unsafe code to
21+
//! inform the compiler of special constraints. Marker types should
22+
//! only be needed when you are creating an abstraction that is
23+
//! implemented using unsafe code. In that case, you may want to embed
24+
//! some of the marker types below into your type.
1625
1726
#![stable(feature = "rust1", since = "1.0.0")]
1827

0 commit comments

Comments
 (0)