]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRollup merge of #26599 - richo:richo-stage-info, r=brson
Steve Klabnik [Mon, 6 Jul 2015 22:06:29 +0000 (18:06 -0400)]
Rollup merge of #26599 - richo:richo-stage-info, r=brson

This will add information about the stage that a rustc was built with to the verbose version info

I have symlinks into $(HOST)/stage{0,1,2} into the rust version switcher thing I use, and occasionally need to know which stage a given rustc is.

9 years agoAuto merge of #26757 - oli-obk:style_fixes, r=brson
bors [Mon, 6 Jul 2015 21:22:20 +0000 (21:22 +0000)]
Auto merge of #26757 - oli-obk:style_fixes, r=brson

the indentation has always been a thorn in my eye.

If it's preferred I'll leave the `unsafe` where it was and change it to

```rust
unsafe { match e.node {
    ...
} } // unsafe { match e.node {
```

so there's no unnecessary indent

9 years agorustc_driver: Omit stage info for stage2+
Richo Healey [Mon, 6 Jul 2015 19:43:01 +0000 (12:43 -0700)]
rustc_driver: Omit stage info for stage2+

9 years agoAuto merge of #26741 - alexcrichton:noinline-destructors, r=brson
bors [Mon, 6 Jul 2015 19:49:16 +0000 (19:49 +0000)]
Auto merge of #26741 - alexcrichton:noinline-destructors, r=brson

This PR was originally going to be a "let's start running tests on MSVC" PR, but it didn't quite get to that point. It instead gets us ~80% of the way there! The steps taken in this PR are:

