]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agounbreak dragonfly build after nacl integration
Sébastien Marie [Sun, 1 Mar 2015 15:03:28 +0000 (16:03 +0100)]
unbreak dragonfly build after nacl integration

this is the same problem as openbsd (#22792).

without the patch, liblibc don't build.

9 years agoAuto merge of #22896 - Ms2ger:InlineAttr, r=huonw
bors [Sun, 1 Mar 2015 01:39:07 +0000 (01:39 +0000)]
Auto merge of #22896 - Ms2ger:InlineAttr, r=huonw

9 years agoAuto merge of #21521 - defuz:interval-with-path, r=pnkfelix
bors [Sat, 28 Feb 2015 18:36:00 +0000 (18:36 +0000)]
Auto merge of #21521 - defuz:interval-with-path, r=pnkfelix

Fixing #21475. Right now this code can not be parsed:

```rust
use m::{START, END};

fn main() {
    match 42u32 {
        m::START...m::END => {}, // error: expected one of `::`, `=>`, or `|`, found `...`
        _  => {},
    }
}

mod m {
  pub const START: u32 = 4;
  pub const END:   u32 = 14;
}
```

I fixed the parser and added test for this case, but now there are still problems with mixing literals and paths in interval:

```rust
    match 42u32 {
        0u32...m::END => {},       // mismatched types in range [E0031]
        m::START...59u32 => {},    // mismatched types in range [E0031]
        _  => {},
    }
}
```

I'll try fix this problem and need review.

9 years agoAuto merge of #22895 - Manishearth:rollup, r=Manishearth
bors [Sat, 28 Feb 2015 13:49:35 +0000 (13:49 +0000)]
Auto merge of #22895 - Manishearth:rollup, r=Manishearth

r? @Manishearth

9 years agoRollup merge of #22867 - FuGangqiang:master, r=steveklabnik
Manish Goregaokar [Sat, 28 Feb 2015 08:29:47 +0000 (13:59 +0530)]
Rollup merge of #22867 - FuGangqiang:master, r=steveklabnik

9 years agoRollup merge of #22887 - JP-Ellis:master, r=huonw
Manish Goregaokar [Sat, 28 Feb 2015 08:27:08 +0000 (13:57 +0530)]
Rollup merge of #22887 - JP-Ellis:master, r=huonw

 Updated the function to allow comparisons between different types since PartialOrd and PartialEq allow this.

9 years agoRollup merge of #22866 - iKevinY:version-output-doc-fix, r=Manishearth
Manish Goregaokar [Sat, 28 Feb 2015 08:27:00 +0000 (13:57 +0530)]
Rollup merge of #22866 - iKevinY:version-output-doc-fix, r=Manishearth

 The format of `rustc --version` was changed in #21957; this PR updates TRPL accordingly.

9 years agoRollup merge of #22884 - japaric:obsolete, r=alexcrichton
Manish Goregaokar [Sat, 28 Feb 2015 08:26:29 +0000 (13:56 +0530)]
Rollup merge of #22884 - japaric:obsolete, r=alexcrichton

 This is leftover from #21843

If you still have `|&:| {}` closures in your code, simply remove the `&:` part.

[breaking-change]

9 years agoRollup merge of #22875 - kmcallister:maceager, r=sfackler
Manish Goregaokar [Sat, 28 Feb 2015 08:26:15 +0000 (13:56 +0530)]
Rollup merge of #22875 - kmcallister:maceager, r=sfackler

 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.

r? @sfackler

9 years agoRollup merge of #22869 - alexcrichton:stabilize-env, r=aturon
Manish Goregaokar [Sat, 28 Feb 2015 08:25:55 +0000 (13:55 +0530)]
Rollup merge of #22869 - alexcrichton:stabilize-env, r=aturon

 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)

9 years agoRemove the re-exports for InlineAttr variants.
Ms2ger [Sat, 28 Feb 2015 12:56:32 +0000 (13:56 +0100)]
Remove the re-exports for InlineAttr variants.

9 years agoAuto merge of #22851 - FlaPer87:oibit-send-and-friends, r=nikomatsakis
bors [Sat, 28 Feb 2015 11:02:32 +0000 (11:02 +0000)]
Auto merge of #22851 - FlaPer87:oibit-send-and-friends, r=nikomatsakis

Fixes #22828
Fixes #22629

r? @nikomatsakis

