]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRemove #[start] as well as #[main] in --test
William Throwe [Mon, 24 Aug 2015 18:33:22 +0000 (14:33 -0400)]
Remove #[start] as well as #[main] in --test

Fixes #11766.

8 years agoMove main removal to its own pass in --test mode
William Throwe [Mon, 24 Aug 2015 15:34:04 +0000 (11:34 -0400)]
Move main removal to its own pass in --test mode

This handles the case where the #[main] function is buried deeper in
the ast than we search for #[test] functions.  I'm not sure why one
would want to do that, but since it works in standard compilation it
should also work for tests.

8 years agoMark main-like functions allow(dead_code) in tests
William Throwe [Mon, 24 Aug 2015 01:46:10 +0000 (21:46 -0400)]
Mark main-like functions allow(dead_code) in tests

Fixes #12327.

8 years agoMove entry point identification logic to libsyntax
William Throwe [Sun, 23 Aug 2015 18:12:39 +0000 (14:12 -0400)]
Move entry point identification logic to libsyntax

Identifying entry points will be useful in --test mode, which is
handled in libsyntax.

8 years agoAuto merge of #27239 - apasel422:issue-19102, r=huonw
bors [Mon, 24 Aug 2015 18:43:41 +0000 (18:43 +0000)]
Auto merge of #27239 - apasel422:issue-19102, r=huonw

closes #19102

8 years agoAuto merge of #27976 - sfackler:addrparseerror-error, r=alexcrichton
bors [Mon, 24 Aug 2015 16:00:42 +0000 (16:00 +0000)]
Auto merge of #27976 - sfackler:addrparseerror-error, r=alexcrichton

Closes #27973

8 years agoAdd stability markers for new impls
Steven Fackler [Mon, 24 Aug 2015 15:59:45 +0000 (08:59 -0700)]
Add stability markers for new impls

8 years agoAuto merge of #27857 - Manishearth:improve-fnkind, r=pnkfelix
bors [Mon, 24 Aug 2015 12:47:57 +0000 (12:47 +0000)]
Auto merge of #27857 - Manishearth:improve-fnkind, r=pnkfelix

Since enums are namespaced now, should we also remove the `Fk` prefixes from `FnKind` and remove the reexport? (The reexport must be removed because otherwise it clashes with glob imports containing `ItemFn`). IMO writing `FnKind::Method` is much clearer than `FkMethod`.

8 years agoAuto merge of #27856 - nikomatsakis:move-def-id-to-rustc, r=eddyb
bors [Mon, 24 Aug 2015 10:03:48 +0000 (10:03 +0000)]
Auto merge of #27856 - nikomatsakis:move-def-id-to-rustc, r=eddyb

It doesn't really make sense for DefId to be in libsyntax -- it is concerned with a single crate only. It is the compiler that understands the idea of many crates. (At some point, there might be a useful intermediate point here.) This is a refactoring in support of incr. compilation, which will be adjusting the notion of a DefId to make it more durable across compilations.

This will probably be a [breaking-change] for every plugin ever. You need to adjust things as follows:

    use rustc::middle::def_id::{DefId, LOCAL_CRATE}; // two most common definitions
    ast_util::is_local(def_id) => def_id.is_local()
    ast_util::local_def(node_id) => DefId::local(node_id)

8 years agopurge DEF_ID_DEBUG TLS variable, and just always print a path, since I
Niko Matsakis [Sun, 16 Aug 2015 12:52:36 +0000 (08:52 -0400)]
purge DEF_ID_DEBUG TLS variable, and just always print a path, since I
think it can no longer panic

8 years agoconvert to use `is_local` instead of `== LOCAL_CRATE`
Niko Matsakis [Sun, 16 Aug 2015 13:06:23 +0000 (09:06 -0400)]
convert to use `is_local` instead of `== LOCAL_CRATE`

8 years agofallout from moving def-id
Niko Matsakis [Sun, 16 Aug 2015 10:32:28 +0000 (06:32 -0400)]
fallout from moving def-id

8 years agomove def-id to rustc crate
Niko Matsakis [Sun, 16 Aug 2015 10:31:58 +0000 (06:31 -0400)]
move def-id to rustc crate