* Landing pads are turned on by default for 64-bit MSVC. The LLVM support is "good enough" with the caveat the destructor glue is now marked noinline. This was recommended [on the associated bug](https://llvm.org/bugs/show_bug.cgi?id=23884) as a stopgap until LLVM has a better representation for exception handling in MSVC. The consequence of this is that MSVC will have a bit of a perf hit, but there are possible routes we can take if this workaround sticks around for too long.
* The linker (`link.exe`) is now looked up in the Windows Registry if it's not otherwise available in the environment. This improves using the compiler outside of a VS shell (e.g. in a MSYS shell or in a vanilla cmd.exe shell). This also makes cross compiles via Cargo "just work" when crossing between 32 and 64 bit!
* TLS destructors were fixed to start running on MSVC (they previously weren't running at all)
* A few assorted `run-pass` tests were fixed.
* The dependency on the `rust_builtin` library was removed entirely for MSVC to try to prevent any `cl.exe` compiled objects get into the standard library. This should help us later remove any dependence on the CRT by the standard library.
* I re-added `rust_try_msvc_32.ll` for 32-bit MSVC and ensured that landing pads were turned off by default there as well.

Despite landing pads being enabled, there are still *many* failing tests on MSVC. The two major classes I've identified so far are:

* Spurious aborts. It appears that when optimizations are enabled that landing pads aren't always lined up properly, and sometimes an exception being thrown can't find the catch block down the stack, causing the program to abort. I've been working to reduce this test case but haven't been met with great success just yet.
* Parallel codegen does not work on MSVC. Our current strategy is to take the N object files emitted by the N codegen threads and use `ld -r` to assemble them into *one* object file. The MSVC linker, however, does not have this ability, and this will need to be rearchitected to work on MSVC.

I will fix parallel codegen in a future PR, and I'll also be watching LLVM closely to see if the aborts... disappear!

9 years agorustc_driver: Print stage info in --version --verbose
Richo Healey [Fri, 26 Jun 2015 17:32:42 +0000 (10:32 -0700)]
rustc_driver: Print stage info in --version --verbose

9 years agoAuto merge of #26824 - arielb1:fix-26812, r=eddyb
bors [Mon, 6 Jul 2015 18:15:46 +0000 (18:15 +0000)]
Auto merge of #26824 - arielb1:fix-26812, r=eddyb

Fixes #26812.

r? @eddyb

9 years agoAuto merge of #26822 - tamird:llvm-config, r=alexcrichton
bors [Mon, 6 Jul 2015 16:22:47 +0000 (16:22 +0000)]
Auto merge of #26822 - tamird:llvm-config, r=alexcrichton

Minor stuff.

9 years agodon't use type_parameter_def during astconv
Ariel Ben-Yehuda [Mon, 6 Jul 2015 15:46:03 +0000 (18:46 +0300)]
don't use type_parameter_def during astconv

astconv is called when converting the type-parameter, which leads to
a crash.

Fixes #26812.

9 years agoAuto merge of #26820 - liigo:patch-2, r=steveklabnik
bors [Mon, 6 Jul 2015 14:49:52 +0000 (14:49 +0000)]
Auto merge of #26820 - liigo:patch-2, r=steveklabnik

Closes #26801

9 years agoRemove unused variable
Tamir Duberstein [Sat, 30 May 2015 13:35:34 +0000 (09:35 -0400)]
Remove unused variable

9 years ago`llconfig` is `llvm-config`
Tamir Duberstein [Fri, 29 May 2015 16:36:13 +0000 (12:36 -0400)]
`llconfig` is `llvm-config`

9 years agoSimplify
Tamir Duberstein [Fri, 29 May 2015 16:36:02 +0000 (12:36 -0400)]
Simplify

9 years agoAuto merge of #26821 - oli-obk:patch-1, r=sanxiyn
bors [Mon, 6 Jul 2015 12:20:23 +0000 (12:20 +0000)]
Auto merge of #26821 - oli-obk:patch-1, r=sanxiyn

9 years agotypo "struct has is 0-sized"
Oliver Schneider [Mon, 6 Jul 2015 11:58:37 +0000 (13:58 +0200)]
typo "struct has is 0-sized"

9 years agolower blanket unsafe block to actual cases of unsafe and adjust indents
Oliver Schneider [Fri, 3 Jul 2015 09:34:19 +0000 (11:34 +0200)]
lower blanket unsafe block to actual cases of unsafe and adjust indents

9 years agobook: introduce `//!` doc comment in comments section
Liigo Zhuang [Mon, 6 Jul 2015 06:55:06 +0000 (14:55 +0800)]
book: introduce `//!` doc comment in comments section

Closes #26801

9 years agoAuto merge of #26817 - cmr:vecdeque-docs, r=Gankro
bors [Mon, 6 Jul 2015 05:01:21 +0000 (05:01 +0000)]
Auto merge of #26817 - cmr:vecdeque-docs, r=Gankro

None

9 years agoAuto merge of #26811 - steveklabnik:rollup, r=steveklabnik
bors [Sun, 5 Jul 2015 23:42:50 +0000 (23:42 +0000)]
Auto merge of #26811 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #26464, #26789, #26800, #26806, #26808
- Failed merges: #26796

9 years agoAuto merge of #26464 - Gankro:send, r=alexcrichton
bors [Sun, 5 Jul 2015 22:10:21 +0000 (22:10 +0000)]
Auto merge of #26464 - Gankro:send, r=alexcrichton

Vec contains `Unique<T>` and some usizes, this is already derived.

9 years agoAuto merge of #26473 - Eljay:missing_docs, r=alexcrichton
bors [Sun, 5 Jul 2015 20:37:26 +0000 (20:37 +0000)]
Auto merge of #26473 - Eljay:missing_docs, r=alexcrichton

Fixes #24249

I've tagged all items that were missing docs to allow them to compile for now, the ones in core/num should probably be documented at least.

This is also a breaking change for any crates using `#[deny(missing_docs)]` that have undocumented constants, not sure there is any way to avoid this without making it a separate lint?

9 years agoRollup merge of #26808 - tshepang:closures, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 19:12:21 +0000 (15:12 -0400)]
Rollup merge of #26808 - tshepang:closures, r=steveklabnik

9 years agoreference: 'inherits' is more clear than 'implies'
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 19:43:28 +0000 (21:43 +0200)]
reference: 'inherits' is more clear than 'implies'

9 years agoRollup merge of #26806 - cmr:stabilize-drain, r=Gankro
Steve Klabnik [Sun, 5 Jul 2015 19:12:20 +0000 (15:12 -0400)]
Rollup merge of #26806 - cmr:stabilize-drain, r=Gankro

None

9 years agoRollup merge of #26800 - tshepang:comma, r=Gankro
Steve Klabnik [Sun, 5 Jul 2015 19:12:20 +0000 (15:12 -0400)]
Rollup merge of #26800 - tshepang:comma, r=Gankro

9 years agoRollup merge of #26789 - tshepang:improve-array-examples, r=alexcrichton
Steve Klabnik [Sun, 5 Jul 2015 19:12:20 +0000 (15:12 -0400)]
Rollup merge of #26789 - tshepang:improve-array-examples, r=alexcrichton

9 years agoRollup merge of #26464 - Gankro:send, r=alexcrichton
Steve Klabnik [Sun, 5 Jul 2015 19:12:19 +0000 (15:12 -0400)]
Rollup merge of #26464 - Gankro:send, r=alexcrichton

Vec contains `Unique<T>` and some usizes, this is already derived.

9 years agoAuto merge of #25754 - geofft:remove-compiletest-jit, r=alexcrichton
bors [Sun, 5 Jul 2015 19:05:14 +0000 (19:05 +0000)]
Auto merge of #25754 - geofft:remove-compiletest-jit, r=alexcrichton

jit support was removed from rustc in 6b34ba242d7372b779bf50682b9401b61183828e
(December 2013), so passing `--jit` wouldn't even work.

9 years agoAuto merge of #26798 - steveklabnik:rollup, r=steveklabnik
bors [Sun, 5 Jul 2015 17:31:11 +0000 (17:31 +0000)]
Auto merge of #26798 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #26785, #26787, #26788, #26791, #26792, #26795
- Failed merges: #26796

9 years agocollections: vec_deque: add some notes on how to use VecDeque as a queue effectively
Corey Richardson [Sun, 5 Jul 2015 16:18:57 +0000 (12:18 -0400)]
collections: vec_deque: add some notes on how to use VecDeque as a queue effectively

9 years agoreference: remove stray comma
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 15:58:46 +0000 (17:58 +0200)]
reference: remove stray comma