9 years agoFIX #21475: Expr_::ExprPath with two fields
defuz [Sat, 28 Feb 2015 09:01:28 +0000 (11:01 +0200)]
FIX #21475: Expr_::ExprPath with two fields

9 years agoFIX #21475: mixing literals and paths in interval
defuz [Wed, 18 Feb 2015 18:21:32 +0000 (20:21 +0200)]
FIX #21475: mixing literals and paths in interval

9 years agoFIX #21475: Interval match patterns won't parse namespace specifiers correctly
defuz [Thu, 22 Jan 2015 19:56:27 +0000 (21:56 +0200)]
FIX #21475: Interval match patterns won't parse namespace specifiers correctly

9 years agoAuto merge of #22839 - lifthrasiir:better-backtrace, r=alexcrichton
bors [Sat, 28 Feb 2015 08:30:19 +0000 (08:30 +0000)]
Auto merge of #22839 - lifthrasiir:better-backtrace, r=alexcrichton

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.

Some example trace:

```
thread '<main>' panicked at 'explicit panic', /home/arachneng/Works/git/rust/src/test/run-pass/backtrace-debuginfo.rs:74
stack backtrace:
   1:         0xd964702f - sys::backtrace::write::h32d93fffb64131b2yxC
   2:         0xd9670202 - panicking::on_panic::h3a4fcb37b873aefeooM
   3:         0xd95b396a - rt::unwind::begin_unwind_inner::h576b3df5f626902dJ2L
   4:         0xd9eb88df - rt::unwind::begin_unwind::h16852273847167740350
   5:         0xd9eb8afb - aux::callback::h15056955655605709172
                        at /home/arachneng/Works/git/rust/<std macros>:3
                        at src/test/run-pass/backtrace-debuginfo-aux.rs:15
   6:         0xd9eb8caa - outer::h2cf96412459fceb6ema
                        at src/test/run-pass/backtrace-debuginfo.rs:73
                        at src/test/run-pass/backtrace-debuginfo.rs:88
   7:         0xd9ebab24 - main::h3f701287441442edasa
                        at src/test/run-pass/backtrace-debuginfo.rs:134
   8:         0xd96daba8 - rust_try_inner
   9:         0xd96dab95 - rust_try
  10:         0xd9671af4 - rt::lang_start::h7da0de9529b4c394liM
  11:         0xd8f3aec4 - __libc_start_main
  12:         0xd9eb8148 - <unknown>
  13:         0xffffffff - <unknown>
```

9 years agoAuto merge of #22801 - huonw:crateify-lint, r=kmcallister
bors [Sat, 28 Feb 2015 06:06:18 +0000 (06:06 +0000)]
Auto merge of #22801 - huonw:crateify-lint, r=kmcallister

This pulls out the implementations of most built-in lints into a
separate crate, to reduce edit-compile-test iteration times with
librustc_lint and increase parallelism. This should enable lints to be
refactored, added and deleted much more easily as it slashes the
edit-compile cycle to get a minimal working compiler to test with (`make
rustc-stage1`) from

    librustc -> librustc_typeck -> ... -> librustc_driver ->
        libcore -> ... -> libstd

to

    librustc_lint -> librustc_driver -> libcore -> ... libstd

which is significantly faster, mainly due to avoiding the librustc build
itself.

The intention would be to move as much as possible of the infrastructure
into the crate too, but the plumbing is deeply intertwined with librustc
itself at the moment. Also, there are lints for which diagnostics are
registered directly in the compiler code, not in their own crate
traversal, and their definitions have to remain in librustc.

This is a [breaking-change] for direct users of the compiler APIs:
callers of `rustc::session::build_session` or
`rustc::session::build_session_` need to manually call
`rustc_lint::register_builtins` on their return value.

This should make #22206 easier.

9 years agoremove leftover annotations
Jorge Aparicio [Sat, 28 Feb 2015 02:21:09 +0000 (21:21 -0500)]
remove leftover annotations

9 years agoUpdate docs for rustc_lint crateification.
Huon Wilson [Wed, 25 Feb 2015 12:03:44 +0000 (23:03 +1100)]
Update docs for rustc_lint crateification.

9 years agoSeparate most of rustc::lint::builtin into a separate crate.
Huon Wilson [Wed, 25 Feb 2015 11:44:44 +0000 (22:44 +1100)]
Separate most of rustc::lint::builtin into a separate crate.

