Skip to content

Commit 56f19ae

Browse files
committed
---
yaml --- r: 187115 b: refs/heads/try c: 1212fd8 h: refs/heads/master i: 187113: af76bd9 187111: 3d56230 v: v3
1 parent 1f9eee2 commit 56f19ae

File tree

276 files changed

+6831
-3283
lines changed

Some content is hidden

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

276 files changed

+6831
-3283
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: 67eb38ee4cfd7b28f8498b5b6492da172768dcb9
5+
refs/heads/try: 1212fd8abc7602f6c506c936908a799c76549a14
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ links to the major sections:
1414
If you have questions, please make a post on [internals.rust-lang.org][internals] or
1515
hop on [#rust-internals][pound-rust-internals].
1616

17-
As a reminder, all contributors are expected to follow our [Code of Conduct][coc].
17+
As a reminder, all contributors are expected to follow our [Code of Conduct](coc).
1818

1919
[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
2020
[internals]: http://internals.rust-lang.org

branches/try/RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Version 1.0.0-alpha.2 (February 2015)
5151
* Abstract [OS-specific string types][osstr], `std::ff::{OsString,
5252
OsStr}`, provide strings in platform-specific encodings for easier
5353
interop with system APIs. [RFC][osstr-rfc].
54-
* The `boxed::into_raw` and `Box::from_raw` functions [convert
54+
* The `boxed::into_raw` and `Box::frow_raw` functions [convert
5555
between `Box<T>` and `*mut T`][boxraw], a common pattern for
5656
creating raw pointers.
5757

branches/try/configure

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,8 @@ case $CFG_OSTYPE in
374374
CFG_OSTYPE=unknown-dragonfly
375375
;;
376376

377-
Bitrig)
378-
CFG_OSTYPE=unknown-bitrig
379-
;;
380-
381377
OpenBSD)
382-
CFG_OSTYPE=unknown-openbsd
378+
CFG_OSTYPE=unknown-openbsd
383379
;;
384380

385381
Darwin)
@@ -751,13 +747,6 @@ then
751747
CFG_ENABLE_CLANG=1
752748
fi
753749

754-
# Force bitrig to build with clang; gcc doesn't like us there
755-
if [ $CFG_OSTYPE = unknown-bitrig ]
756-
then
757-
step_msg "on Bitrig, forcing use of clang"
758-
CFG_ENABLE_CLANG=1
759-
fi
760-
761750
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
762751
then
763752
err "either clang or gcc is required"

branches/try/mk/cfg/x86_64-unknown-bitrig.mk

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

branches/try/mk/platform.mk

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ FIND_COMPILER = $(word 1,$(1:ccache=))
144144
define CFG_MAKE_TOOLCHAIN
145145
# Prepend the tools with their prefix if cross compiling
146146
ifneq ($(CFG_BUILD),$(1))
147-
CC_$(1)=$(CROSS_PREFIX_$(1))$(CC_$(1))
148-
CXX_$(1)=$(CROSS_PREFIX_$(1))$(CXX_$(1))
149-
CPP_$(1)=$(CROSS_PREFIX_$(1))$(CPP_$(1))
150-
AR_$(1)=$(CROSS_PREFIX_$(1))$(AR_$(1))
151-
RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(call FIND_COMPILER,$$(CC_$(1))) \
152-
-C ar=$$(call FIND_COMPILER,$$(AR_$(1))) $(RUSTC_CROSS_FLAGS_$(1))
153-
154-
RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1))
147+
CC_$(1)=$(CROSS_PREFIX_$(1))$(CC_$(1))
148+
CXX_$(1)=$(CROSS_PREFIX_$(1))$(CXX_$(1))
149+
CPP_$(1)=$(CROSS_PREFIX_$(1))$(CPP_$(1))
150+
AR_$(1)=$(CROSS_PREFIX_$(1))$(AR_$(1))
151+
RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(call FIND_COMPILER,$$(CC_$(1))) \
152+
-C ar=$$(call FIND_COMPILER,$$(AR_$(1))) $(RUSTC_CROSS_FLAGS_$(1))
153+
154+
RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1))
155155
endif
156156

157157
CFG_COMPILE_C_$(1) = $$(CC_$(1)) \
@@ -179,19 +179,11 @@ define CFG_MAKE_TOOLCHAIN
179179