8 years agoImplement Error for AddrParseError
Steven Fackler [Mon, 24 Aug 2015 06:00:18 +0000 (23:00 -0700)]
Implement Error for AddrParseError

Closes #27973

8 years agoAuto merge of #27962 - dotdash:overflow, r=alexcrichton
bors [Sun, 23 Aug 2015 21:45:29 +0000 (21:45 +0000)]
Auto merge of #27962 - dotdash:overflow, r=alexcrichton

We're currently possibly introducing an unneeded temporary, make use of
InsertValue which is said to kick us off of FastISel and we generate
loads/stores of first class aggregates, which is bad as well. Let's not
do all these things.

8 years agoAuto merge of #27586 - GuillaumeGomez:patch-2, r=Manishearth
bors [Sun, 23 Aug 2015 20:02:35 +0000 (20:02 +0000)]
Auto merge of #27586 - GuillaumeGomez:patch-2, r=Manishearth

Part of #24407.

This PR doesn't have code example since I didn't find how to raise it. If someone finds a code which does, please say it !

cc @pnkfelix
cc @eddyb
r? @Manishearth

8 years agoAuto merge of #27960 - dotdash:zerosize_lifetime, r=alexcrichton
bors [Sun, 23 Aug 2015 17:23:23 +0000 (17:23 +0000)]
Auto merge of #27960 - dotdash:zerosize_lifetime, r=alexcrichton

These aren't super common, but happen for e.g. closures that have an
empty environment, and for for-loops that return ().

8 years agoAuto merge of #27948 - wthrowe:f64-sqrt, r=alexcrichton
bors [Sun, 23 Aug 2015 15:41:34 +0000 (15:41 +0000)]
Auto merge of #27948 - wthrowe:f64-sqrt, r=alexcrichton

This fixes a reappearance of bug #9987 introduced in
1ddee8070d3cb83609b1f71c29e3deda3d30fd51, which caused
f64::tests::test_sqrt_domain to fail (at least on some systems).

8 years agoAuto merge of #27961 - Manishearth:fix-rustcdatastructures-docs, r=eddyb
bors [Sun, 23 Aug 2015 13:58:54 +0000 (13:58 +0000)]
Auto merge of #27961 - Manishearth:fix-rustcdatastructures-docs, r=eddyb

None

8 years agoImprove codegen for the various "with overflow" intrinsics
Björn Steinbrink [Sun, 23 Aug 2015 13:27:25 +0000 (15:27 +0200)]
Improve codegen for the various "with overflow" intrinsics

We're currently possibly introducing an unneeded temporary, make use of
InsertValue which is said to kick us off of FastISel and we generate
loads/stores of first class aggregates, which is bad as well. Let's not
do all these things.

8 years agoFix panic in docs for librustc_data_structures
Manish Goregaokar [Sun, 23 Aug 2015 12:47:19 +0000 (18:17 +0530)]
Fix panic in docs for librustc_data_structures

8 years agoOmit lifetime intrinsics for zero-sized types
Björn Steinbrink [Sun, 23 Aug 2015 12:38:42 +0000 (14:38 +0200)]
Omit lifetime intrinsics for zero-sized types

These aren't super common, but happen for e.g. closures that have an
empty environment, and for for-loops that return ().

8 years agoAuto merge of #27944 - dotdash:zst_memcpy, r=eddyb
bors [Sun, 23 Aug 2015 12:16:24 +0000 (12:16 +0000)]
Auto merge of #27944 - dotdash:zst_memcpy, r=eddyb

r? @eddyb

8 years agoAuto merge of #27931 - tbu-:pr_liblibc_void, r=alexcrichton
bors [Sun, 23 Aug 2015 09:32:47 +0000 (09:32 +0000)]
Auto merge of #27931 - tbu-:pr_liblibc_void, r=alexcrichton

8 years agoAuto merge of #27927 - DiamondLovesYou:no-asm, r=alexcrichton
bors [Sun, 23 Aug 2015 07:50:06 +0000 (07:50 +0000)]
Auto merge of #27927 - DiamondLovesYou:no-asm, r=alexcrichton

8 years agoAuto merge of #27922 - tshepang:dst-definition, r=alexcrichton
bors [Sun, 23 Aug 2015 06:06:52 +0000 (06:06 +0000)]
Auto merge of #27922 - tshepang:dst-definition, r=alexcrichton