This pulls out the implementations of most built-in lints into a
separate crate, to reduce edit-compile-test iteration times with
librustc_lint and increase parallelism. This should enable lints to be
refactored, added and deleted much more easily as it slashes the
edit-compile cycle to get a minimal working compiler to test with (`make
rustc-stage1`) from

    librustc -> librustc_typeck -> ... -> librustc_driver ->
        libcore -> ... -> libstd

to

    librustc_lint -> librustc_driver -> libcore -> ... libstd

which is significantly faster, mainly due to avoiding the librustc build
itself.

The intention would be to move as much as possible of the infrastructure
into the crate too, but the plumbing is deeply intertwined with librustc
itself at the moment. Also, there are lints for which diagnostics are
registered directly in the compiler code, not in their own crate
traversal, and their definitions have to remain in librustc.

This is a [breaking-change] for direct users of the compiler APIs:
callers of `rustc::session::build_session` or
`rustc::session::build_session_` need to manually call
`rustc_lint::register_builtins` on their return value.

This should make #22206 easier.

9 years agoAuto merge of #22669 - dotdash:fast_slice_iter, r=huonw
bors [Sat, 28 Feb 2015 03:37:20 +0000 (03:37 +0000)]
Auto merge of #22669 - dotdash:fast_slice_iter, r=huonw

This adds the assume() calls back that got lost when rebasing #21886.

9 years agoUpdate iter::order to be more generic.
JP-Ellis [Sat, 28 Feb 2015 03:29:54 +0000 (14:29 +1100)]
Update iter::order to be more generic.

Signed-off-by: JP-Ellis <coujellis@gmail.com>
9 years agoobsolete `|&:|` syntax
Jorge Aparicio [Sat, 28 Feb 2015 01:58:26 +0000 (20:58 -0500)]
obsolete `|&:|` syntax

closes #22881

9 years agochange to iterate over &vet
FuGangqiang [Sat, 28 Feb 2015 01:59:52 +0000 (09:59 +0800)]
change to iterate over &vet

9 years agoAuto merge of #22860 - Manishearth:rollup, r=alexcrichton
bors [Fri, 27 Feb 2015 23:15:17 +0000 (23:15 +0000)]
Auto merge of #22860 - Manishearth:rollup, r=alexcrichton

Passes check-stage1, check-stage2

9 years agoTest fixes and rebase conflicts
Alex Crichton [Fri, 27 Feb 2015 23:13:35 +0000 (15:13 -0800)]
Test fixes and rebase conflicts

9 years agostd: Stabilize the `env` module
Alex Crichton [Fri, 27 Feb 2015 18:59:59 +0000 (10:59 -0800)]
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)

9 years agoReplace MacExpr / MacPat / MacItems with MacEager
Keegan McAllister [Fri, 27 Feb 2015 19:14:42 +0000 (11:14 -0800)]
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.

9 years agostd: Fixed backtrace warnings and tests for non-Linux platforms.
Kang Seonghoon [Fri, 27 Feb 2015 16:42:51 +0000 (01:42 +0900)]
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.

9 years agoRollup merge of #22844 - pnkfelix:refactor-signalling-of-E0223, r=Aatch
Manish Goregaokar [Fri, 27 Feb 2015 06:23:02 +0000 (11:53 +0530)]
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.)

9 years agoRefactor signaling of E0223 to avoid multiple span_errs for same code.
Felix S. Klock II [Thu, 26 Feb 2015 18:15:57 +0000 (19:15 +0100)]
Refactor signaling of E0223 to avoid multiple span_errs for same code.

9 years agoRollup merge of #22848 - tshepang:redundant-mention, r=brson
Manish Goregaokar [Fri, 27 Feb 2015 06:15:09 +0000 (11:45 +0530)]
Rollup merge of #22848 - tshepang:redundant-mention, r=brson

9 years agoRollup merge of #22837 - eddyb:issue-21721, r=dotdash
Manish Goregaokar [Fri, 27 Feb 2015 06:14:59 +0000 (11:44 +0530)]
Rollup merge of #22837 - eddyb:issue-21721, r=dotdash

 Closes #21721.

9 years agoRollup merge of #22836 - mahkoh:testflush, r=huonw
Manish Goregaokar [Fri, 27 Feb 2015 06:14:40 +0000 (11:44 +0530)]
Rollup merge of #22836 - mahkoh:testflush, r=huonw

 See https://github.com/rust-lang/rust/blob/41f8b1e89b5ca0c79d7bca782ca44085624d4564/src/libtest/lib.rs#L783-L788