9 years agoRollup merge of #26795 - tshepang:typo, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:16 +0000 (07:35 -0400)]
Rollup merge of #26795 - tshepang:typo, r=steveklabnik

9 years agoreference: fix typo
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 14:36:43 +0000 (16:36 +0200)]
reference: fix typo

9 years agoRollup merge of #26792 - tshepang:follow-idiom, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:15 +0000 (07:35 -0400)]
Rollup merge of #26792 - tshepang:follow-idiom, r=steveklabnik

9 years agoreference: improve lambda example
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 12:49:08 +0000 (14:49 +0200)]
reference: improve lambda example

9 years agoRollup merge of #26791 - tshepang:misc-ref-fixes, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:15 +0000 (07:35 -0400)]
Rollup merge of #26791 - tshepang:misc-ref-fixes, r=steveklabnik

One is for grammar, and the other is for clarity

9 years agoreference: tiny fixes
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 12:45:24 +0000 (14:45 +0200)]
reference: tiny fixes

One is for grammar, and the other is for clarity

9 years agoRollup merge of #26788 - tshepang:not-exclamation-marks, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:15 +0000 (07:35 -0400)]
Rollup merge of #26788 - tshepang:not-exclamation-marks, r=steveklabnik

The sentences are also so short that they don't need periods at the end

9 years agoRollup merge of #26787 - tshepang:tuple-usage, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:15 +0000 (07:35 -0400)]
Rollup merge of #26787 - tshepang:tuple-usage, r=steveklabnik

9 years agoRollup merge of #26785 - tshepang:inference, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:14 +0000 (07:35 -0400)]
Rollup merge of #26785 - tshepang:inference, r=steveklabnik

…at and integer types

9 years agoreference: improve examples of the different array types
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 11:30:46 +0000 (13:30 +0200)]
reference: improve examples of the different array types

9 years agoreference: that looks like exclamations marks for some fonts
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 11:11:26 +0000 (13:11 +0200)]
reference: that looks like exclamations marks for some fonts

The sentences are also so short that they don't need periods at the end

9 years agoreference: make tuple usage examples more meaningful
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 11:01:42 +0000 (13:01 +0200)]
reference: make tuple usage examples more meaningful

9 years agoreference: improve readability of type inference explanations for float and integer...
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 10:31:44 +0000 (12:31 +0200)]
reference: improve readability of type inference explanations for float and integer types

