Commit Graph

44553 Commits

Author SHA1 Message Date
Eduard Burtescu
fe354e58bd rustc: remove unused MethodStaticClosure variant of MethodOrigin. 2015-07-04 06:21:00 +03:00
bors
f9274d63a3 Auto merge of #26754 - SaschaNaz:patch-1, r=steveklabnik 2015-07-04 03:19:07 +00:00
bors
50c952b5b7 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)
2015-07-04 00:23:30 +00:00
Niko Matsakis
db5f3bc65c Fix some merge conflicts 2015-07-03 19:42:55 -04:00
Niko Matsakis
65a456df43 Now that I made the warning smarter, these tests no longer require modification 2015-07-03 19:42:35 -04:00
Niko Matsakis
18e9007ac2 Adjust tests to silence warnings (or record them, as appropriate). 2015-07-03 19:42:35 -04:00
Niko Matsakis
1e7a6b880c 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.
2015-07-03 19:42:35 -04:00
Niko Matsakis
909957793e 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.
2015-07-03 19:42:35 -04:00
Niko Matsakis
ef85338175 Code up the new lifetime default rules, but leave them disabled
for now.
2015-07-03 19:42:35 -04:00
bors
f027bdc1c8 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
2015-07-03 21:31:46 +00:00
bors
7b148381c7 Auto merge of #26762 - rick68:patch-9, r=alexcrichton
Remove the tagged attribute `stable` from all private functions.
2015-07-03 19:59:52 +00:00
Steve Klabnik
66f757b26d remove some feature gates from the docs
These aren't actually needed
2015-07-03 15:45:06 -04:00
Wei-Ming Yang
409fc2f605 Update atomic.rs
Remove the tagged attribute `stable` from all private functions
2015-07-04 03:24:25 +08:00
bors
320bd6f874 Auto merge of #26759 - dotdash:drop_dst, r=pnkfelix
Fixes #26709
2015-07-03 13:59:42 +00:00
Björn Steinbrink
eaeede2126 Fix ICE caused by Drop implementations for unsized types
Fixes #26709
2015-07-03 14:44:51 +02:00
Kagami Sascha Rosylight
f24089cfd1 MYSY2 -> MSYS2 2015-07-03 17:16:13 +09:00
bors
f3b97a74aa Auto merge of #26752 - frewsxcv:patch-25, r=alexcrichton 2015-07-03 07:13:57 +00:00
Corey Farwell
e2b6b02e3a Fix 'Relaaxed' typo in code comment 2015-07-03 00:13:02 -07:00
Nick Cameron
f3ba950a34 Refactor how the parser looks for sub-modules
This makes the functionality usable from outside the parser
2015-07-03 17:29:24 +12:00
bors
4c246ecb64 Auto merge of #26740 - steveklabnik:gh26737, r=gankro
Fixes #26737.
2015-07-03 02:32:27 +00:00
bors
4a217759ad 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
2015-07-03 01:00:31 +00:00
bors
f234a6beaa Auto merge of #26733 - nhowell:update-jquery, r=steveklabnik
r? @steveklabnik
2015-07-02 23:28:20 +00:00
bors
d1e31f396c Auto merge of #26725 - tshepang:patch-2, r=bluss 2015-07-02 21:56:28 +00:00
Aaron Turon
d77c4b0fa6 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.
2015-07-02 13:58:38 -07:00
bors
b4abed6476 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.
2015-07-02 20:23:45 +00:00
bors
fb379ef05c 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.
2015-07-02 18:50:46 +00:00
Steve Klabnik
57eed53041 Add more description for from_raw_parts's unsafety
Fixes #26737.
2015-07-02 14:05:57 -04:00
Alex Crichton
3e26e56a79 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).
2015-07-02 10:45:13 -07:00
Alex Crichton
83ee47b054 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.
2015-07-02 10:44:40 -07:00
Björn Steinbrink
a04784f7f9 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.
2015-07-02 18:34:58 +02:00
Björn Steinbrink
6b5edd24f5 Avoid a needless vector copy in type_of_rust_fn 2015-07-02 18:34:57 +02:00
Björn Steinbrink
95c08e3787 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.
2015-07-02 18:34:54 +02:00
bors
6809481896 Auto merge of #26724 - tshepang:patch-1, r=bluss
Also, the info is repeated in the following paragraph
2015-07-02 15:57:30 +00:00
bors
50cb22f8e0 Auto merge of #26713 - GuillaumeGomez:patch-3, r=Manishearth
r? @Manishearth
2015-07-02 14:23:02 +00:00
bors
71a6441361 Auto merge of #26715 - steveklabnik:gh26497, r=huonw
Add an example, plus some text that covers the buffering nature of
channels.

Fixes #26497
2015-07-02 12:28:11 +00:00
bors
99ca63fbd8 Auto merge of #26712 - GuillaumeGomez:patch-2, r=Manishearth
Part of #24407.
cc @michaelsproul
r? @Manishearth
2015-07-02 10:51:50 +00:00
bors
c4b4f07592 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`.
2015-07-02 09:19:27 +00:00
bors
f635b2f0ad 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
2015-07-02 07:47:29 +00:00
bors
969d6caaa1 Auto merge of #26718 - nham:test-8640, r=alexcrichton
This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR https://github.com/rust-lang/rust/pull/19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.

Closes #8640.
2015-07-02 06:14:54 +00:00
bors
dd8fee0ae6 Auto merge of #26691 - nrc:mem, r=alexcrichton
Reports the resident set size after each pass (linux-only).

r? @huonw or @alexcrichton
2015-07-02 04:42:50 +00:00
Nick Howell
b51aea3256 rustdoc: Update jQuery from 2.1.0 to 2.1.4 2015-07-01 23:54:55 -04:00
Nick Howell
36882a0007 rustdoc: Reset the title when pressing the back button
Fixes #26673
2015-07-01 23:28:54 -04:00
bors
560b1dab15 Auto merge of #26677 - jroesch:fulfillment-context-refactor, r=nrc
This patch implements the next chunk of flattening out the type checking context. In a series of patches I moved around the necessary state and logic in order to delete the `Typer` and `ClosureTyper` traits. My next goal is to clean the interfaces and start to move the normalization code behind them.

r? @nrc I hope my PR is coherent, doing this too late at night ;)
2015-07-02 03:10:25 +00:00
Jared Roesch
c64bda3227 Update librustc_driver/test.rs 2015-07-01 19:29:17 -07:00
Alex Newman
0b7c4f57f6 Add netbsd amd64 support 2015-07-01 19:09:14 -07:00
bors
1768b1090a Auto merge of #26688 - nrc:map-parent-2, r=manishearth
r? @Manishearth
2015-07-02 01:40:28 +00:00
Remi Rampin
3278e793b2 Implement CoerceUnsized for arc::Weak 2015-07-01 17:58:05 -04:00
Remi Rampin
50421827ae Add test to dst-coerce-rc.rs 2015-07-01 17:54:54 -04:00
Nick Cameron
7713e141b7 Report memory use in time-passes
Reports the resident set size after each pass (linux-only).
2015-07-02 09:36:32 +12:00
Tshepang Lekhonkhobe
b643a0b679 doc: add missing space 2015-07-01 23:08:50 +02:00