9 years agoRollup merge of #22835 - tshepang:remove-some-warnings, r=jakub-
Manish Goregaokar [Fri, 27 Feb 2015 06:14:33 +0000 (11:44 +0530)]
Rollup merge of #22835 - tshepang:remove-some-warnings, r=jakub-

9 years agoRollup merge of #22833 - laijs:remove-redundant-else-branch, r=dotdash
Manish Goregaokar [Fri, 27 Feb 2015 06:14:25 +0000 (11:44 +0530)]
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>
9 years agoRollup merge of #22817 - jmesmon:result-or-type, r=huonw
Manish Goregaokar [Fri, 27 Feb 2015 06:14:19 +0000 (11:44 +0530)]
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.

9 years agoRollup merge of #22809 - nikomatsakis:issue-22655-infinite-recursion, r=pnkfelix
Manish Goregaokar [Fri, 27 Feb 2015 06:14:12 +0000 (11:44 +0530)]
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

9 years agoRollup merge of #22795 - alexcrichton:issue-22617, r=huonw
Manish Goregaokar [Fri, 27 Feb 2015 06:13:57 +0000 (11:43 +0530)]
Rollup merge of #22795 - alexcrichton:issue-22617, r=huonw

 Keeps the method consistent with `Iterator::any`.

Closes #22617
[breaking-change]

9 years agoRollup merge of #22788 - vadimcn:fix-precise_time_ns, r=pnkfelix
Manish Goregaokar [Fri, 27 Feb 2015 06:13:51 +0000 (11:43 +0530)]
Rollup merge of #22788 - vadimcn:fix-precise_time_ns, r=pnkfelix

 which starts happening after ~2 hours of machine uptime.
Closes #17845

9 years agoRollup merge of #22748 - jxcl:string-backslash, r=steveklabnik
Manish Goregaokar [Fri, 27 Feb 2015 06:13:24 +0000 (11:43 +0530)]
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.

9 years agoRollup merge of #22732 - jxcl:cargo-new, r=steveklabnik
Manish Goregaokar [Fri, 27 Feb 2015 06:13:17 +0000 (11:43 +0530)]
Rollup merge of #22732 - jxcl:cargo-new, r=steveklabnik

 r? @steveklabnik

9 years agoRollup merge of #22846 - dhuseby:bitrig-cleanup, r=alexcrichton
Manish Goregaokar [Fri, 27 Feb 2015 06:13:09 +0000 (11:43 +0530)]
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.

9 years agoRollup merge of #22843 - vhbit:no-jemalloc-fix, r=alexcrichton
Manish Goregaokar [Fri, 27 Feb 2015 06:13:00 +0000 (11:43 +0530)]
Rollup merge of #22843 - vhbit:no-jemalloc-fix, r=alexcrichton

   "body": null,

9 years agoRollup merge of #22823 - kmcallister:fix-21370, r=huonw
Manish Goregaokar [Fri, 27 Feb 2015 06:12:40 +0000 (11:42 +0530)]
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.

9 years agoRollup merge of #22818 - pnkfelix:fsk-issue-22536, r=nikomatsakis
Manish Goregaokar [Fri, 27 Feb 2015 06:12:35 +0000 (11:42 +0530)]
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

9 years agoRollup merge of #22803 - huonw:field-stability, r=alexcrichton
Manish Goregaokar [Fri, 27 Feb 2015 06:12:29 +0000 (11:42 +0530)]
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.

9 years agoremove the call `.iter()`
FuGangqiang [Fri, 27 Feb 2015 13:57:02 +0000 (21:57 +0800)]
remove the call `.iter()`

9 years agoNormalize types before collecting obligations
Flavio Percoco [Fri, 27 Feb 2015 00:13:31 +0000 (01:13 +0100)]
Normalize types before collecting obligations

Fixes #22828
Fixes #22629

9 years agoUpdate expected output of `rustc --version`
Kevin Yap [Fri, 27 Feb 2015 11:13:05 +0000 (03:13 -0800)]
Update expected output of `rustc --version`

The format of `rustc --version` was changed in #21957.

9 years agoAuto merge of #22573 - nwin:impl-debug-rwlock-weak, r=Manishearth
bors [Fri, 27 Feb 2015 10:35:51 +0000 (10:35 +0000)]
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.