9 years agocollections: vec_deque: rename "ringbuf" to "VecDeque" in doc comments
Corey Richardson [Sun, 5 Jul 2015 07:49:36 +0000 (03:49 -0400)]
collections: vec_deque: rename "ringbuf" to "VecDeque" in doc comments

9 years agoAuto merge of #26776 - bluss:num-inline, r=eddyb
bors [Sat, 4 Jul 2015 20:59:56 +0000 (20:59 +0000)]
Auto merge of #26776 - bluss:num-inline, r=eddyb

Add missing #[inline] to min_value/max_value on integers

Spotted a compiled function call to num::usize::min_value, I'd prefer
the 0 to be inlined.

9 years agoAdd missing #[inline] to min_value/max_value on integers
Ulrik Sverdrup [Sat, 4 Jul 2015 20:54:59 +0000 (22:54 +0200)]
Add missing #[inline] to min_value/max_value on integers

Spotted a compiled function call to num::usize::min_value, I'd prefer
the 0 to be inlined.

9 years agoAuto merge of #26694 - eddyb:method-nan, r=arielb1
bors [Sat, 4 Jul 2015 18:49:28 +0000 (18:49 +0000)]
Auto merge of #26694 - eddyb:method-nan, r=arielb1

`MethodCallee` now has no information about the method, other than its `DefId`.
The previous bits of information can be recovered as follows:
```rust
let method_item = tcx.impl_or_trait_item(callee.def_id);
let container = method_item.container();
```
The method is inherent if `container` is a `ty::ImplContainer`:
* the `impl` the method comes from is `container.id()`

