Skip to content

Commit 0eb6eee

Browse files
---
yaml --- r: 234228 b: refs/heads/beta c: 49d8b0d h: refs/heads/master v: v3
1 parent 89cad49 commit 0eb6eee

File tree

199 files changed

+9648
-12336
lines changed

Some content is hidden

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

199 files changed

+9648
-12336
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: b1c96168821d70992157f55ee9f06190bf299ba4
26+
refs/heads/beta: 49d8b0dcbef738b70f08b6648bb7c358b491f47c
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/COMPILER_TESTS.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

branches/beta/CONTRIBUTING.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ links to the major sections:
1010
* [Writing Documentation](#writing-documentation)
1111
* [Issue Triage](#issue-triage)
1212
* [Out-of-tree Contributions](#out-of-tree-contributions)
13-
* [Helpful Links and Information](#helpful-links-and-information)
1413

1514
If you have questions, please make a post on [internals.rust-lang.org][internals] or
1615
hop on [#rust-internals][pound-rust-internals].
@@ -211,28 +210,3 @@ valuable!
211210
[users]: https://users.rust-lang.org/
212211
[so]: http://stackoverflow.com/questions/tagged/rust
213212
[community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library
214-
215-
## Helpful Links and Information
216-
217-
For people new to Rust, and just starting to contribute, or even for
218-
more seasoned developers, some useful places to look for information
219-
are:
220-
221-
* The [Rust Internals forum][rif], a place to ask questions and
222-
discuss Rust's internals
223-
* The [generated documentation for rust's compiler][gdfrustc]
224-
* The [rust referance][rr], even though it doesn't specifically talk about Rust's internals, its a great reasource nontheless
225-
* Although out of date, [Tom Lee's great blog article][tlgba] is very helpful
226-
* [rustaceans.org][ro] is helpful, but mostly dedicated to IRC
227-
* The [Rust Compiler Testing Docs][rctd]
228-
* For @bors, [this cheetsheat][cheetsheat] is helpful (Remember to replace `@homu` with `@bors` in the commands that you use.)
229-
* **Google**!
230-
* Don't be afraid to ask! The Rust community is friendly and helpful.
231-
232-
[gdfrustc]: http://manishearth.github.io/rust-internals-docs/rustc/
233-
[rif]: http://internals.rust-lang.org
234-
[rr]: https://doc.rust-lang.org/book/README.html
235-
[tlgba]: http://tomlee.co/2014/04/03/a-more-detailed-tour-of-the-rust-compiler/
236-
[ro]: http://www.rustaceans.org/
237-
[rctd]: ./COMPILER_TESTS.md
238-
[cheetsheat]: http://buildbot.rust-lang.org/homu/

branches/beta/configure

Lines changed: 11 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -885,28 +885,6 @@ then
885885
CFG_DISABLE_JEMALLOC=1
886886
fi
887887

888-
# default gcc version under OpenBSD maybe too old, try using egcc, which is a
889-
# gcc version from ports
890-
if [ $CFG_OSTYPE = unknown-openbsd ]
891-
then
892-
if [ $("$CFG_GCC" --version 2>&1 | grep -c ' 4\.[0-6]') -ne 0 ]; then
893-
step_msg "older GCC found, try with egcc instead"
894-
895-
# probe again but using egcc
896-
probe CFG_GCC egcc
897-
898-
# and use egcc/eg++ for CC/CXX too if it was found
899-
# (but user setting has priority)
900-
if [ -n "$CFG_GCC" ]; then
901-
CC="${CC:-egcc}"
902-
CXX="${CXX:-eg++}"
903-
fi
904-
fi
905-
906-
step_msg "on OpenBSD, disabling jemalloc"
907-
CFG_DISABLE_JEMALLOC=1
908-
fi
909-
910888
# OS X 10.9, gcc is actually clang. This can cause some confusion in the build
911889
# system, so if we find that gcc is clang, we should just use clang directly.
912890
if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ]
@@ -978,7 +956,7 @@ then
978956
LLVM_VERSION=$($LLVM_CONFIG --version)
979957

980958
case $LLVM_VERSION in
981-
(3.[5-8]*)
959+
(3.[5-7]*)
982960
msg "found ok version of LLVM: $LLVM_VERSION"
983961
;;
984962
(*)
@@ -1052,7 +1030,7 @@ then
10521030
esac
10531031
else
10541032
case $CFG_CLANG_VERSION in
1055-
(3.2* | 3.3* | 3.4* | 3.5* | 3.6* | 3.7* | 3.8*)
1033+
(3.2* | 3.3* | 3.4* | 3.5* | 3.6* | 3.7*)
10561034
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
10571035
;;
10581036
(*)
@@ -1191,21 +1169,12 @@ do
11911169
#
11921170
# Consequently here we try to detect when that happens and print an
11931171
# error if it does.
1194-
if $CFG_PYTHON -c 'import sys; print sys.argv[1]' `pwd` | grep '^/' > /dev/null
1172+
if $CFG_PYTHON -c 'import sys; print sys.argv[1]' `pwd` | grep '^/'
11951173
then
1196-
err "
1197-
1198-
python is silently translating windows paths to MSYS paths \
1199-
and the build will fail if this python is used.
1200-
1201-
Either an official python install must be used or an \
1202-
alternative python package in MinGW must be used.
1203-
1204-
If you are building under msys2 try installing the mingw-w64-x86_64-python2 \
1205-
package instead of python2:
1206-
1207-
$ pacman -R python2 && pacman -S mingw-w64-x86_64-python2
1208-
"
1174+
err "python is silently translating windows paths to MSYS paths \
1175+
and the build will fail if this python is used.\n\n \
1176+
Either an official python install must be used or an \
1177+
alternative python package in MinGW must be used."
12091178
fi
12101179

12111180
# MSVC requires cmake because that's how we're going to build LLVM
@@ -1216,19 +1185,10 @@ $ pacman -R python2 && pacman -S mingw-w64-x86_64-python2
12161185
# detect that here and error.
12171186
if ! "$CFG_CMAKE" --help | sed -n '/^Generators/,$p' | grep 'Visual Studio' > /dev/null
12181187
then
1219-
err "
1220-
1221-
cmake does not support Visual Studio generators.
1222-
1223-
This is likely due to it being an msys/cygwin build of cmake, \
1224-
rather than the required windows version, built using MinGW \
1225-
or Visual Studio.
1226-
1227-
If you are building under msys2 try installing the mingw-w64-x86_64-cmake \
1228-
package instead of cmake:
1229-
1230-
$ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
1231-
"
1188+
err "cmake does not support Visual Studio generators.\n\n \
1189+
This is likely due to it being an msys/cygwin build of cmake, \
1190+
rather than the required windows version, built using MinGW \
1191+
or Visual Studio."
12321192
fi
12331193

12341194
# Use the REG program to figure out where VS is installed

branches/beta/src/doc/nomicon/destructors.md

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,13 @@ this is totally fine.
2626
For instance, a custom implementation of `Box` might write `Drop` like this:
2727

2828
```rust
29-
#![feature(alloc, heap_api, core_intrinsics, unique)]
30-
31-
extern crate alloc;
29+
#![feature(heap_api, core_intrinsics, unique)]
3230

31+
use std::rt::heap;
3332
use std::ptr::Unique;
3433
use std::intrinsics::drop_in_place;
3534
use std::mem;
3635

37-
use alloc::heap;
38-
3936
struct Box<T>{ ptr: Unique<T> }
4037

4138
impl<T> Drop for Box<T> {
@@ -48,26 +45,22 @@ impl<T> Drop for Box<T> {
4845
}
4946
}
5047
}
51-
# fn main() {}
5248
```
5349

5450
and this works fine because when Rust goes to drop the `ptr` field it just sees
55-
a [Unique] that has no actual `Drop` implementation. Similarly nothing can
51+
a [Unique][] that has no actual `Drop` implementation. Similarly nothing can
5652
use-after-free the `ptr` because when drop exits, it becomes inacessible.
5753

5854
However this wouldn't work:
5955

6056
```rust
61-
#![feature(alloc, heap_api, core_intrinsics, unique)]
62-
63-
extern crate alloc;
57+
#![feature(heap_api, core_intrinsics, unique)]
6458

59+
use std::rt::heap;
6560
use std::ptr::Unique;
6661
use std::intrinsics::drop_in_place;
6762
use std::mem;
6863

69-
use alloc::heap;
70-
7164
struct Box<T>{ ptr: Unique<T> }
7265

7366
impl<T> Drop for Box<T> {
@@ -94,7 +87,6 @@ impl<T> Drop for SuperBox<T> {
9487
}
9588
}
9689
}
97-
# fn main() {}
9890
```
9991

10092
After we deallocate the `box`'s ptr in SuperBox's destructor, Rust will
@@ -137,16 +129,13 @@ The classic safe solution to overriding recursive drop and allowing moving out
137129
of Self during `drop` is to use an Option:
138130

139131
```rust
140-
#![feature(alloc, heap_api, core_intrinsics, unique)]
141-
142-
extern crate alloc;
132+
#![feature(heap_api, core_intrinsics, unique)]
143133

134+
use std::rt::heap;
144135
use std::ptr::Unique;
145136
use std::intrinsics::drop_in_place;
146137
use std::mem;
147138

148-
use alloc::heap;
149-
150139
struct Box<T>{ ptr: Unique<T> }
151140

152141
impl<T> Drop for Box<T> {
@@ -176,7 +165,6 @@ impl<T> Drop for SuperBox<T> {
176165
}
177166
}
178167
}
179-
# fn main() {}
180168
```
181169

182170
However this has fairly odd semantics: you're saying that a field that *should*

branches/beta/src/doc/nomicon/meet-safe-and-unsafe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Unlike C, Undefined Behaviour is pretty limited in scope in Rust. All the core
6060
language cares about is preventing the following things:
6161

6262
* Dereferencing null or dangling pointers
63-
* Reading [uninitialized memory]
64-
* Breaking the [pointer aliasing rules]
63+
* Reading [uninitialized memory][]
64+
* Breaking the [pointer aliasing rules][]
6565
* Producing invalid primitive values:
6666
* dangling/null references
6767
* a `bool` that isn't 0 or 1

branches/beta/src/doc/nomicon/other-reprs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ still consumes a byte of space.
2626
* DSTs, tuples, and tagged unions are not a concept in C and as such are never
2727
FFI safe.
2828

29-
* **If the type would have any [drop flags], they will still be added**
29+
* **If the type would have any [drop flags][], they will still be added**
3030

3131
* This is equivalent to one of `repr(u*)` (see the next section) for enums. The
3232
chosen size is the default enum size for the target platform's C ABI. Note that

branches/beta/src/doc/nomicon/safe-unsafe-meaning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ unchecked contracts:
3535

3636
There is also `#[unsafe_no_drop_flag]`, which is a special case that exists for
3737
historical reasons and is in the process of being phased out. See the section on
38-
[drop flags] for details.
38+
[drop flags][] for details.
3939

4040
Some examples of unsafe functions:
4141

@@ -44,7 +44,7 @@ Some examples of unsafe functions:
4444
* `ptr::offset` is an intrinsic that invokes Undefined Behaviour if it is
4545
not "in bounds" as defined by LLVM.
4646
* `mem::transmute` reinterprets some value as having the given type,
47-
bypassing type safety in arbitrary ways. (see [conversions] for details)
47+
bypassing type safety in arbitrary ways. (see [conversions][] for details)
4848
* All FFI functions are `unsafe` because they can do arbitrary things.
4949
C being an obvious culprit, but generally any language can do something
5050
that Rust isn't happy about.

branches/beta/src/doc/nomicon/send-and-sync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ captures this through the `Send` and `Sync` traits.
1010

1111
Send and Sync are fundamental to Rust's concurrency story. As such, a
1212
substantial amount of special tooling exists to make them work right. First and
13-
foremost, they're [unsafe traits]. This means that they are unsafe to
13+
foremost, they're [unsafe traits][]. This means that they are unsafe to
1414
implement, and other unsafe code can assume that they are correctly
1515
implemented. Since they're *marker traits* (they have no associated items like
1616
methods), correctly implemented simply means that they have the intrinsic

branches/beta/src/doc/nomicon/transmutes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ same size. The ways to cause Undefined Behaviour with this are mind boggling.
2121
* No you can't do it
2222
* No you're not special
2323
* Transmuting to a reference without an explicitly provided lifetime
24-
produces an [unbounded lifetime]
24+
produces an [unbounded lifetime][]
2525

2626
`mem::transmute_copy<T, U>` somehow manages to be *even more* wildly unsafe than
2727
this. It copies `size_of<U>` bytes out of an `&T` and interprets them as a `U`.

branches/beta/src/doc/nomicon/vec-alloc.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This is perfectly fine because we already have `cap == 0` as our sentinel for no
99
allocation. We don't even need to handle it specially in almost any code because
1010
we usually need to check if `cap > len` or `len > 0` anyway. The traditional
1111
Rust value to put here is `0x01`. The standard library actually exposes this
12-
as `alloc::heap::EMPTY`. There are quite a few places where we'll
12+
as `std::rt::heap::EMPTY`. There are quite a few places where we'll
1313
want to use `heap::EMPTY` because there's no real allocation to talk about but
1414
`null` would make the compiler do bad things.
1515

@@ -20,12 +20,11 @@ the `heap` API anyway, so let's just get that dependency over with.
2020
So:
2121

2222
```rust,ignore
23-
#![feature(alloc, heap_api)]
23+
#![feature(heap_api)]
2424
25+
use std::rt::heap::EMPTY;
2526
use std::mem;
2627
27-
use alloc::heap::EMPTY;
28-
2928
impl<T> Vec<T> {
3029
fn new() -> Self {
3130
assert!(mem::size_of::<T>() != 0, "We're not ready to handle ZSTs");

branches/beta/src/doc/nomicon/vec-final.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
```rust
44
#![feature(unique)]
5-
#![feature(alloc, heap_api)]
6-
7-
extern crate alloc;
5+
#![feature(heap_api)]
86

97
use std::ptr::{Unique, self};
8+
use std::rt::heap;
109
use std::mem;
1110
use std::ops::{Deref, DerefMut};
1211
use std::marker::PhantomData;
1312

14-
use alloc::heap;
13+
14+
15+
1516

1617
struct RawVec<T> {
1718
ptr: Unique<T>,

0 commit comments

Comments
 (0)