I am not sure this would work... I didn't test.

8 years agoAuto merge of #27919 - Eljay:doc-varargs, r=alexcrichton
bors [Sun, 23 Aug 2015 04:24:35 +0000 (04:24 +0000)]
Auto merge of #27919 - Eljay:doc-varargs, r=alexcrichton

Fixes #27876.

8 years agoAuto merge of #27912 - DiamondLovesYou:backtrace-refactor, r=alexcrichton
bors [Sun, 23 Aug 2015 02:41:01 +0000 (02:41 +0000)]
Auto merge of #27912 - DiamondLovesYou:backtrace-refactor, r=alexcrichton

8 years agoAuto merge of #27947 - steveklabnik:rollup, r=steveklabnik
bors [Sun, 23 Aug 2015 00:57:39 +0000 (00:57 +0000)]
Auto merge of #27947 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #27903, #27904, #27920, #27921, #27924, #27926, #27934, #27935
- Failed merges:

8 years agoFix undefined behavior in f64::sqrt
William Throwe [Sun, 23 Aug 2015 00:06:25 +0000 (20:06 -0400)]
Fix undefined behavior in f64::sqrt

This fixes a reappearance of bug #9987 introduced in
1ddee8070d3cb83609b1f71c29e3deda3d30fd51, which caused
f64::tests::test_sqrt_domain to fail (at least on some systems).

8 years agoRollup merge of #27935 - mbrubeck:cfg-test, r=steveklabnik
Steve Klabnik [Sat, 22 Aug 2015 23:15:44 +0000 (19:15 -0400)]
Rollup merge of #27935 - mbrubeck:cfg-test, r=steveklabnik

r? @steveklabnik

8 years agoRollup merge of #27934 - MatejLach:spacing_fix, r=steveklabnik
Steve Klabnik [Sat, 22 Aug 2015 23:15:44 +0000 (19:15 -0400)]
Rollup merge of #27934 - MatejLach:spacing_fix, r=steveklabnik

r @steveklabnik ?

8 years agoRollup merge of #27926 - durka:emphasize-no-bin-doctest, r=steveklabnik
Steve Klabnik [Sat, 22 Aug 2015 23:15:43 +0000 (19:15 -0400)]
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.

8 years agoRollup merge of #27924 - pornel:bookthreadjoin, r=steveklabnik
Steve Klabnik [Sat, 22 Aug 2015 23:15:43 +0000 (19:15 -0400)]
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.

8 years agoRollup merge of #27921 - tshepang:missing-words, r=steveklabnik
Steve Klabnik [Sat, 22 Aug 2015 23:15:43 +0000 (19:15 -0400)]
Rollup merge of #27921 - tshepang:missing-words, r=steveklabnik

8 years agoRollup merge of #27920 - tshepang:ancient-syntax, r=steveklabnik
Steve Klabnik [Sat, 22 Aug 2015 23:15:43 +0000 (19:15 -0400)]
Rollup merge of #27920 - tshepang:ancient-syntax, r=steveklabnik

8 years agoRollup merge of #27904 - tshepang:nit, r=nikomatsakis
Steve Klabnik [Sat, 22 Aug 2015 23:15:42 +0000 (19:15 -0400)]
Rollup merge of #27904 - tshepang:nit, r=nikomatsakis

8 years agoRollup merge of #27903 - tshepang:improve-example, r=steveklabnik
Steve Klabnik [Sat, 22 Aug 2015 23:15:42 +0000 (19:15 -0400)]
Rollup merge of #27903 - tshepang:improve-example, r=steveklabnik

8 years agoAuto merge of #27915 - SimonSapin:dotted_i, r=alexcrichton
bors [Sat, 22 Aug 2015 23:15:32 +0000 (23:15 +0000)]
Auto merge of #27915 - SimonSapin:dotted_i, r=alexcrichton

I was wrong about Unicode not having such language-independent mapping.

8 years agoadd help for E0390
Manish Goregaokar [Sat, 22 Aug 2015 23:04:44 +0000 (04:34 +0530)]
add help for E0390

8 years agoRemove E0103 long error explanation until we don't know what's going on
Guillaume Gomez [Sat, 22 Aug 2015 23:03:51 +0000 (01:03 +0200)]
Remove E0103 long error explanation until we don't know what's going on