The method is a trait method if `container` is a `ty::TraitContainer:
* the `trait` the method is part of is `container.id()`
* a `ty::TraitRef` can be constructed by putting together:
 * `container.id()` as the `trait` ID
 * `callee.substs.clone().method_to_trait()` as the `trait` substs (including `Self`)
* the above `trait_ref` is a valid `T: Trait<A, B, C>` predicate
* selecting `trait_ref` could result in one of the following:
 * `traits::VtableImpl(data)`: static dispatch to `data.impl_def_id`
 * `traits::VtableObject(data)`: dynamic dispatch, with the vtable index:
`traits::get_vtable_index_of_object_method(tcx, data, callee.def_id)`
 * other variants of `traits::Vtable`: various other `impl` sources

9 years agoAuto merge of #26771 - bluss:str-prefix, r=Gankro
bors [Sat, 4 Jul 2015 17:16:51 +0000 (17:16 +0000)]
Auto merge of #26771 - bluss:str-prefix, r=Gankro

core: Use memcmp in is_prefix_of / is_suffix_of

The basic str equality in core::str calls memcmp, re-use the same
function in StrSearcher's is_prefix_of, is_suffix_of.

9 years agorustc: remove MethodOrigin and use the container to distinguish inherent methods.
Eduard Burtescu [Sat, 4 Jul 2015 04:07:10 +0000 (07:07 +0300)]
rustc: remove MethodOrigin and use the container to distinguish inherent methods.

9 years agorustc: compute the vtable base of a supertrait during selection. Fixes #26339.
Eduard Burtescu [Sat, 4 Jul 2015 02:46:54 +0000 (05:46 +0300)]
rustc: compute the vtable base of a supertrait during selection. Fixes #26339.

9 years agoAuto merge of #26770 - arielb1:str-mut-idx, r=eddyb
bors [Sat, 4 Jul 2015 14:44:45 +0000 (14:44 +0000)]
Auto merge of #26770 - arielb1:str-mut-idx, r=eddyb

r? @eddyb

This doesn't seem to make any code valid because the `IndexMut` impls are missing.

9 years agostr: Correct documentation on is_char_boundary
Ulrik Sverdrup [Sat, 4 Jul 2015 13:20:34 +0000 (15:20 +0200)]
str: Correct documentation on is_char_boundary

Documentation claims it panics on out of bounds -- it regards out of
bounds as just not a char boundary.

core::str module is aware of how it works and uses it appropriately.
Maybe we should rename it to `is_valid_index`, `is_slicable_index`, or
something similar.

9 years agoRemove outdated errors for mutating strings
Ariel Ben-Yehuda [Sat, 4 Jul 2015 12:30:00 +0000 (15:30 +0300)]
Remove outdated errors for mutating strings

9 years agocore: Use memcmp in is_prefix_of / is_suffix_of
Ulrik Sverdrup [Sat, 4 Jul 2015 13:10:20 +0000 (15:10 +0200)]
core: Use memcmp in is_prefix_of / is_suffix_of

The basic str equality in core::str calls memcmp, re-use the same
function in StrSearcher's is_prefix_of, is_suffix_of.

9 years agoAuto merge of #26728 - arielb1:assoc-maybe, r=nrc
bors [Sat, 4 Jul 2015 11:10:16 +0000 (11:10 +0000)]
Auto merge of #26728 - arielb1:assoc-maybe, r=nrc

r? @nrc

9 years agorequire reimplementations of all items when a defaulted associated type is overriden
Ariel Ben-Yehuda [Tue, 30 Jun 2015 17:30:47 +0000 (20:30 +0300)]
require reimplementations of all items when a defaulted associated type is overriden

This is a
[breaking-change]
but it follows the RFC (not sure whether it will be accepted).

9 years agoClean-up check_impl_items_against_trait
Ariel Ben-Yehuda [Tue, 30 Jun 2015 15:25:06 +0000 (18:25 +0300)]
Clean-up check_impl_items_against_trait

9 years agoAuto merge of #26763 - steveklabnik:fix_feature_gates, r=sfackler
bors [Sat, 4 Jul 2015 04:52:35 +0000 (04:52 +0000)]
Auto merge of #26763 - steveklabnik:fix_feature_gates, r=sfackler

These aren't actually needed

9 years agorustc: remove MethodOrigin::Object and use traits::VtableObject instead.
Eduard Burtescu [Fri, 3 Jul 2015 02:22:54 +0000 (05:22 +0300)]
rustc: remove MethodOrigin::Object and use traits::VtableObject instead.

9 years agorustc_trans: remove some outdated and unused logic from callee.
Eduard Burtescu [Thu, 2 Jul 2015 11:34:53 +0000 (14:34 +0300)]
rustc_trans: remove some outdated and unused logic from callee.

9 years agorustc_lint: use traits::select for methods in unconditional_recursion.
Eduard Burtescu [Thu, 2 Jul 2015 10:33:01 +0000 (13:33 +0300)]
rustc_lint: use traits::select for methods in unconditional_recursion.

9 years agorustc_trans: explicit impl population is unnecessary in fulfill_obligation.
Eduard Burtescu [Thu, 2 Jul 2015 06:11:36 +0000 (09:11 +0300)]
rustc_trans: explicit impl population is unnecessary in fulfill_obligation.

9 years agorustc: simplify ty::MethodOrigin and avoid trait item indices.
Eduard Burtescu [Thu, 2 Jul 2015 05:52:36 +0000 (08:52 +0300)]
rustc: simplify ty::MethodOrigin and avoid trait item indices.

9 years agorustc: remove unused MethodStaticClosure variant of MethodOrigin.
Eduard Burtescu [Tue, 30 Jun 2015 10:41:13 +0000 (13:41 +0300)]
rustc: remove unused MethodStaticClosure variant of MethodOrigin.

9 years agoAuto merge of #26754 - SaschaNaz:patch-1, r=steveklabnik
bors [Sat, 4 Jul 2015 03:19:07 +0000 (03:19 +0000)]
Auto merge of #26754 - SaschaNaz:patch-1, r=steveklabnik

9 years agoAuto merge of #26370 - nikomatsakis:better-object-defaults-warn, r=nikomatsakis
bors [Sat, 4 Jul 2015 00:23:30 +0000 (00:23 +0000)]
Auto merge of #26370 - nikomatsakis:better-object-defaults-warn, r=nikomatsakis

This is an implementation of RFC rust-lang/rfcs#1156. It includes the code to implement the new rules, but that code is currently disabled. It also includes code to issue warnings when the change will cause breakage. These warnings try hard to be targeted but are also somewhat approximate. They could, with some effort, be made *more* targeted by adjusting the code in ty_relate that propagates the "will change" flag to consider the specific operation. Might be worth doing.

r? @pnkfelix (I think you understand region inference best)

9 years agoFix some merge conflicts
Niko Matsakis [Wed, 24 Jun 2015 14:17:31 +0000 (10:17 -0400)]
Fix some merge conflicts

9 years agoNow that I made the warning smarter, these tests no longer require modification
Niko Matsakis [Wed, 17 Jun 2015 18:11:58 +0000 (14:11 -0400)]
Now that I made the warning smarter, these tests no longer require modification

9 years agoAdjust tests to silence warnings (or record them, as appropriate).
Niko Matsakis [Wed, 17 Jun 2015 14:12:18 +0000 (10:12 -0400)]
Adjust tests to silence warnings (or record them, as appropriate).

9 years agoAfter inferring regions, scan for any bounds that are due to a lifetime
Niko Matsakis [Wed, 17 Jun 2015 14:08:26 +0000 (10:08 -0400)]
After inferring regions, scan for any bounds that are due to a lifetime
bound that is likely to change. In that case, it will change to 'static,
so then scan down the graph to see whether there are any hard
constraints that would prevent 'static from being a valid value
here. Report a warning.

9 years agoAdd a boolean flag to ExistentialBounds tracking whether the
Niko Matsakis [Wed, 17 Jun 2015 13:11:34 +0000 (09:11 -0400)]
Add a boolean flag to ExistentialBounds tracking whether the
region-bound is expected to change in Rust 1.3, but don't use it for
anything in this commit. Note that this is not a "significant" part of
the type (it's not part of the formal model) so we have to normalize
this away or trans starts to get confused because two equal types wind
up with distinct LLVM types.

9 years agoCode up the new lifetime default rules, but leave them disabled
Niko Matsakis [Wed, 17 Jun 2015 14:02:32 +0000 (10:02 -0400)]
Code up the new lifetime default rules, but leave them disabled
for now.

9 years agoAuto merge of #26378 - arielb1:unused-mut, r=pnkfelix
bors [Fri, 3 Jul 2015 21:31:46 +0000 (21:31 +0000)]
Auto merge of #26378 - arielb1:unused-mut, r=pnkfelix

This makes it somewhat more aggressive, so this is kind-of a [breaking-change] for these compiling with `#[deny(unused_mut)]`.

