Commit Graph

46108 Commits

Author SHA1 Message Date
bors
40c00e9c06 Auto merge of #28146 - eefriedman:deque_extras, r=alexcrichton 2015-09-01 22:07:59 +00:00
bors
cb9323ec09 Auto merge of #28130 - alexcrichton:fix-msvc-static-tls-dtor, r=brson
Running TLS destructors for a MSVC Windows binary requires the linker doesn't
elide the `_tls_used` or `__tls_used` symbols (depending on the architecture).
This is currently achieved via a `#[link_args]` hack but this only works for
dynamically linked binaries because the link arguments aren't propagated to
statically linked binaries.

This commit alters the strategy to instead emit a volatile load from those
symbols so LLVM can't elide it, forcing the reference to the symbol to stay
alive as long as the callback function stays alive (which we've made sure of
with the `#[linkage]` attribute).

Closes #28111
2015-09-01 19:34:21 +00:00
Alex Crichton
9a3acece30 std: Run TLS destructors in a statically linked binary
Running TLS destructors for a MSVC Windows binary requires the linker doesn't
elide the `_tls_used` or `__tls_used` symbols (depending on the architecture).
This is currently achieved via a `#[link_args]` hack but this only works for
dynamically linked binaries because the link arguments aren't propagated to
statically linked binaries.

This commit alters the strategy to instead emit a volatile load from those
symbols so LLVM can't elide it, forcing the reference to the symbol to stay
alive as long as the callback function stays alive (which we've made sure of
with the `#[linkage]` attribute).

Closes #28111
2015-09-01 11:03:28 -07:00
bors
5c7c5bb1e1 Auto merge of #28088 - tbu-:pr_fixed_size_array, r=alexcrichton 2015-09-01 17:39:33 +00:00
Simonas Kazlauskas
8db906c752 Implement Debug for BinaryHeap
Fixes #28154
2015-09-01 20:27:48 +03:00
bors
7e3eabc699 Auto merge of #28152 - llogiq:master, r=Manishearth
This changes a lot of `.to_string()` to `.to_owned()`, removes a few redundant closures, and changes some `match`es to `if let`s.

I'm currently in the process of trying out clippy and acting on its suggestions. I started with compiletest, because we use it to test clippy, too. If this finds positive reception, I may continue refactoring other parts of the rust codebase.
2015-09-01 15:44:50 +00:00
Viacheslav Chimishuk
5ae8a0d38f Source code style fixed: tab replaced with whitespaces. 2015-09-01 17:49:08 +03:00
bors
2e9a74e3ab Auto merge of #28115 - AlexDenisov:patch-1, r=steveklabnik
r? @steveklabnik
2015-09-01 13:51:11 +00:00
llogiq
99383f8f5c refactored compiletest following clippy's suggestions 2015-09-01 14:43:42 +02:00
bors
19a33edaa9 Auto merge of #28060 - GuillaumeGomez:patch-3, r=Manishearth
Part of #24407