8 years agoImprove error explanation and example in E0390
Guillaume Gomez [Sat, 22 Aug 2015 22:56:44 +0000 (00:56 +0200)]
Improve error explanation and example in E0390

8 years agoAdd tip for E0369
Guillaume Gomez [Sat, 22 Aug 2015 22:52:23 +0000 (00:52 +0200)]
Add tip for E0369

8 years agoAdd example for E0390
Guillaume Gomez [Sat, 22 Aug 2015 22:50:19 +0000 (00:50 +0200)]
Add example for E0390

8 years agoImprove E0323 error explanation
Guillaume Gomez [Sat, 22 Aug 2015 22:38:57 +0000 (00:38 +0200)]
Improve E0323 error explanation

8 years agoFix the Mac build, again.
Richard Diamond [Sat, 22 Aug 2015 21:50:18 +0000 (16:50 -0500)]
Fix the Mac build, again.

8 years agoAuto merge of #27914 - pnkfelix:fix-fcnr-for-valgrind, r=alexcrichton
bors [Sat, 22 Aug 2015 21:33:35 +0000 (21:33 +0000)]
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.)

8 years agoAuto merge of #27896 - alexcrichton:into-raw-os-prelude, r=brson
bors [Sat, 22 Aug 2015 19:38:25 +0000 (19:38 +0000)]
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.

8 years agoAuto merge of #27565 - TimNN:dead-visit-type-in-path, r=nrc
bors [Sat, 22 Aug 2015 17:56:26 +0000 (17:56 +0000)]
Auto merge of #27565 - TimNN:dead-visit-type-in-path, r=nrc

Fixes #23808, passes `make check-stage1` `run-pass` and `run-fail` locally.

8 years agoDon't emit memcpy's for zero-sized types
Björn Steinbrink [Sat, 22 Aug 2015 15:07:37 +0000 (17:07 +0200)]
Don't emit memcpy's for zero-sized types

8 years agoAdd missing imports to `dladdr.rs` for Mac.
Richard Diamond [Sat, 22 Aug 2015 16:52:31 +0000 (11:52 -0500)]
Add missing imports to `dladdr.rs` for Mac.

8 years agoAuto merge of #27913 - birkenfeld:remove_suffix_len, r=alexcrichton
bors [Sat, 22 Aug 2015 16:14:25 +0000 (16:14 +0000)]
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...

8 years agoAuto merge of #27907 - huonw:simd, r=alexcrichton
bors [Sat, 22 Aug 2015 14:28:36 +0000 (14:28 +0000)]
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).

8 years agoAuto merge of #27892 - nikomatsakis:issue-27583, r=pnkfelix
bors [Sat, 22 Aug 2015 11:42:36 +0000 (11:42 +0000)]
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

8 years agoAuto merge of #27871 - alexcrichton:stabilize-libcore, r=aturon
bors [Sat, 22 Aug 2015 09:59:07 +0000 (09:59 +0000)]
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

8 years agoAuto merge of #27860 - m4rw3r:rustdoc_unstable_feature_issue, r=alexcrichton
bors [Sat, 22 Aug 2015 08:16:53 +0000 (08:16 +0000)]
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)

8 years agoAuto merge of #27826 - sfackler:wait-timeout-enum, r=alexcrichton
bors [Sat, 22 Aug 2015 06:30:53 +0000 (06:30 +0000)]
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

8 years agoAuto merge of #27653 - Keruspe:master, r=alexcrichton
bors [Sat, 22 Aug 2015 03:45:14 +0000 (03:45 +0000)]
Auto merge of #27653 - Keruspe:master, r=alexcrichton

8 years agoAdd a `allow_asm` option so virtual ISA based targets (JS/PNaCl/WAsm) can disallow...
Richard Diamond [Thu, 20 Aug 2015 22:47:21 +0000 (17:47 -0500)]
Add a `allow_asm` option so virtual ISA based targets (JS/PNaCl/WAsm) can disallow the asm! macro.

8 years agocompletely aborted comment
Niko Matsakis [Fri, 21 Aug 2015 19:34:10 +0000 (15:34 -0400)]
completely aborted comment