r? @pnkfelix

9 years agoAuto merge of #26762 - rick68:patch-9, r=alexcrichton
bors [Fri, 3 Jul 2015 19:59:52 +0000 (19:59 +0000)]
Auto merge of #26762 - rick68:patch-9, r=alexcrichton

Remove the tagged attribute `stable` from all private functions.

9 years agoremove some feature gates from the docs
Steve Klabnik [Fri, 3 Jul 2015 19:45:06 +0000 (15:45 -0400)]
remove some feature gates from the docs

These aren't actually needed

9 years agoUpdate atomic.rs
Wei-Ming Yang [Fri, 3 Jul 2015 19:24:25 +0000 (03:24 +0800)]
Update atomic.rs

Remove the tagged attribute `stable` from all private functions

9 years agoAuto merge of #26759 - dotdash:drop_dst, r=pnkfelix
bors [Fri, 3 Jul 2015 13:59:42 +0000 (13:59 +0000)]
Auto merge of #26759 - dotdash:drop_dst, r=pnkfelix

Fixes #26709

9 years agoFix ICE caused by Drop implementations for unsized types
Björn Steinbrink [Fri, 3 Jul 2015 10:19:36 +0000 (12:19 +0200)]
Fix ICE caused by Drop implementations for unsized types

Fixes #26709

9 years agoMYSY2 -> MSYS2
Kagami Sascha Rosylight [Fri, 3 Jul 2015 08:16:13 +0000 (17:16 +0900)]
MYSY2 -> MSYS2

9 years agoAuto merge of #26752 - frewsxcv:patch-25, r=alexcrichton
bors [Fri, 3 Jul 2015 07:13:57 +0000 (07:13 +0000)]
Auto merge of #26752 - frewsxcv:patch-25, r=alexcrichton

9 years agoFix 'Relaaxed' typo in code comment
Corey Farwell [Fri, 3 Jul 2015 07:13:02 +0000 (00:13 -0700)]
Fix 'Relaaxed' typo in code comment

