Commit Graph

45816 Commits

Author SHA1 Message Date
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
Lee Jeffery
90ed188c14 Show variadic args in rustdoc output. 2015-08-20 18:27:53 +01:00
Simon Sapin
961012e983 Add a test for char::to_lowercase mapping to more than one char.
I was wrong about Unicode not having such language-independent mapping.
2015-08-20 14:38:46 +02:00
Felix S. Klock II
2ac5cc4863 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-20 13:28:11 +02:00
Georg Brandl
9d7c84d3b8 syntax: remove suffix_len methods from LitIntTypes
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.
2015-08-20 07:23:29 +02:00
Steven Fackler
12216b7209 Add issue numbers 2015-08-19 17:01:19 -07:00
Steven Fackler
b1c7a46c0d Turn TimedOut into a BarrierWaitResult style opaque type 2015-08-19 17:00:15 -07:00
Steven Fackler
46156de5f1 Add TimedOut::timed_out 2015-08-19 17:00:15 -07:00
Steven Fackler
42a386fcf8 Make Condvar::wait_timeout return an enum instead of a bool
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]
2015-08-19 17:00:15 -07:00
Alexis Beingessner
4c8d75fd9b don't do deprecations yet 2015-08-19 15:52:12 -07:00
Alexis Beingessner
5bbaa3c9ac fallout of reworking rc and arc APIs 2015-08-19 15:52:12 -07:00
Alexis Beingessner
dfa4bca889 Rework Arc for FCP of #27718
* 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`.
2015-08-19 15:52:12 -07:00
Alexis Beingessner
635f7360b6 Rework Rc for FCP of #27718
* 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`.
2015-08-19 15:52:12 -07:00
Huon Wilson
f578735750 Tweak aarch64 SIMD intrinsics.
The definitions of the rsqrte and recpe had typos, and vqtbl1q is useful
for a benchmark (fannkuch-redux).
2015-08-19 14:21:21 -07:00
Tshepang Lekhonkhobe
0eb33fb03f make these parameters follow idiom 2015-08-19 19:45:31 +02:00
Tshepang Lekhonkhobe
b667ff7d6e doc: improve transmute example a little 2015-08-19 19:43:18 +02:00
bors
3a407b6c4e Auto merge of #27885 - steveklabnik:gh27637, r=alexcrichton
Hopefully make this distinction a little more clear.

Fixes #27637 
r? @alexcrichton /cc @havvy
2015-08-19 17:29:43 +00:00
Marc-Antoine Perennou
c977596992 rustc_back: add configure options for default linker and ar
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2015-08-19 18:06:34 +02:00
Steve Klabnik
7c06c5a900 Improve std::io::ErrorKind
Hopefully make this distinction a little more clear.

Fixes #27637
2015-08-19 10:22:18 -04:00
bors
aca2057ed5 Auto merge of #27677 - sylvestre:issue-27628, r=dotdash 2015-08-19 11:36:22 +00:00
Sylvestre Ledru
0fdc4a89f5 Issue #27628 - Also support the LLVM 3.6 IR format in two tests 2015-08-19 12:43:16 +02:00
bors
c8c14f207b Auto merge of #27875 - alexcrichton:msvc-f32-rem, r=nrc
Currently `f32 % f32` will generate a link error on 32-bit MSVC because LLVM
will lower the operation to a call to the nonexistent function `fmodf`. Work
around in this in the backend by lowering to a call to `fmod` instead with
necessary extension/truncation between floats/doubles.

Closes #27859
2015-08-19 07:14:43 +00:00
bors
e47eb7c2c8 Auto merge of #27493 - GSam:master, r=nrc
In order to test the validity of identifiers, exposing the name resolution module is necessary. Other changes mostly comprise of exposing modules publicly like parts of save-analysis, so they can be called appropriately.
2015-08-19 03:50:05 +00:00
bors
7e13faee17 Auto merge of #27849 - jonas-schievink:macro-errors, r=nikomatsakis
And some small indentation/code style fixes in the macro parser.
2015-08-19 00:54:38 +00:00
Alex Crichton
708200c36a std: Add into_raw_os traits to the OS preludes
These traits were mistakenly left out of the OS-specific prelude modules when
they were added.
2015-08-18 17:23:45 -07:00
bors
4c1daeb7ad Auto merge of #27850 - alexcrichton:fix-musl, r=brson
Some new allocator tests require dynamic libraries to run the full test, but
dylibs aren't currently working on MUSL.
2015-08-18 23:20:52 +00:00
bors
2fb3fb24a3 Auto merge of #27836 - alexcrichton:rename-cstring-raw, r=bluss
This commit renames the `CString::{into_ptr, from_ptr}` methods to `into_raw`
and `from_raw` to mirror the corresponding methods on `Box` and the naming of
"raw" for `from_raw_parts` on slices and vectors.

cc #27769
2015-08-18 21:47:06 +00:00
Niko Matsakis
d5b679b23d add a regression test for #27583. Fixes #27583. 2015-08-18 17:44:01 -04:00
Niko Matsakis
dcf6f08138 kill the old funky can_reach fn 2015-08-18 17:41:46 -04:00
Niko Matsakis
4b1d3b7036 rewrite free_region/region_inference to use newly minted
`TransitiveRelation`
2015-08-18 17:41:20 -04:00