Commit Graph

45789 Commits

Author SHA1 Message Date
Björn Steinbrink
d80ff126bf Rename get_len() to get_meta()
The functions is useful for all kinds of fat pointers, but get_len()
just feels so wrong for trait object fat pointers. Let's use get_meta()
because that's rather neutral.
2015-08-24 23:39:43 +02:00
bors
2375743037 Auto merge of #27931 - tbu-:pr_liblibc_void, r=alexcrichton 2015-08-23 09:32:47 +00:00
bors
54b2eced63 Auto merge of #27927 - DiamondLovesYou:no-asm, r=alexcrichton 2015-08-23 07:50:06 +00:00
bors
d530379df6 Auto merge of #27922 - tshepang:dst-definition, r=alexcrichton
I am not sure this would work... I didn't test.
2015-08-23 06:06:52 +00:00
bors
e617a17369 Auto merge of #27919 - Eljay:doc-varargs, r=alexcrichton
Fixes #27876.
2015-08-23 04:24:35 +00:00
bors
054b7b766c Auto merge of #27912 - DiamondLovesYou:backtrace-refactor, r=alexcrichton 2015-08-23 02:41:01 +00:00
bors
10d69db0a8 Auto merge of #27947 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #27903, #27904, #27920, #27921, #27924, #27926, #27934, #27935
- Failed merges:
2015-08-23 00:57:39 +00:00
Steve Klabnik
17c1d0ce04 Rollup merge of #27935 - mbrubeck:cfg-test, r=steveklabnik
r? @steveklabnik
2015-08-22 19:15:44 -04:00
Steve Klabnik
1b130326b0 Rollup merge of #27934 - MatejLach:spacing_fix, r=steveklabnik
r @steveklabnik ?
2015-08-22 19:15:44 -04:00
Steve Klabnik
fb58dcdbd2 Rollup merge of #27926 - durka:emphasize-no-bin-doctest, r=steveklabnik
It came up twice in quick succession on IRC that rustdoc doesn't run tests in bin crates, and doesn't give any explanation/warning either as to why. I thought it couldn't hurt to emphasize that in the Book.
2015-08-22 19:15:43 -04:00
Steve Klabnik
3677a1feca Rollup merge of #27924 - pornel:bookthreadjoin, r=steveklabnik
The chapter on concurrency has two examples that both start with:

     let something = thread::spawn(…

but the returned values have different types, because the second example has `.join()` at the end of the expression.

I haven't noticed that join at first, and was wondering how is that possible that the result can have `.is_err()` and `.join()` methods.

I've changed the second example to have the same structure as the first, so they're easy to compare.
2015-08-22 19:15:43 -04:00
Steve Klabnik
b3e9615ed4 Rollup merge of #27921 - tshepang:missing-words, r=steveklabnik 2015-08-22 19:15:43 -04:00
Steve Klabnik
16b5f40f92 Rollup merge of #27920 - tshepang:ancient-syntax, r=steveklabnik 2015-08-22 19:15:43 -04:00
Steve Klabnik
de7a3d32ac Rollup merge of #27904 - tshepang:nit, r=nikomatsakis 2015-08-22 19:15:42 -04:00
Steve Klabnik
fb06272ed3 Rollup merge of #27903 - tshepang:improve-example, r=steveklabnik 2015-08-22 19:15:42 -04:00
bors
50ebf76f22 Auto merge of #27915 - SimonSapin:dotted_i, r=alexcrichton
I was wrong about Unicode not having such language-independent mapping.
2015-08-22 23:15:32 +00:00
Richard Diamond
deff8781f1 Fix the Mac build, again. 2015-08-22 16:50:18 -05:00
bors
357ae03cc3 Auto merge of #27914 - pnkfelix:fix-fcnr-for-valgrind, r=alexcrichton
Fix (and extend) src/test/run-pass/foreign-call-no-runtime.rs

While going over various problems signaled by valgrind when running `make check` on a build configured with `--enable-valgrind`, I discovered a bug in this test case.

Namely, the test case was previously creating an `i32` (originally an `int` aka `isize` but then we changed the name and the fallback rules), and then reading from a `*const isize`. Valgrind rightly complains about this, since we are reading an 8 byte value on 64-bit systems, but in principle only 4 bytes have been initialized.

(I wish this was the only valgrind unclean test, but unfortunately there are a bunch more. This was just the easiest/first one that I dissected.)
2015-08-22 21:33:35 +00:00
bors
8278342a87 Auto merge of #27896 - alexcrichton:into-raw-os-prelude, r=brson
These traits were mistakenly left out of the OS-specific prelude modules when
they were added.
2015-08-22 19:38:25 +00:00
bors
4a1fda807e Auto merge of #27565 - TimNN:dead-visit-type-in-path, r=nrc
Fixes #23808, passes `make check-stage1` `run-pass` and `run-fail` locally.
2015-08-22 17:56:26 +00:00
Richard Diamond
6cbef957f6 Add missing imports to dladdr.rs for Mac. 2015-08-22 11:52:31 -05:00
bors
258f3030ab Auto merge of #27913 - birkenfeld:remove_suffix_len, r=alexcrichton
The methods gave wrong results for TyIs and TyUs, whose suffix len
should be 5 nowadays.  But since they were only used for parsing,
and unneeded for that since 606a309d, remove them rather than fixing.

I hope this is ok to do, since all of rustc is considered unstable...
2015-08-22 16:14:25 +00:00
bors
bc4df4ca3f Auto merge of #27907 - huonw:simd, r=alexcrichton
The definitions of the rsqrte and recpe had typos, and vqtbl1q is useful
for a benchmark (fannkuch-redux).
2015-08-22 14:28:36 +00:00
bors
5e5b99f47f Auto merge of #27892 - nikomatsakis:issue-27583, r=pnkfelix
Issue #27583 was caused by the fact that `LUB('a,'b)` yielded `'static`, even if there existed a region `'tcx:'a+'b`. This PR replaces the old very hacky code for computing how free regions relate to one another with something rather more robust. This solves the issue for #27583, though I think that similar bizarro bugs can no doubt arise in other ways -- the root of the problem is that the region-inference code was written in an era when a LUB always existed, but that hasn't held for some time. To *truly* solve this problem, it needs to be generalized to cope with that reality. But let's leave that battle for another day.

r? @aturon
2015-08-22 11:42:36 +00:00
bors
94ee3b5a54 Auto merge of #27871 - alexcrichton:stabilize-libcore, r=aturon
These commits move libcore into a state so that it's ready for stabilization, performing some minor cleanup:

* The primitive modules for integers in the standard library were all removed from the source tree as they were just straight reexports of the libcore variants.
* The `core::atomic` module now lives in `core::sync::atomic`. The `core::sync` module is otherwise empty, but ripe for expansion!
* The `core::prelude::v1` module was stabilized after auditing that it is a subset of the standard library's prelude plus some primitive extension traits (char, str, and slice)
* Some unstable-hacks for float parsing errors were shifted around to not use the same unstable hacks (e.g. the `flt2dec` module is now used for "privacy").


After this commit, the remaining large unstable functionality specific to libcore is:

* `raw`, `intrinsics`, `nonzero`, `array`, `panicking`, `simd` -- these modules are all unstable or not reexported in the standard library, so they're just remaining in the same status quo as before
* `num::Float` - this extension trait for floats needs to be audited for functionality (much of that is happening in #27823)  and may also want to be renamed to `FloatExt` or `F32Ext`/`F64Ext`.
* Should the extension traits for primitives be stabilized in libcore?

I believe other unstable pieces are not isolated to just libcore but also affect the standard library.

cc #27701
2015-08-22 09:59:07 +00:00
bors
e9b74a9017 Auto merge of #27860 - m4rw3r:rustdoc_unstable_feature_issue, r=alexcrichton
Implemented #27759 

Example:

![screen shot 2015-08-16 at 21 45 17](https://cloud.githubusercontent.com/assets/108100/9295040/1fb24d50-4460-11e5-8ab8-81ac5330974a.png)
2015-08-22 08:16:53 +00:00
bors
983d2b3d1a Auto merge of #27826 - sfackler:wait-timeout-enum, r=alexcrichton
Returning a primitive bool results in a somewhat confusing API - does
`true` indicate success - i.e. no timeout, or that a timeout has
occurred? An explicitly named enum makes it clearer.

[breaking-change]

r? @alexcrichton
2015-08-22 06:30:53 +00:00
bors
a03ec1a07a Auto merge of #27653 - Keruspe:master, r=alexcrichton 2015-08-22 03:45:14 +00:00
Richard Diamond
8b70e1e008 Add a allow_asm option so virtual ISA based targets (JS/PNaCl/WAsm) can disallow the asm! macro. 2015-08-21 17:50:39 -05:00
Niko Matsakis
81eab1cab6 completely aborted comment 2015-08-21 15:34:10 -04:00
Niko Matsakis
57909f7068 move the reverse into the iterator 2015-08-21 14:47:40 -04:00
Niko Matsakis
63eedfcf53 missed one reference to "best" 2015-08-21 14:45:25 -04:00
Niko Matsakis
1630c7912f rename best_upper_bound to postdom_upper_bound 2015-08-21 14:44:52 -04:00
Niko Matsakis
a54b91ff5b remove use of swap_remove and compress the list as we go instead 2015-08-21 14:43:02 -04:00
Niko Matsakis
b247402666 nits from pnkfelix 2015-08-21 14:40:07 -04:00
bors
8f1b0aa325 Auto merge of #27613 - GSam:binop, r=nrc
In the case where there are no paren in the AST, the pretty printer doesn't correctly print binary operations where precedence is concerned. Parenthesis may be missing due to some kind of expansion or manipulation of the AST. 

Example:
Pretty printer prints Expr(*, Expr(+, 1, 1), 2) as 1 + 1 * 2, as opposed to (1 + 1) * 2

r? @nrc
2015-08-21 17:42:19 +00:00
Matt Brubeck
59b69d4ae7 Include cfg(test) in the reference 2015-08-21 09:54:58 -07:00
Matej Ľach
bbe10c5c4f fix spacing issue in trpl/documentation doc 2015-08-21 17:10:46 +01:00
Niko Matsakis
10b8941bce fix accidental reversal of 'static, and add a test 2015-08-21 11:44:20 -04:00
Niko Matsakis
aa469a994c add final test case, correct one of the others (both versions produced
same result)
2015-08-21 10:58:32 -04:00
Niko Matsakis
2a25876c58 add test cases suggested by pnkfelix 2015-08-21 10:55:08 -04:00
Niko Matsakis
36809bf260 clarify diagonal arrows 2015-08-21 10:55:04 -04:00
Tobias Bucher
6ef0570a1e Remove outdated comment and hide variants of c_void 2015-08-21 13:16:52 +02:00
bors
b1d07bbe70 Auto merge of #27837 - Gankro:weaknique, r=aturon
This prepares both for the FCP of #27718

Arc:

* Add previously omitted function `Arc::try_unwrap(Self) -> Result<T, Self>`
* Move `arc.downgrade()` to `Arc::downgrade(&Self)` per conventions.
* Deprecate `Arc::weak_count` and `Arc::strong_count` for raciness. It is almost
  impossible to correctly act on these results without a CAS loop on the actual
  fields.
* Rename `Arc::make_unique` to `Arc::make_mut` to avoid uniqueness terminology 
  and to clarify relation to `Arc::get_mut`.
 

Rc:
* Add `Rc::would_unwrap(&Self) -> bool` to introspect whether try_unwrap would succeed, 
  because it's destructive (unlike get_mut).
* Move `rc.downgrade()` to `Rc::downgrade(&Self)` per conventions.
* Deprecate `Rc::weak_count` and `Rc::strong_count` for questionable utility.
* Deprecate `Rc::is_unique` for questionable semantics (there are two kinds of 
  uniqueness with Weak pointers in play).
* Rename `rc.make_unique()` to `Rc::make_mut(&mut Self)` per conventions, to
  avoid uniqueness terminology, and to clarify the relation to `Rc::get_mut`.

Notable omission:

* Arc::would_unwrap is not added due to the fact that it's racy, and therefore doesn't 
  provide much actionable information.

(note: rc_would_unwrap is not proposed for FCP as it is truly experimental)


r? @aturon (careful attention needs to be taken for the new Arc::try_unwrap, but intuitively it should "just work" by virtue of being semantically equivalent to Drop).
2015-08-21 05:04:32 +00:00
Alex Burka
8e6b9b8e93 emphasize that doctests don't run in bin crates 2015-08-20 18:41:24 -04:00
Kornel Lesiński
d112274fcb Use handle the same way in similarly structured examples 2015-08-20 22:12:41 +01:00
Richard Diamond
7925c7972e Refactor unix backtracing. NFC. 2015-08-20 15:20:55 -05:00
Tshepang Lekhonkhobe
9ea001d8e9 book: add DST to glossary 2015-08-20 22:05:39 +02:00
Tshepang Lekhonkhobe
71d654a641 nomicon: insert missing words 2015-08-20 21:37:12 +02:00
Tshepang Lekhonkhobe
a274a64669 nomicon: use current syntax 2015-08-20 21:17:20 +02:00