9 years agoAuto merge of #22853 - FlaPer87:snap, r=alexcrichton
bors [Fri, 27 Feb 2015 07:46:15 +0000 (07:46 +0000)]
Auto merge of #22853 - FlaPer87:snap, r=alexcrichton

r? @alexcrichton

cc @nikomatsakis @pnkfelix

9 years agoAuto merge of #22857 - alexcrichton:net-flaky, r=alexcrichton
bors [Fri, 27 Feb 2015 05:21:05 +0000 (05:21 +0000)]
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

9 years agostd: Draw from the same port pool during tests
Alex Crichton [Fri, 27 Feb 2015 03:04:42 +0000 (19:04 -0800)]
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

9 years agoAuto merge of #22765 - sanxiyn:dedup-rustdoc, r=alexcrichton
bors [Fri, 27 Feb 2015 02:58:15 +0000 (02:58 +0000)]
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.

9 years agoAdd some missing stability attributes on struct fields.
Huon Wilson [Wed, 25 Feb 2015 12:12:22 +0000 (23:12 +1100)]
Add some missing stability attributes on struct fields.

9 years agolibtest: flush output after every write
Julian Orth [Thu, 26 Feb 2015 14:31:24 +0000 (15:31 +0100)]
libtest: flush output after every write

Useful for debugging tests that hang forever.

9 years agoregister snapshot 880fb89
Flavio Percoco [Wed, 25 Feb 2015 12:48:53 +0000 (13:48 +0100)]
register snapshot 880fb89

9 years agoAuto merge of #22825 - semarie:openbsd-pathbuf, r=alexcrichton
bors [Thu, 26 Feb 2015 23:04:03 +0000 (23:04 +0000)]
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 ?

9 years agodoc: the last mention of the word 'iterator' is redundant
Tshepang Lekhonkhobe [Thu, 26 Feb 2015 21:22:15 +0000 (23:22 +0200)]
doc: the last mention of the word 'iterator' is redundant

9 years agofixing a few bitrig build breakers
Dave Huseby [Thu, 26 Feb 2015 21:03:06 +0000 (13:03 -0800)]
fixing a few bitrig build breakers

9 years agoFixed build with jemalloc disabled
Valerii Hiora [Thu, 26 Feb 2015 12:17:28 +0000 (14:17 +0200)]
Fixed build with jemalloc disabled

9 years agoMakes the picky tidy satisfied. Also refers to the correct issue.
Kang Seonghoon [Thu, 26 Feb 2015 16:30:55 +0000 (01:30 +0900)]
Makes the picky tidy satisfied. Also refers to the correct issue.

9 years agoRemoved an excess feature flag from the backtrace test.
Kang Seonghoon [Thu, 26 Feb 2015 16:26:06 +0000 (01:26 +0900)]
Removed an excess feature flag from the backtrace test.

9 years agostd: Include line numbers in backtraces.
Kang Seonghoon [Thu, 26 Feb 2015 16:12:22 +0000 (01:12 +0900)]
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.

9 years agoAuto merge of #22715 - edwardw:send-sync-audit, r=alexcrichton
bors [Thu, 26 Feb 2015 15:43:38 +0000 (15:43 +0000)]
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

9 years agoAdd a rustdoc test for default methods in external crates
Seo Sanghyeon [Thu, 26 Feb 2015 15:28:57 +0000 (00:28 +0900)]
Add a rustdoc test for default methods in external crates

9 years agoAdd a way to assert the number of occurrences to htmldocck
Seo Sanghyeon [Thu, 26 Feb 2015 15:27:57 +0000 (00:27 +0900)]
Add a way to assert the number of occurrences to htmldocck

9 years agoRevert hacks and add test for LLVM aborts due to empty aggregates.
Eduard Burtescu [Thu, 26 Feb 2015 13:22:13 +0000 (15:22 +0200)]
Revert hacks and add test for LLVM aborts due to empty aggregates.
Closes #21721.

9 years agoAdd doc to `core::intrinsics` pointing out conservativeness of `needs_drop`.
Felix S. Klock II [Thu, 26 Feb 2015 13:35:08 +0000 (14:35 +0100)]
Add doc to `core::intrinsics` pointing out conservativeness of `needs_drop`.

9 years agoRegression test for #22536.
Felix S. Klock II [Wed, 25 Feb 2015 22:45:41 +0000 (23:45 +0100)]
Regression test for #22536.

