Commit Graph

39287 Commits

Author SHA1 Message Date
bors
e233987ce1 Auto merge of #22860 - Manishearth:rollup, r=alexcrichton
Passes check-stage1, check-stage2
2015-02-27 23:15:17 +00:00
Alex Crichton
bde4c1d6fb Test fixes and rebase conflicts 2015-02-27 15:13:35 -08:00
Alex Crichton
ad14891957 std: Stabilize the env module
Now that the `std::env` module has had some time to bake this commit marks most
of its APIs as `#[stable]`. Some notable APIs that are **not** stable (and still
use the same `env` feature gate) are:

* `{set,get}_exit_status` - there are still questions about whether this is the
  right interface for setting/getting the exit status of a process.
* `page_size` - this may change location in the future or perhaps name as well.

This also effectively closes #22122 as the variants of `VarError` are
`#[stable]` now. (this is done intentionally)
2015-02-27 13:41:49 -08:00
Keegan McAllister
f66a3f7bba Replace MacExpr / MacPat / MacItems with MacEager
MacEager is a MacResult implementation for the common case where you've already
built each form of AST that you might return.

Fixes #17637. Based on #18814.

This is a [breaking-change] for syntax extensions:

  * MacExpr::new becomes MacEager::expr.

  * MacPat::new becomes MacEager::pat.

  * MacItems::new becomes MacEager::items. It takes a SmallVector directly,
    not an iterator.
2015-02-27 11:17:05 -08:00
Kang Seonghoon
ff678ea3f4 std: Fixed backtrace warnings and tests for non-Linux platforms.
- Fixed a couple of dead code warnings in std::sys::backtrace.
- Made `backtrace-debuginfo` test a no-op on non-Linux platforms.
- `backtrace-debuginfo` is no longer tested on pretty-rpass.
2015-02-28 01:42:51 +09:00
Manish Goregaokar
158d99d3f1 Rollup merge of #22844 - pnkfelix:refactor-signalling-of-E0223, r=Aatch
Refactor signaling of E0223 to avoid multiple span_errs for same code.

(Doing this cuts out one diagnostic during the build.)
2015-02-27 22:07:05 +05:30
Felix S. Klock II
9549350b87 Refactor signaling of E0223 to avoid multiple span_errs for same code. 2015-02-27 22:07:05 +05:30
Manish Goregaokar
08360892a0 Rollup merge of #22848 - tshepang:redundant-mention, r=brson 2015-02-27 22:07:04 +05:30
Manish Goregaokar
2651823614 Rollup merge of #22837 - eddyb:issue-21721, r=dotdash
Closes #21721.
2015-02-27 22:07:04 +05:30
Manish Goregaokar
204adc9ab8 Rollup merge of #22836 - mahkoh:testflush, r=huonw
See 41f8b1e89b/src/libtest/lib.rs (L783-L788)
2015-02-27 22:07:04 +05:30
Manish Goregaokar
cf29aa5300 Rollup merge of #22835 - tshepang:remove-some-warnings, r=jakub- 2015-02-27 22:07:04 +05:30
Manish Goregaokar
8c9fe23ff0 Rollup merge of #22833 - laijs:remove-redundant-else-branch, r=dotdash
The branch \"else { continue }\" is the last code inside a loop body,
it is just useless.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
2015-02-27 22:07:03 +05:30
Manish Goregaokar
ce5f1b3216 Rollup merge of #22817 - jmesmon:result-or-type, r=huonw
Changes .or() so that it can return a Result with a different E type
than the one it is called on.

Essentially:

    fn or(self, res: Result<T, E>) -> Result<T, E>

becomes

    fn or<F>(self, res: Result<T, F>) -> Result<T, F>

This brings `or` in line with the existing `and` & `or_else`

This is a
[breaking-change]
Due to some code needing additional type annotations.
2015-02-27 22:07:03 +05:30
Manish Goregaokar
ef80ade406 Rollup merge of #22809 - nikomatsakis:issue-22655-infinite-recursion, r=pnkfelix
Change MarkerTrait to be invariant. This is a (small) loss of expressiveness, but is necessary for now to work around #22806. Fixes #22655.

r? @pnkfelix
2015-02-27 22:07:03 +05:30
Manish Goregaokar
91569a95f1 Rollup merge of #22795 - alexcrichton:issue-22617, r=huonw
Keeps the method consistent with `Iterator::any`.