r? @Manishearth
2015-09-01 11:58:28 +00:00
bors
ae75ef9e62 Auto merge of #28137 - nrc:remove-non-multi, r=huonw
This is a [breaking-change] for syntax extension authors. The fix is to use MultiModifier or MultiDecorator, which have the same functionality but are more flexible. Users of syntax extensions are unaffected.
2015-09-01 09:12:52 +00:00
Jake Kerr
8213f01a76 Reverse AtomicBool value in nomicon example to agree with its comment.
Makes the code agree with the comment: 'value answers "am I locked?"'.
2015-09-01 17:32:22 +09:00
Eli Friedman
b82c42c153 Add missing stability markings to BinaryHeap. 2015-09-01 01:22:57 -07:00
bors
4ad128b95c Auto merge of #28136 - huonw:simd, r=alexcrichton
I believe everything that doesn't take a constant integer up to SSE4.2
should now be correct (I don't have any reason to believe that those
that do take constant integers are wrong; they're just more complicated
and I just haven't tested them in detail).

(Also, takes out two unused code paths from trans.)
2015-09-01 07:19:12 +00:00
Eli Friedman
b637a86c4a Add missing stability attributes to VecDeque. 2015-08-31 23:43:12 -07:00
bors
4da6c7e15c Auto merge of #28122 - apasel422:issue-28093, r=alexcrichton
closes #28093
2015-09-01 05:22:48 +00:00
Huon Wilson
787a21fe7c Fix some typos in SSE-AVX intrinsics.
I believe everything that doesn't take a constant integer up to SSE4.2
should now be correct (I don't have any reason to believe that those
that do take constant integers are wrong; they're just more complicated
and I just haven't tested them in detail).
2015-08-31 18:33:55 -07:00
Huon Wilson
bb6be30d6f Remove some SIMD codepaths from trans. 2015-08-31 18:33:55 -07:00
Nick Cameron
20e1ea2dd8 Remove the Modifier and Decorator kinds of syntax extensions.
This is a [breaking-change] for syntax extension authors. The fix is to use MultiModifier or MultiDecorator, which have the same functionality but are more flexible. Users of syntax extensions are unaffected.
2015-09-01 13:16:03 +12:00
bors
7d78f2d333 Auto merge of #28094 - apasel422:extend-hashmap, r=alexcrichton
It appears that these impls were left out of #25989 by mistake.

r? @alexcrichton

I'm not sure what the stability markers for these should be.
2015-09-01 00:32:07 +00:00
Guillaume Gomez
ae0409b695 Add E0439 error explanation 2015-09-01 01:22:44 +02:00
Guillaume Gomez
7daf235277 Add E0440 error explanation 2015-09-01 01:22:44 +02:00
Guillaume Gomez
dc70eca9a4 Add E0441 error explanation 2015-09-01 01:22:43 +02:00
Guillaume Gomez
9259418d26 Add E0443 error explanation 2015-09-01 01:22:43 +02:00
Guillaume Gomez
297b77d49b Add E0442 error explanation 2015-09-01 01:22:43 +02:00
Guillaume Gomez
954d6ae184 Comment out unused error codes 2015-09-01 01:22:43 +02:00
Guillaume Gomez
c016da248f Add E0411 error explanation 2015-09-01 01:22:40 +02:00
Jack Wilson
7665a7f016 Makes formatting of i32 consistent 2015-08-31 15:52:02 -07:00
bors
2d3e8379c8 Auto merge of #28079 - huonw:simd, r=alexcrichton
This adds a new Python script (compatible with 2.7 and 3.x) that will consume some JSON files that define a platform's intrinsics. It can output a file that defines the intrinsics in the compiler, or an `extern` block that will import them.

The complexity of the generator is to be DRY: platforms (especially ARM and AArch64) have a lot of repetition with their intrinsics, for different versions with different types, so being able to write it once is nice.
2015-08-31 21:34:08 +00:00
Ariel Ben-Yehuda
321f8d81b8 remove the is_instantiable check
Fixes #27497
2015-08-31 23:54:15 +03:00
Huon Wilson
14f9c97356 Delete unused macros from rustc_platform_intrinsics. 2015-08-31 13:42:09 -07:00
Andrew Paseltiner
a73d27f6d3 Implement RFC 839 for {HashMap, HashSet}
It appears that these impls were left out of #25989 by mistake.
2015-08-31 13:57:59 -04:00
bors
f9f82f8dc8 Auto merge of #28009 - GuillaumeGomez:patch-1, r=Manishearth
r? @Manishearth
2015-08-31 16:52:46 +00:00
bors
6d6bf81b33 Auto merge of #28123 - Aatch:fix-silly-tuple-constructor, r=eddyb
This was preventing any side-effects from the expressions from
happening.

Fixes #28114

cc @rust-lang/compiler
2015-08-31 15:00:48 +00:00
bors
ce40c48c45 Auto merge of #28116 - nrc:closure-expand, r=alexcrichton 2015-08-31 13:10:23 +00:00
James Miller
4637d42b58 Translate constructor arguments for zero-sized tuple structs
This was preventing any side-effects from the expressions from
happening.

Fixes #28114
2015-08-31 23:57:41 +12:00
bors
6a69bdd9e9 Auto merge of #28107 - mneumann:dragonfly_ar, r=alexcrichton 2015-08-31 11:19:27 +00:00
Andrew Paseltiner
15322adf3e hide docs for private collections::btree::Recover trait
closes #28093
2015-08-31 07:01:07 -04:00
bors
b0f77ba26a Auto merge of #28101 - ijks:24214-str-bytes, r=alexcrichton
Specifically, `count`, `last`, and `nth` are implemented to use the
methods of the underlying slice iterator.

Partially closes #24214.
2015-08-31 09:15:55 +00:00
Tobias Bucher
4d2709def2 Implement FixedSizeArray for all fixed size arrays
Do so by using the fact that fixed size arrays (like `[u8; 8]` can be coerced
to slices `&[u8]`, this is expressed through the trait `Unsize<[T]>` that all
fixed size arrays implement.
2015-08-31 10:55:39 +02:00
bors
05cc464d90 Auto merge of #27980 - tbu-:pr_cloexec_dup, r=alexcrichton
Still needs values of F_DUPFD_CLOEXEC on other OSs.

For Bitrig, NetBSD and OpenBSD the constant was incorrectly in posix01, when
it's actually posix08. In order to maintain backwards-compatiblity, the
constant was only copied, not moved.

cc #24237
2015-08-31 07:24:39 +00:00
Nick Cameron
ef4853041a Closures are not generated code. 2015-08-31 17:06:30 +12:00
AlexDenisov
b03b0d4c10 Fix typo 2015-08-31 06:44:27 +02:00
bors
811868ec6f Auto merge of #28103 - GuillaumeGomez:fix-intrinsic, r=huonw
Fixes #28062
2015-08-31 03:00:21 +00:00
bors
8f28c9b01e Auto merge of #28007 - Ms2ger:FnKind, r=nrc
There is no longer a need for that pattern, since enums are now qualified.
2015-08-31 01:09:40 +00:00
bors
fe9cef7dae Auto merge of #27983 - barosl:respect-color, r=nrc
Currently, `early_error` and `early_warn` in `librustc::session` always use `ColorConfig::Auto`. Modify them to follow the color configuration set by the `--color` option.

As colored output is also printed during the early stage, parsing the `--color` option should be done as early as possible. However, there are still some cases when the output needs to be colored before knowing the exact color settings. In these cases, it will be defaulted to `ColorConfig::Auto`, which is the same as before.

Fixes #27879.
2015-08-30 23:18:34 +00:00
Michael Neumann
c01eb691d0 fixes #27124 for DragonFly 2015-08-30 22:31:39 +02:00
bors
2aa7f97c7a Auto merge of #28106 - marcusklaas:continue, r=eddyb
Fixes https://github.com/rust-lang/rust/issues/28105.
2015-08-30 20:26:44 +00:00
Marcus Klaas
b69347c00c Assign correct span to continue expression
Fixes https://github.com/rust-lang/rust/issues/28105.
2015-08-30 20:44:36 +02:00
bors
7bb0d0d74c Auto merge of #28102 - arielb1:fix-log-again, r=eddyb
r? @eddyb
2015-08-30 16:52:23 +00:00