9 years agoUse more precise `type_needs_drop` for deciding about emitting cleanup code.
Felix S. Klock II [Wed, 25 Feb 2015 22:09:58 +0000 (23:09 +0100)]
Use more precise `type_needs_drop` for deciding about emitting cleanup code.

Fix #22536

9 years agoAdd `push_ctxt` instrumentation to all functions that might call `base::zero_mem`.
Felix S. Klock II [Wed, 25 Feb 2015 14:45:33 +0000 (15:45 +0100)]
Add `push_ctxt` instrumentation to all functions that might call `base::zero_mem`.

(Instrumentation work for Issue 22536.)

9 years agoremove the redundant else branch
Lai Jiangshan [Thu, 26 Feb 2015 09:36:49 +0000 (17:36 +0800)]
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>
9 years agoAuto merge of #22827 - sfackler:should_panic_pt1, r=alexcrichton
bors [Thu, 26 Feb 2015 09:23:36 +0000 (09:23 +0000)]
Auto merge of #22827 - sfackler:should_panic_pt1, r=alexcrichton

This needs to make it into the snapshot before #21824 can land.

r? @alexcrichton

9 years agoImplement `Debug` for `RwLock`, `arc::Weak` and `Mutex`
nwin [Fri, 20 Feb 2015 12:09:29 +0000 (13:09 +0100)]
Implement `Debug` for `RwLock`, `arc::Weak` and `Mutex`

9 years agoSend/Sync audit for libcollections
Edward Wang [Wed, 25 Feb 2015 12:52:18 +0000 (20:52 +0800)]
Send/Sync audit for libcollections

In the process, also replaces a raw mutable pointers with Unique to
spell out the ownership semantics.

cc #22709

9 years agoAuto merge of #22810 - japaric:cow-path, r=alexcrichton
bors [Thu, 26 Feb 2015 07:01:18 +0000 (07:01 +0000)]
Auto merge of #22810 - japaric:cow-path, r=alexcrichton

The Path/PathBuf pair already implements the required `Borrow`/`ToOwned` traits and can be used in a `Cow` pointer, so why not?

r? @alexcrichton

9 years agoWhitelist #[should_panic]
Steven Fackler [Thu, 26 Feb 2015 06:04:00 +0000 (22:04 -0800)]
Whitelist #[should_panic]

9 years agoTweak VecDeque's IterMut implementation
Edward Wang [Wed, 25 Feb 2015 10:11:23 +0000 (18:11 +0800)]
Tweak VecDeque's IterMut implementation

So it is symmetric to its `Iter` implementation. Also kills an FIXME.

9 years agoRecord the publicity of struct fields and enum variants.
Huon Wilson [Wed, 25 Feb 2015 11:37:12 +0000 (22:37 +1100)]
Record the publicity of struct fields and enum variants.

The stability check checks the `PublicItems` map when giving errors if
there is a #[stable] item with a public contents that doesn't not have
its own stability. Without recording this, struct fields and enum
variants will not get errors for e.g. stable modules with unmarked
functions internally.

This is just improving the compiler's precision to give the standard
library developers more information earlier.

E.g.

    #![staged_api]
    #![feature(staged_api)]
    #![crate_type = "lib"]

    #[stable(feature = "rust1", since = "1.0.0")]
    pub struct Foo {
        pub x: i32
    }

    #[stable(feature = "rust1", since = "1.0.0")]
    pub mod bar {
        pub fn baz() {}
    }

Without the patch it gives:

    test.rs:12:5: 12:20 error: This node does not have a stability attribute
    test.rs:12     pub fn baz() {}
                   ^~~~~~~~~~~~~~~
    error: aborting due to previous error

With the patch it gives:

    test.rs:7:9: 7:15 error: This node does not have a stability attribute
    test.rs:7     pub x: i32
                      ^~~~~~
    test.rs:12:5: 12:20 error: This node does not have a stability attribute
    test.rs:12     pub fn baz() {}
                   ^~~~~~~~~~~~~~~
    error: aborting due to 2 previous errors

9 years agoCheck stability of struct fields.
Huon Wilson [Wed, 25 Feb 2015 11:34:21 +0000 (22:34 +1100)]
Check stability of struct fields.

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.

9 years agoremove some compiler warnings
Tshepang Lekhonkhobe [Wed, 25 Feb 2015 06:20:34 +0000 (08:20 +0200)]
remove some compiler warnings

9 years agopath -> PathBuf for openbsd/bitrig
Sébastien Marie [Thu, 26 Feb 2015 05:16:41 +0000 (06:16 +0100)]
path -> PathBuf for openbsd/bitrig