8 years agomove the reverse into the iterator
Niko Matsakis [Fri, 21 Aug 2015 18:47:02 +0000 (14:47 -0400)]
move the reverse into the iterator

8 years agomissed one reference to "best"
Niko Matsakis [Fri, 21 Aug 2015 18:45:25 +0000 (14:45 -0400)]
missed one reference to "best"

8 years agorename `best_upper_bound` to `postdom_upper_bound`
Niko Matsakis [Fri, 21 Aug 2015 18:44:52 +0000 (14:44 -0400)]
rename `best_upper_bound` to `postdom_upper_bound`

8 years agoremove use of swap_remove and compress the list as we go instead
Niko Matsakis [Fri, 21 Aug 2015 18:43:02 +0000 (14:43 -0400)]
remove use of swap_remove and compress the list as we go instead

8 years agonits from pnkfelix
Niko Matsakis [Fri, 21 Aug 2015 18:40:07 +0000 (14:40 -0400)]
nits from pnkfelix

8 years agoAuto merge of #27613 - GSam:binop, r=nrc
bors [Fri, 21 Aug 2015 17:42:19 +0000 (17:42 +0000)]
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

8 years agoInclude cfg(test) in the reference
Matt Brubeck [Fri, 21 Aug 2015 16:54:37 +0000 (09:54 -0700)]
Include cfg(test) in the reference

8 years agofix spacing issue in trpl/documentation doc
Matej Ľach [Fri, 21 Aug 2015 16:10:46 +0000 (17:10 +0100)]
fix spacing issue in trpl/documentation doc

8 years agofix accidental reversal of 'static, and add a test
Niko Matsakis [Fri, 21 Aug 2015 15:44:20 +0000 (11:44 -0400)]
fix accidental reversal of 'static, and add a test

8 years agoadd final test case, correct one of the others (both versions produced
Niko Matsakis [Fri, 21 Aug 2015 14:58:32 +0000 (10:58 -0400)]
add final test case, correct one of the others (both versions produced
same result)

8 years agoadd test cases suggested by pnkfelix
Niko Matsakis [Fri, 21 Aug 2015 14:55:08 +0000 (10:55 -0400)]
add test cases suggested by pnkfelix

8 years agoclarify diagonal arrows
Niko Matsakis [Fri, 21 Aug 2015 14:54:24 +0000 (10:54 -0400)]
clarify diagonal arrows

8 years agoRemove outdated comment and hide variants of `c_void`
Tobias Bucher [Fri, 21 Aug 2015 11:16:52 +0000 (13:16 +0200)]
Remove outdated comment and hide variants of `c_void`

8 years agoAuto merge of #27837 - Gankro:weaknique, r=aturon
bors [Fri, 21 Aug 2015 05:04:32 +0000 (05:04 +0000)]
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).

8 years agoemphasize that doctests don't run in bin crates
Alex Burka [Thu, 20 Aug 2015 22:41:24 +0000 (18:41 -0400)]
emphasize that doctests don't run in bin crates

8 years agoUse handle the same way in similarly structured examples
Kornel Lesiński [Thu, 20 Aug 2015 20:50:20 +0000 (21:50 +0100)]
Use handle the same way in similarly structured examples

8 years agoRefactor unix backtracing. NFC.
Richard Diamond [Thu, 20 Aug 2015 04:55:50 +0000 (23:55 -0500)]
Refactor unix backtracing. NFC.

8 years agobook: add DST to glossary
Tshepang Lekhonkhobe [Thu, 20 Aug 2015 20:05:39 +0000 (22:05 +0200)]
book: add DST to glossary

8 years agonomicon: insert missing words
Tshepang Lekhonkhobe [Thu, 20 Aug 2015 19:37:12 +0000 (21:37 +0200)]
nomicon: insert missing words

8 years agonomicon: use current syntax
Tshepang Lekhonkhobe [Thu, 20 Aug 2015 19:17:20 +0000 (21:17 +0200)]
nomicon: use current syntax

8 years agoShow variadic args in rustdoc output.
Lee Jeffery [Thu, 20 Aug 2015 17:27:53 +0000 (18:27 +0100)]
Show variadic args in rustdoc output.