Closes #22617
[breaking-change]
2015-02-27 22:07:02 +05:30
Manish Goregaokar
fb92e312d9 Rollup merge of #22788 - vadimcn:fix-precise_time_ns, r=pnkfelix
which starts happening after ~2 hours of machine uptime.
Closes #17845
2015-02-27 22:07:02 +05:30
Manish Goregaokar
08c25f37df Rollup merge of #22748 - jxcl:string-backslash, r=steveklabnik
r? @steveklabnik

Closes #22698

I wasn't sure that this was appropriate for the book, but I've added this to the reference. I also noticed that one of the U+ symbols in the character literals section was missing the graves.
2015-02-27 20:37:39 +05:30
Manish Goregaokar
c46fe78c32 Rollup merge of #22732 - jxcl:cargo-new, r=steveklabnik
r? @steveklabnik
2015-02-27 20:37:39 +05:30
Manish Goregaokar
487ee79e3f Rollup merge of #22846 - dhuseby:bitrig-cleanup, r=alexcrichton
This patch contains a couple time fixes to make Rust compile on Bitrig again.  This does not affect OpenBSD.
2015-02-27 20:37:39 +05:30
Manish Goregaokar
d9704bdfdb Rollup merge of #22843 - vhbit:no-jemalloc-fix, r=alexcrichton
"body": null,
2015-02-27 20:37:38 +05:30
Manish Goregaokar
19ab0b9a3c Rollup merge of #22823 - kmcallister:fix-21370, r=huonw
Fixes #21370.

`unused-macro-with-follow-violation.rs` was already handled correctly. That test is just for good measure. :)

I have a more involved plan to clean this up, but it ran into difficulties such as #22814.
2015-02-27 20:37:37 +05:30
Manish Goregaokar
6a97fbab4b Rollup merge of #22818 - pnkfelix:fsk-issue-22536, r=nikomatsakis
Ensure we do not zero when \"moving\" types that are Copy.

Uses more precise `type_needs_drop` for deciding about emitting cleanup code.  Added notes about the weaknesses regarding `ty::type_contents` here.

Fix #22536
2015-02-27 20:37:37 +05:30
Manish Goregaokar
5d4e01766b Rollup merge of #22803 - huonw:field-stability, r=alexcrichton
We were recording stability attributes applied to fields in the
compiler, and even annotating it in the libs, but the compiler didn't
actually do the checks to give errors/warnings in user crates.

Details in the commit messages.
2015-02-27 20:37:36 +05:30
FuGangqiang
05bdfe8e2e remove the call .iter() 2015-02-27 21:57:02 +08:00
Flavio Percoco
b7f9d07f4c Normalize types before collecting obligations
Fixes #22828
Fixes #22629
2015-02-27 14:39:48 +01:00
Kevin Yap
9a4387fbe0 Update expected output of rustc --version
The format of `rustc --version` was changed in #21957.
2015-02-27 03:13:05 -08:00
bors
bd0d8e47e5 Auto merge of #22573 - nwin:impl-debug-rwlock-weak, r=Manishearth
Implements `Debug`  for `RwLock` and `arc::Weak` in the same way it is implemented for `rc::Weak` (basically copy & paste).

The lack of this implementation prevents the automatic implementation of `Debug` for structs containing members of these types.
2015-02-27 10:35:51 +00:00
bors
bd27985457 Auto merge of #22853 - FlaPer87:snap, r=alexcrichton
r? @alexcrichton
 
cc @nikomatsakis @pnkfelix
2015-02-27 07:46:15 +00:00
bors
dd077d5dec Auto merge of #22857 - alexcrichton:net-flaky, r=alexcrichton
Instead of allocating the same ports for ipv4 and ipv6 tests, instead draw all
ports from the same pool. Some tests connect to just "localhost" on a particular
port which may accidentally be interacting with other tests as the ipv-what-ness
isn't specified with the string "localhost"

Relevant logs:

* [Deadlock of the `net::tcp::tests::listen_localhost` test][mac]
* [Failure of the `fast_rebind` test][win1]
* [Failure of `multiple_connect_interleaved_lazy_schedule_ip4`][win2]

[mac]: https://gist.github.com/alexcrichton/349c7ce7c620c1adb2f2
[win1]: https://gist.github.com/alexcrichton/7e3611faae2e1edaee6f
[win2]: https://gist.github.com/alexcrichton/4f5f87749af3ad0f9851
2015-02-27 05:21:05 +00:00
Alex Crichton
c2400bb269 std: Draw from the same port pool during tests
Instead of allocating the same ports for ipv4 and ipv6 tests, instead draw all
ports from the same pool. Some tests connect to just "localhost" on a particular
port which may accidentally be interacting with other tests as the ipv-what-ness
isn't specified with the string "localhost"

Relevant logs:

* [Deadlock of the `net::tcp::tests::listen_localhost` test][mac]
* [Failure of the `fast_rebind` test][win1]
* [Failure of `multiple_connect_interleaved_lazy_schedule_ip4`][win2]

[mac]: https://gist.github.com/alexcrichton/349c7ce7c620c1adb2f2
[win1]: https://gist.github.com/alexcrichton/7e3611faae2e1edaee6f
[win2]: https://gist.github.com/alexcrichton/4f5f87749af3ad0f9851
2015-02-26 19:04:42 -08:00
bors
e5cd6534c1 Auto merge of #22765 - sanxiyn:dedup-rustdoc, r=alexcrichton
rustdoc impl item did not include default methods for local crates, but did include them for external crates. This resulted in duplicate methods. Fix so that impl item does not include default methods for external crates.

Fix #22595.
2015-02-27 02:58:15 +00:00
Huon Wilson
060661d2b4 Add some missing stability attributes on struct fields. 2015-02-27 12:52:43 +11:00
Julian Orth
c9168cca72 libtest: flush output after every write
Useful for debugging tests that hang forever.
2015-02-27 02:36:40 +01:00
Flavio Percoco
9d0d72345d register snapshot 880fb89 2015-02-27 01:48:49 +01:00
bors
b47aebe3fc Auto merge of #22825 - semarie:openbsd-pathbuf, r=alexcrichton
unbreak openbsd/bitrig build after 2d200c9c (the complete build/check on openbsd is in progress)

@dhuseby maybe this one is in your list ?
2015-02-26 23:04:03 +00:00
Tshepang Lekhonkhobe
6b01f7ac05 doc: the last mention of the word 'iterator' is redundant 2015-02-26 23:23:02 +02:00
Dave Huseby
804c071d8b fixing a few bitrig build breakers 2015-02-26 13:03:06 -08:00
Valerii Hiora
d0bb57cfc3 Fixed build with jemalloc disabled 2015-02-26 20:27:53 +02:00
Kang Seonghoon
587f10aa36 Makes the picky tidy satisfied. Also refers to the correct issue. 2015-02-27 01:30:55 +09:00
Kang Seonghoon
3b8f8b8300 Removed an excess feature flag from the backtrace test. 2015-02-27 01:26:06 +09:00
Kang Seonghoon
bdd31b38aa std: Include line numbers in backtraces.
Fixes #20978 for supported platforms (i.e. non-Android POSIX).

This uses `backtrace_pcinfo` to inspect the DWARF debug info
and list the file and line pairs for given stack frame.
Such pair is not unique due to the presence of inlined functions
and the updated routine correctly handles this case.
The code is modelled after libbacktrace's `backtrace_full` routine.

There is one known issue with this approach. Macros, when invoked,
take over the current frame and shadows the file and line pair
which has invoked a macro. In particular, this makes many panicking
macros a bit harder to inspect. This really is a debuginfo problem,
and the backtrace routine should print them correctly with
a correct debuginfo.
2015-02-27 01:12:22 +09:00
bors
a5214e4330 Auto merge of #22715 - edwardw:send-sync-audit, r=alexcrichton
In the process, also replaces two raw mutable pointers with `Unique` to
spell out the ownership semantics.

cc #22709
2015-02-26 15:43:38 +00:00
Seo Sanghyeon
695846331b Add a rustdoc test for default methods in external crates 2015-02-27 00:28:57 +09:00
Seo Sanghyeon
5e1d4fffff Add a way to assert the number of occurrences to htmldocck 2015-02-27 00:27:57 +09:00
Eduard Burtescu
704ce1d735 Revert hacks and add test for LLVM aborts due to empty aggregates.
Closes #21721.
2015-02-26 16:44:07 +02:00
Felix S. Klock II
9a6e3b900f Add doc to core::intrinsics pointing out conservativeness of needs_drop. 2015-02-26 15:12:27 +01:00
Felix S. Klock II
4e334d6141 Regression test for #22536. 2015-02-26 15:12:27 +01:00
Felix S. Klock II
5e4867eef1 Use more precise type_needs_drop for deciding about emitting cleanup code.
Fix #22536
2015-02-26 15:12:26 +01:00
Felix S. Klock II
2d0e6caeec Add push_ctxt instrumentation to all functions that might call base::zero_mem.
(Instrumentation work for Issue 22536.)
2015-02-26 15:12:26 +01:00
Lai Jiangshan
9cdb2568ca remove the redundant else branch
The branch "else { continue }" is the last code inside a loop body,
it is just useless.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
2015-02-26 17:38:21 +08:00