9 years agoChanged prose to assert_eq! macro.
Alexander Bliskovsky [Thu, 26 Feb 2015 01:29:13 +0000 (20:29 -0500)]
Changed prose to assert_eq! macro.

9 years agoAdded documentation of backslash ending string literals.
Alexander Bliskovsky [Tue, 24 Feb 2015 05:13:04 +0000 (00:13 -0500)]
Added documentation of backslash ending string literals.

Closes #22698

9 years agoAlways error on invalid macro fragment specifiers
Keegan McAllister [Thu, 26 Feb 2015 01:11:36 +0000 (17:11 -0800)]
Always error on invalid macro fragment specifiers

Fixes #21370.

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

9 years agoAuto merge of #22767 - pnkfelix:issue-22265, r=nikomatsakis
bors [Wed, 25 Feb 2015 23:08:53 +0000 (23:08 +0000)]
Auto merge of #22767 - pnkfelix:issue-22265, r=nikomatsakis

Avoid `cat_expr Erred` notes when already in error state.

Also, to ensure we do not let the dropck get skipped, ICE if `cat_expr` errors when *not* in error state.

This is not known to be a breaking change (i.e. I do not know of a current case that causes the new ICE to be exercised).

Fix #22265

9 years agoFix overflow in precise_time_ns() on Windows,
Vadim Chugunov [Tue, 24 Feb 2015 06:47:56 +0000 (22:47 -0800)]
Fix overflow in precise_time_ns() on Windows,
which starts happening after ~2 hours of machine uptime.

9 years agoResult::or : avoid over-specializing the type
Cody P Schafer [Wed, 25 Feb 2015 18:37:22 +0000 (13:37 -0500)]
Result::or : avoid over-specializing the type

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` and `or_else` member
types.

This is a
[breaking-change]
Due to some code needing additional type annotations.

9 years agoAuto merge of #22796 - Manishearth:rollup, r=Manishearth
bors [Wed, 25 Feb 2015 20:32:58 +0000 (20:32 +0000)]
Auto merge of #22796 - Manishearth:rollup, r=Manishearth

9 years agoimpl IntoCow for Path[Buf]
Jorge Aparicio [Wed, 25 Feb 2015 16:43:39 +0000 (11:43 -0500)]
impl IntoCow for Path[Buf]

9 years agoChange MarkerTrait to be invariant. This is a (small) loss of expressiveness,
Niko Matsakis [Wed, 25 Feb 2015 17:21:15 +0000 (12:21 -0500)]
Change MarkerTrait to be invariant. This is a (small) loss of expressiveness,
but is necessary for now to work around #22806. Fixes #22655.

9 years agoPath -> PathBuf for Windows test (fixup #22727)
Manish Goregaokar [Wed, 25 Feb 2015 12:39:53 +0000 (18:09 +0530)]
Path -> PathBuf for Windows test (fixup #22727)

9 years agopath -> PathBuf for osx/dragonfly (fixup #22727)
Manish Goregaokar [Wed, 25 Feb 2015 08:45:24 +0000 (14:15 +0530)]
path -> PathBuf for osx/dragonfly (fixup #22727)

9 years agoAssert is internal now (fixup #22739)
Manish Goregaokar [Wed, 25 Feb 2015 08:41:37 +0000 (14:11 +0530)]
Assert is internal now (fixup #22739)

9 years agoFix type inference error (fixup #22739)
Manish Goregaokar [Wed, 25 Feb 2015 08:28:58 +0000 (13:58 +0530)]
Fix type inference error (fixup #22739)

9 years agoUse os::getcwd instead of env in rustbook (fixup #22727)
Manish Goregaokar [Wed, 25 Feb 2015 07:18:14 +0000 (12:48 +0530)]
Use os::getcwd instead of env in rustbook (fixup #22727)

9 years agoallow(deprecated) for TaskPool (fixup #22783)
Manish Goregaokar [Wed, 25 Feb 2015 06:15:06 +0000 (11:45 +0530)]
allow(deprecated) for TaskPool (fixup #22783)

9 years agostd: Require `&mut self` for Iterator::all
Alex Crichton [Wed, 25 Feb 2015 05:52:27 +0000 (21:52 -0800)]
std: Require `&mut self` for Iterator::all

Keeps the method consistent with `Iterator::any`.

Closes #22617
[breaking-change]