9 years agoAuto merge of #26740 - steveklabnik:gh26737, r=gankro
bors [Fri, 3 Jul 2015 02:32:27 +0000 (02:32 +0000)]
Auto merge of #26740 - steveklabnik:gh26737, r=gankro

Fixes #26737.

9 years agoAuto merge of #26610 - aturon:fix_make_unique, r=alexcrichton
bors [Fri, 3 Jul 2015 01:00:31 +0000 (01:00 +0000)]
Auto merge of #26610 - aturon:fix_make_unique, r=alexcrichton

This commit resolves the race condition in the `get_mut` and
`make_unique` functions, which arose through interaction with weak
pointers. The basic strategy is to "lock" the weak pointer count when
trying to establish uniqueness, by reusing the field as a simple
spinlock. The overhead for normal use of `Arc` is expected to be minimal
-- it will be *none* when only strong pointers are used, and only
requires a move from atomic increment to CAS for usage of weak pointers.

The commit also removes the `unsafe` and deprecated status of these functions.

Closes #24880

r? @alexcrichton

cc @metajack @SimonSapin @Ms2ger

9 years agoAuto merge of #26733 - nhowell:update-jquery, r=steveklabnik
bors [Thu, 2 Jul 2015 23:28:20 +0000 (23:28 +0000)]
Auto merge of #26733 - nhowell:update-jquery, r=steveklabnik

r? @steveklabnik

9 years agoAuto merge of #26725 - tshepang:patch-2, r=bluss
bors [Thu, 2 Jul 2015 21:56:28 +0000 (21:56 +0000)]
Auto merge of #26725 - tshepang:patch-2, r=bluss

9 years agoFix race condition in Arc's get_mut and make_unqiue
Aaron Turon [Fri, 26 Jun 2015 21:32:34 +0000 (14:32 -0700)]
Fix race condition in Arc's get_mut and make_unqiue

This commit resolves the race condition in the `get_mut` and
`make_unique` functions, which arose through interaction with weak
pointers. The basic strategy is to "lock" the weak pointer count when
trying to establish uniqueness, by reusing the field as a simple
spinlock. The overhead for normal use of `Arc` is expected to be minimal
-- it will be *none* when only strong pointers are used, and only
requires a move from atomic increment to CAS for usage of weak pointers.

The commit also removes the `unsafe` and deprecated status of these
functions.

Along the way, the commit also improves several memory orderings, and
adds commentary about why various orderings suffice.

9 years agoAuto merge of #26738 - dotdash:trans_args, r=luqmana
bors [Thu, 2 Jul 2015 20:23:45 +0000 (20:23 +0000)]
Auto merge of #26738 - dotdash:trans_args, r=luqmana

The current split between create_datums_for_fn_args, copy_args_to_allocas and
store_arg involves a detour via rvalue datums which cause additional work in
form of insertvalue/extractvalue pairs for fat pointer arguments, and an extra
alloca and memcpy for tupled args in rust-call functions.

By merging those three functions into just one that actually covers the whole
process of creating the final argument datums, we can skip all that.  Also,
this allows to easily merge in the handling of rust-call functions, allowing to
make create_datum_for_fn_args_under_call_abi obsolete.

cc #26600 -- The insertvalue instructions kicked us off of fast-isel.

9 years agoAuto merge of #26682 - posix4e:netbsd, r=alexcrichton
bors [Thu, 2 Jul 2015 18:50:46 +0000 (18:50 +0000)]
Auto merge of #26682 - posix4e:netbsd, r=alexcrichton

This is dependent on https://github.com/rust-lang/rust-installer/pull/38. Once it is merged we most likely need to update the commit.

9 years agoAdd more description for from_raw_parts's unsafety
Steve Klabnik [Thu, 2 Jul 2015 17:00:58 +0000 (13:00 -0400)]
Add more description for from_raw_parts's unsafety

Fixes #26737.

9 years agorustc_trans: Disable landing pads on 32-bit MSVC
Alex Crichton [Tue, 30 Jun 2015 17:28:24 +0000 (10:28 -0700)]
rustc_trans: Disable landing pads on 32-bit MSVC