180180
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
181181

182-
# On Bitrig, we need the relocation model to be PIC for everthing
183-
ifeq (,$(filter $(OSTYPE_$(1)),bitrig))
184-
LLVM_MC_RELOCATION_MODEL="pic"
185-
else
186-
LLVM_MC_RELOCATION_MODEL="default"
187-
endif
188-
189182
# We're using llvm-mc as our assembler because it supports
190183
# .cfi pseudo-ops on mac
191184
CFG_ASSEMBLE_$(1)=$$(CPP_$(1)) -E $$(CFG_DEPEND_FLAGS) $$(2) | \
192185
$$(LLVM_MC_$$(CFG_BUILD)) \
193186
-assemble \
194-
-relocation-model=$$(LLVM_MC_RELOCATION_MODEL) \
195187
-filetype=obj \
196188
-triple=$(1) \
197189
-o=$$(1)
@@ -200,7 +192,7 @@ define CFG_MAKE_TOOLCHAIN
200192
# For the ARM, AARCH64, MIPS and POWER crosses, use the toolchain assembler
201193
# FIXME: We should be able to use the LLVM assembler
202194
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
203-
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
195+
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
204196

205197
endif
206198

branches/try/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
5858
fn parse_expected(last_nonfollow_error: Option<uint>,
5959
line_num: uint,
6060
line: &str) -> Option<(WhichLine, ExpectedError)> {
61-
let start = match line.find("//~") { Some(i) => i, None => return None };
61+
let start = match line.find_str("//~") { Some(i) => i, None => return None };
6262
let (follow, adjusts) = if line.char_at(start + 3) == '|' {
6363
(true, 0)
6464
} else {

branches/try/src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ fn parse_name_directive(line: &str, directive: &str) -> bool {
330330
pub fn parse_name_value_directive(line: &str, directive: &str)
331331
-> Option<String> {
332332
let keycolon = format!("{}:", directive);
333-
match line.find(&keycolon) {
333+
match line.find_str(&keycolon) {
334334
Some(colon) => {
335335
let value = line[(colon + keycolon.len()) .. line.len()].to_string();
336336
debug!("{}: {}", directive, value);

branches/try/src/compiletest/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
847847
check_lines.iter().map(|s| {
848848
s
849849
.trim()
850-
.split("[...]")
850+
.split_str("[...]")
851851
.map(|x| x.to_string())
852852
.collect()
853853
}).collect();
@@ -866,7 +866,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
866866
None
867867
}
868868
} else {
869-
rest.find(frag)
869+
rest.find_str(frag)
870870
};
871871
match found {
872872
None => {

branches/try/src/compiletest/util.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ static OS_TABLE: &'static [(&'static str, &'static str)] = &[
2323
("linux", "linux"),
2424
("freebsd", "freebsd"),
2525
("dragonfly", "dragonfly"),
26-
("bitrig", "bitrig"),
2726
("openbsd", "openbsd"),
2827
];
2928

branches/try/src/doc/reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,8 +2188,8 @@ The following configurations must be defined by the implementation:
21882188
`"unix"` or `"windows"`. The value of this configuration option is defined
21892189
as a configuration itself, like `unix` or `windows`.
21902190
* `target_os = "..."`. Operating system of the target, examples include
2191-
`"win32"`, `"macos"`, `"linux"`, `"android"`, `"freebsd"`, `"dragonfly"`,
2192-
`"bitrig"` or `"openbsd"`.
2191+
`"win32"`, `"macos"`, `"linux"`, `"android"`, `"freebsd"`, `"dragonfly"` or
2192+
`"openbsd"`.
21932193
* `target_word_size = "..."`. Target word size in bits. This is set to `"32"`
21942194
for targets with 32-bit pointers, and likewise set to `"64"` for 64-bit
21952195
pointers.

branches/try/src/doc/trpl/guessing-game.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn main() {
9191
```
9292

9393
You've seen this code before, when we talked about standard input. We
94-
import the `std::old_io` module with `use`, and then our `main` function contains
94+
import the `std::io` module with `use`, and then our `main` function contains
9595
our program's logic. We print a little message announcing the game, ask the
9696
user to input a guess, get their input, and then print it out.
9797

branches/try/src/doc/trpl/if.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,6 @@ if x == 5 {
3434
}
3535
```
3636

37-
If there is more than one case, use an `else if`:
38-
39-
```rust
40-
let x = 5;
41-
42-
if x == 5 {
43-
println!("x is five!");
44-
} else if x == 6 {
45-
println!("x is six!");
46-
} else {
47-
println!("x is not five or six :(");
48-
}
49-
```
50-
5137
This is all pretty standard. However, you can also do this:
5238

5339

branches/try/src/doc/trpl/pointers.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -687,9 +687,7 @@ than the hundred `int`s that make up the `BigStruct`.
687687

688688
This is an antipattern in Rust. Instead, write this:
689689

690-
```rust
691-
#![feature(box_syntax)]
692-
690+
```{rust}
693691
struct BigStruct {
694692
one: i32,
695693
two: i32,
@@ -708,13 +706,10 @@ fn main() {
708706
one_hundred: 100,
709707
});
710708
711-
let y = box foo(x);
709+
let y = Box::new(foo(x));
712710
}
713711
```
714712

715-
Note that this uses the `box_syntax` feature gate, so this syntax may change in
716-
the future.
717-
718713
This gives you flexibility without sacrificing performance.
719714

720715
You may think that this gives us terrible performance: return a value and then

branches/try/src/doc/trpl/static-and-dynamic-dispatch.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ inlining and hence usually higher performance. It also has some downsides:
8484
causing code bloat due to many copies of the same function existing in the
8585
binary, one for each type.
8686

87-
Furthermore, compilers aren’t perfect and may “optimize” code to become slower.
87+
Furthermore, compilers aren’t perfect and may “optimise” code to become slower.
8888
For example, functions inlined too eagerly will bloat the instruction cache
8989
(cache rules everything around us). This is part of the reason that `#[inline]`
9090
and `#[inline(always)]` should be used carefully, and one reason why using a
@@ -104,15 +104,15 @@ objects, like `&Foo` or `Box<Foo>`, are normal values that store a value of
104104
known at runtime. The methods of the trait can be called on a trait object via
105105
a special record of function pointers (created and managed by the compiler).
106106

107-
A function that takes a trait object is not specialized to each of the types
107+
A function that takes a trait object is not specialised to each of the types
108108
that implements `Foo`: only one copy is generated, often (but not always)
109109
resulting in less code bloat. However, this comes at the cost of requiring
110110
slower virtual function calls, and effectively inhibiting any chance of
111111
inlining and related optimisations from occurring.
112112

113113
Trait objects are both simple and complicated: their core representation and
114114
layout is quite straight-forward, but there are some curly error messages and
115-
surprising behaviors to discover.
115+
surprising behaviours to discover.
116116

117117
### Obtaining a trait object
118118

@@ -140,13 +140,13 @@ and casts are identical.
140140

141141
This operation can be seen as "erasing" the compiler's knowledge about the
142142
specific type of the pointer, and hence trait objects are sometimes referred to
143-
as "type erasure".
143+
"type erasure".
144144

145145
### Representation
146146

147147
Let's start simple, with the runtime representation of a trait object. The
148148
`std::raw` module contains structs with layouts that are the same as the
149-
complicated built-in types, [including trait objects][stdraw]:
149+
complicated build-in types, [including trait objects][stdraw]:
150150

151151
```rust
152152
# mod foo {
@@ -223,14 +223,14 @@ static Foo_for_String_vtable: FooVtable = FooVtable {
223223
The `destructor` field in each vtable points to a function that will clean up
224224
any resources of the vtable's type, for `u8` it is trivial, but for `String` it
225225
will free the memory. This is necessary for owning trait objects like
226-
`Box<Foo>`, which need to clean-up both the `Box` allocation as well as the
226+
`Box<Foo>`, which need to clean-up both the `Box` allocation and as well as the
227227
internal type when they go out of scope. The `size` and `align` fields store
228228
the size of the erased type, and its alignment requirements; these are
229229
essentially unused at the moment since the information is embedded in the
230-
destructor, but will be used in the future, as trait objects are progressively
231-
made more flexible.
230+
destructor, but will be used in future, as trait objects are progressively made
231+
more flexible.
232232

233-
Suppose we've got some values that implement `Foo`, then the explicit form of
233+
Suppose we've got some values that implement `Foo`, the explicit form of
234234
construction and use of `Foo` trait objects might look a bit like (ignoring the
235235
type mismatches: they're all just pointers anyway):
236236

branches/try/src/etc/local_stage0.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LIB_PREFIX=lib
1818

1919
OS=`uname -s`
2020
case $OS in
21-
("Linux"|"FreeBSD"|"DragonFly"|"Bitrig"|"OpenBSD")
21+
("Linux"|"FreeBSD"|"DragonFly"|"OpenBSD")
2222
BIN_SUF=
2323
LIB_SUF=.so
2424
;;

branches/try/src/etc/mklldeps.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,7 @@ def run(args):
5757
args.extend(components)
5858
out = run(args)
5959
for lib in out.strip().replace("\n", ' ').split(' '):
60-
if len(lib) == 0:
61-
continue
62-
# in some cases we get extra spaces in between libs so ignore those
63-
if len(lib) == 1 and lib == ' ':
64-
continue
65-
# not all libs strictly follow -lfoo, on Bitrig, there is -pthread
66-
if lib[0:2] == '-l':
67-
lib = lib.strip()[2:]
68-
elif lib[0] == '-':
69-
lib = lib.strip()[1:]
60+
lib = lib.strip()[2:] # chop of the leading '-l'
7061
f.write("#[link(name = \"" + lib + "\"")
7162
# LLVM libraries are all static libraries
7263
if 'LLVM' in lib:

branches/try/src/etc/snapshot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ def scrub(b):
4646
"winnt": ["bin/rustc.exe"],
4747
"freebsd": ["bin/rustc"],
4848
"dragonfly": ["bin/rustc"],
49-
"bitrig": ["bin/rustc"],
5049
"openbsd": ["bin/rustc"],
5150
}
5251

5352
winnt_runtime_deps_32 = ["libgcc_s_dw2-1.dll", "libstdc++-6.dll"]
5453
winnt_runtime_deps_64 = ["libgcc_s_seh-1.dll", "libstdc++-6.dll"]
5554

55+
5656
def parse_line(n, line):
5757
global snapshotfile
5858

@@ -101,8 +101,6 @@ def get_kernel(triple):
101101
return "freebsd"
102102
if os_name == "dragonfly":
103103
return "dragonfly"
104-
if os_name == "bitrig":
105-
return "bitrig"
106104
if os_name == "openbsd":
107105
return "openbsd"
108106
return "linux"

branches/try/src/liballoc/arc.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,13 @@ impl<T: Default + Sync + Send> Default for Arc<T> {
598598
fn default() -> Arc<T> { Arc::new(Default::default()) }
599599
}
600600

601+
#[cfg(stage0)]
602+
impl<H: Hasher, T: Hash<H>> Hash<H> for Arc<T> {
603+
fn hash(&self, state: &mut H) {
604+
(**self).hash(state)
605+
}
606+
}
607+
#[cfg(not(stage0))]
601608
#[stable(feature = "rust1", since = "1.0.0")]
602609
impl<T: Hash> Hash for Arc<T> {
603610
fn hash<H: Hasher>(&self, state: &mut H) {

branches/try/src/liballoc/boxed.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,14 @@ impl<T: ?Sized + Ord> Ord for Box<T> {
220220
#[stable(feature = "rust1", since = "1.0.0")]
221221
impl<T: ?Sized + Eq> Eq for Box<T> {}
222222

223+
#[cfg(stage0)]
224+
impl<S: hash::Hasher, T: ?Sized + Hash<S>> Hash<S> for Box<T> {
225+
#[inline]
226+
fn hash(&self, state: &mut S) {
227+
(**self).hash(state);
228+
}
229+
}
230+
#[cfg(not(stage0))]
223231
#[stable(feature = "rust1", since = "1.0.0")]
224232
impl<T: ?Sized + Hash> Hash for Box<T> {
225233
fn hash<H: hash::Hasher>(&self, state: &mut H) {

branches/try/src/liballoc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
#![feature(unboxed_closures)]
7474
#![feature(unsafe_no_drop_flag)]
7575
#![feature(core)]
76-
#![cfg_attr(test, feature(test, alloc, rustc_private))]
7776
#![cfg_attr(all(not(feature = "external_funcs"), not(feature = "external_crate")),
7877
feature(libc))]
7978

0 commit comments

Comments
 (0)