8 years agoAdd a test for char::to_lowercase mapping to more than one `char`.
Simon Sapin [Thu, 20 Aug 2015 12:38:46 +0000 (14:38 +0200)]
Add a test for char::to_lowercase mapping to more than one `char`.

I was wrong about Unicode not having such language-independent mapping.

8 years agoFix (and extend) src/test/run-pass/foreign-call-no-runtime.rs
Felix S. Klock II [Thu, 20 Aug 2015 11:28:11 +0000 (13:28 +0200)]
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.)

8 years agosyntax: remove suffix_len methods from LitIntTypes
Georg Brandl [Thu, 20 Aug 2015 05:23:15 +0000 (07:23 +0200)]
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.

8 years agoAdd issue numbers
Steven Fackler [Thu, 20 Aug 2015 00:01:19 +0000 (17:01 -0700)]
Add issue numbers

8 years agoTurn TimedOut into a BarrierWaitResult style opaque type
Steven Fackler [Wed, 19 Aug 2015 22:00:11 +0000 (15:00 -0700)]
Turn TimedOut into a BarrierWaitResult style opaque type

8 years agoAdd `TimedOut::timed_out`
Steven Fackler [Sat, 15 Aug 2015 03:35:33 +0000 (20:35 -0700)]
Add `TimedOut::timed_out`

8 years agoMake Condvar::wait_timeout return an enum instead of a bool
Steven Fackler [Fri, 14 Aug 2015 04:58:20 +0000 (21:58 -0700)]
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]

8 years agodon't do deprecations yet
Alexis Beingessner [Wed, 19 Aug 2015 20:04:13 +0000 (13:04 -0700)]
don't do deprecations yet

8 years agofallout of reworking rc and arc APIs
Alexis Beingessner [Fri, 14 Aug 2015 23:53:24 +0000 (16:53 -0700)]
fallout of reworking rc and arc APIs

8 years agoRework Arc for FCP of #27718
Alexis Beingessner [Wed, 12 Aug 2015 21:37:27 +0000 (14:37 -0700)]
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`.

8 years agoRework Rc for FCP of #27718
Alexis Beingessner [Wed, 12 Aug 2015 19:00:46 +0000 (12:00 -0700)]
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`.

8 years agoTweak aarch64 SIMD intrinsics.
Huon Wilson [Wed, 19 Aug 2015 21:21:21 +0000 (14:21 -0700)]
Tweak aarch64 SIMD intrinsics.

The definitions of the rsqrte and recpe had typos, and vqtbl1q is useful
for a benchmark (fannkuch-redux).

8 years agomake these parameters follow idiom
Tshepang Lekhonkhobe [Wed, 19 Aug 2015 17:45:31 +0000 (19:45 +0200)]
make these parameters follow idiom

8 years agodoc: improve transmute example a little
Tshepang Lekhonkhobe [Wed, 19 Aug 2015 17:43:18 +0000 (19:43 +0200)]
doc: improve transmute example a little

8 years agoAuto merge of #27885 - steveklabnik:gh27637, r=alexcrichton
bors [Wed, 19 Aug 2015 17:29:43 +0000 (17:29 +0000)]
Auto merge of #27885 - steveklabnik:gh27637, r=alexcrichton

Hopefully make this distinction a little more clear.

Fixes #27637
r? @alexcrichton /cc @havvy

8 years agorustc_back: add configure options for default linker and ar
Marc-Antoine Perennou [Mon, 10 Aug 2015 23:09:21 +0000 (01:09 +0200)]
rustc_back: add configure options for default linker and ar

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
8 years agoImprove std::io::ErrorKind
Steve Klabnik [Tue, 18 Aug 2015 17:53:32 +0000 (13:53 -0400)]
Improve std::io::ErrorKind

Hopefully make this distinction a little more clear.

Fixes #27637

8 years agoAuto merge of #27677 - sylvestre:issue-27628, r=dotdash
bors [Wed, 19 Aug 2015 11:36:22 +0000 (11:36 +0000)]
Auto merge of #27677 - sylvestre:issue-27628, r=dotdash

8 years agoIssue #27628 - Also support the LLVM 3.6 IR format in two tests
Sylvestre Ledru [Tue, 11 Aug 2015 21:46:32 +0000 (23:46 +0200)]
Issue #27628 - Also support the LLVM 3.6 IR format in two tests