This is currently quite buggy in LLVM from what I can tell, so just disable it
entirely. This commit also adds preliminary support, however, to actually
target 32-bit MSVC by making sure the `rust_try_msvc_32.ll` file exists and
wiring up exceptions to `_except_handler3` instead of `__C_specific_handler`
(which doesn't exist on 32-bit).

9 years agowindows: Don't link rust_builtin
Alex Crichton [Wed, 1 Jul 2015 04:55:00 +0000 (21:55 -0700)]
windows: Don't link rust_builtin

This library has no shims which are actually needed on Windows now, so translate
that last easy one into Rust and then don't link it at all on Windows.

9 years agoDirectly construct lvalue datums for function arguments
Björn Steinbrink [Thu, 2 Jul 2015 16:18:22 +0000 (18:18 +0200)]
Directly construct lvalue datums for function arguments

The current split between create_datums_for_fn_args,
copy_args_to_allocas and store_arg involves a detour via rvalue datums
which cause additional work in form of insertvalue/extractvalue pairs
for fat pointer arguments, and an extra alloca and memcpy for tupled
args in rust-call functions.

By merging those three functions into just one that actually covers the
whole process of creating the final argument datums, we can skip all
that. Also, this allows to easily merge in the handling of rust-call
functions, allowing to make create_datum_for_fn_args_under_call_abi
obsolete.

cc #26600 -- The insertvalue instructions kicked us off of fast-isel.

9 years agoAvoid a needless vector copy in type_of_rust_fn
Björn Steinbrink [Thu, 2 Jul 2015 16:16:16 +0000 (18:16 +0200)]
Avoid a needless vector copy in type_of_rust_fn

9 years agoSkip the pointless tupling/untupling of argument types in trans_closure
Björn Steinbrink [Thu, 2 Jul 2015 16:11:24 +0000 (18:11 +0200)]
Skip the pointless tupling/untupling of argument types in trans_closure

The tupling only happens for actual closures, same for the untupling.
The only code that actually sees the tupled types is some debugging
output for which it is actually rather confusing to have the types
tupled, because neither the function signature in Rust nor the
function signature for LLVM has them tupled.

9 years agoAuto merge of #26724 - tshepang:patch-1, r=bluss
bors [Thu, 2 Jul 2015 15:57:30 +0000 (15:57 +0000)]
Auto merge of #26724 - tshepang:patch-1, r=bluss

Also, the info is repeated in the following paragraph

9 years agoAuto merge of #26713 - GuillaumeGomez:patch-3, r=Manishearth
bors [Thu, 2 Jul 2015 14:23:02 +0000 (14:23 +0000)]
Auto merge of #26713 - GuillaumeGomez:patch-3, r=Manishearth

r? @Manishearth

9 years agoAuto merge of #26715 - steveklabnik:gh26497, r=huonw
bors [Thu, 2 Jul 2015 12:28:11 +0000 (12:28 +0000)]
Auto merge of #26715 - steveklabnik:gh26497, r=huonw

Add an example, plus some text that covers the buffering nature of
channels.

Fixes #26497

9 years agoAuto merge of #26712 - GuillaumeGomez:patch-2, r=Manishearth
bors [Thu, 2 Jul 2015 10:51:50 +0000 (10:51 +0000)]
Auto merge of #26712 - GuillaumeGomez:patch-2, r=Manishearth

Part of #24407.
cc @michaelsproul
r? @Manishearth

9 years agoAuto merge of #26727 - remram44:coerceunsized-weak, r=eddyb
bors [Thu, 2 Jul 2015 09:19:27 +0000 (09:19 +0000)]
Auto merge of #26727 - remram44:coerceunsized-weak, r=eddyb

This is a simple addition, shouldn't change behavior.

Fixes #26704

I don't know if the coercion for `Rc` is tested, if it is this probably needs the same test with `Weak`.

9 years agoAuto merge of #26722 - arielb1:log-deadlock, r=eddyb
bors [Thu, 2 Jul 2015 07:47:29 +0000 (07:47 +0000)]
Auto merge of #26722 - arielb1:log-deadlock, r=eddyb

These are RefCell deadlocks that cause the rustc task to die with the stderr
lock held, causing a real deadlock.

Fixes #26717.

r? @eddyb