]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRemove unneeded macro witchery
Tobias Bucher [Tue, 10 Mar 2015 11:06:44 +0000 (12:06 +0100)]
Remove unneeded macro witchery

9 years agoAuto merge of #22510 - GuillaumeGomez:audit-integer-libstd-thread, r=alexcrichton
bors [Mon, 2 Mar 2015 11:21:26 +0000 (11:21 +0000)]
Auto merge of #22510 - GuillaumeGomez:audit-integer-libstd-thread, r=alexcrichton

Part of #22240.

9 years agoAuto merge of #22797 - alexcrichton:io-stdio, r=aturon
bors [Mon, 2 Mar 2015 07:10:14 +0000 (07:10 +0000)]
Auto merge of #22797 - alexcrichton:io-stdio, r=aturon

This is an implementation of RFC 899 and adds stdio functionality to the new
`std::io` module. Details of the API can be found on the RFC, but from a high
level:

* `io::{stdin, stdout, stderr}` constructors are now available. There are also
  `*_raw` variants for unbuffered and unlocked access.
* All handles are globally shared (excluding raw variants).
* The stderr handle is no longer buffered.
* All handles can be explicitly locked (excluding the raw variants).

The `print!` and `println!` machinery has not yet been hooked up to these
streams just yet. The `std::fmt::output` module has also not yet been
implemented as part of this commit.

9 years agoAuto merge of #22940 - Manishearth:rollup, r=Manishearth
bors [Mon, 2 Mar 2015 00:37:24 +0000 (00:37 +0000)]
Auto merge of #22940 - Manishearth:rollup, r=Manishearth

9 years agoRollup merge of #22944 - Manishearth:patch-1, r=sfackler
Manish Goregaokar [Mon, 2 Mar 2015 00:34:39 +0000 (06:04 +0530)]
Rollup merge of #22944 - Manishearth:patch-1, r=sfackler

 Been breaking tests lately. Somehow nondeterministic?

9 years agoFix unknown attribute in test
Manish Goregaokar [Mon, 2 Mar 2015 00:01:34 +0000 (05:31 +0530)]
Fix unknown attribute in test

9 years agoRollup merge of #22941 - sfackler:re-disable, r=sfackler
Manish Goregaokar [Sun, 1 Mar 2015 23:13:32 +0000 (04:43 +0530)]
Rollup merge of #22941 - sfackler:re-disable, r=sfackler

 Seems to be blocking forever

9 years agoIgnore issue #16671 test on android (again)
Steven Fackler [Sat, 6 Dec 2014 04:22:35 +0000 (20:22 -0800)]
Ignore issue #16671 test on android (again)

Seems to be blocking forever

9 years agoReplace int/uint by isize/usize
GuillaumeGomez [Wed, 18 Feb 2015 23:23:55 +0000 (00:23 +0100)]
Replace int/uint by isize/usize

9 years agoRollup merge of #22935 - dotdash:method_attr, r=eddyb
Manish Goregaokar [Sun, 1 Mar 2015 22:24:33 +0000 (03:54 +0530)]
Rollup merge of #22935 - dotdash:method_attr, r=eddyb

 ... objects

For method calls through trait objects, we currently generate the llvm
function argument attributes using the non-opaque method signature that
still has the trait object fat pointer for the self pointer. This leads
to attributes that are plain wrong, e.g. noalias. As we don't know
anything about the concrete type of the underlying object, we must
replace the self argument with an opaque i8 pointer before applying the
attributes.

9 years agoRollup merge of #22931 - semarie:dragonfly-ino_t, r=alexcrichton
Manish Goregaokar [Sun, 1 Mar 2015 22:24:27 +0000 (03:54 +0530)]
Rollup merge of #22931 - semarie:dragonfly-ino_t, r=alexcrichton

 this is the same problem as openbsd (#22792).
without the patch, liblibc don't build.

@mneumann please comment.
I have encountered this problem while building some rust libs with `target=x86_64-unknown-dragonfly` (while working on #22794)

9 years agoRollup merge of #22923 - dotdash:trans_arg, r=eddyb
Manish Goregaokar [Sun, 1 Mar 2015 22:24:14 +0000 (03:54 +0530)]
Rollup merge of #22923 - dotdash:trans_arg, r=eddyb

 The logic for the argument translation was duplicated here.

9 years agoRollup merge of #22922 - dotdash:closure_env_attr, r=eddyb
Manish Goregaokar [Sun, 1 Mar 2015 22:24:07 +0000 (03:54 +0530)]
Rollup merge of #22922 - dotdash:closure_env_attr, r=eddyb

9 years agoRollup merge of #22893 - Ms2ger:lints, r=huonw
Manish Goregaokar [Sun, 1 Mar 2015 22:24:00 +0000 (03:54 +0530)]
Rollup merge of #22893 - Ms2ger:lints, r=huonw

9 years agoRollup merge of #22821 - ipetkov:lint-method-rename, r=eddyb
Manish Goregaokar [Sun, 1 Mar 2015 22:23:54 +0000 (03:53 +0530)]
Rollup merge of #22821 - ipetkov:lint-method-rename, r=eddyb

 Traits can have associated types and not just methods. This
clarification reflects the the type of the input the method accepts.

[breaking-change]

9 years agoRollup merge of #22777 - pnkfelix:issue-22443, r=nikomatsakis
Manish Goregaokar [Sun, 1 Mar 2015 22:23:48 +0000 (03:53 +0530)]
Rollup merge of #22777 - pnkfelix:issue-22443, r=nikomatsakis

 Check for unbounded recursion during dropck.

Such recursion can be introduced by the erroneous use of non-regular types (aka types employing polymorphic recursion), which Rust does not support.

Fix #22443

9 years agoRollup merge of #22504 - GuillaumeGomez:audit-integer-libcore, r=Manishearth
Manish Goregaokar [Sun, 1 Mar 2015 22:23:41 +0000 (03:53 +0530)]
Rollup merge of #22504 - GuillaumeGomez:audit-integer-libcore, r=Manishearth

 Part of #22240.

9 years agoEmit proper attributes for the self pointer in method call through trait objects
Björn Steinbrink [Sun, 1 Mar 2015 17:19:07 +0000 (18:19 +0100)]
Emit proper attributes for the self pointer in method call through trait objects

For method calls through trait objects, we currently generate the llvm
function argument attributes using the non-opaque method signature that
still has the trait object fat pointer for the self pointer. This leads
to attributes that are plain wrong, e.g. noalias. As we don't know
anything about the concrete type of the underlying object, we must
replace the self argument with an opaque i8 pointer before applying the
attributes.

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 #22880 - alexcrichton:deprecate-io-extensions, r=huonw
bors [Sun, 1 Mar 2015 14:22:58 +0000 (14:22 +0000)]
Auto merge of #22880 - alexcrichton:deprecate-io-extensions, r=huonw

The `u64_from_be_bytes` and `u64_to_be_bytes` functions are being deprecated
with no replacement for now.

[breaking-change]

9 years agoRemove int/uint from libstd/lib.rs
Guillaume Gomez [Fri, 27 Feb 2015 00:43:55 +0000 (01:43 +0100)]
Remove int/uint from libstd/lib.rs

9 years agoUse trans_arg_datum in trans_args_under_call_abi
Björn Steinbrink [Sat, 28 Feb 2015 20:41:26 +0000 (21:41 +0100)]
Use trans_arg_datum in trans_args_under_call_abi

The logic for the argument translation was duplicated here.

9 years agoEmit proper function argument attributes for closure environments
Björn Steinbrink [Sat, 28 Feb 2015 20:38:49 +0000 (21:38 +0100)]
Emit proper function argument attributes for closure environments

9 years agoAdd regression tests for issue 22443.
Felix S. Klock II [Tue, 24 Feb 2015 17:34:39 +0000 (18:34 +0100)]
Add regression tests for issue 22443.

Fix #22443.

9 years agoAdd check for unbounded due to non-regular types in dropck.
Felix S. Klock II [Tue, 24 Feb 2015 17:20:41 +0000 (18:20 +0100)]
Add check for unbounded due to non-regular types in dropck.

Count recursion across phantom data separately from all recursion,
and treat `Box<T>` just as if it were carrying `PhantomData<T>`.

(Regression tests are in followup commit.)

The practical effect of this is just to increment the `xref_depth`
counter, the same way that `Vec` and other types carrying
`PhantomData` do.

9 years agoAuto merge of #22087 - GuillaumeGomez:int-pow, r=alexcrichton
bors [Sun, 1 Mar 2015 08:59:29 +0000 (08:59 +0000)]
Auto merge of #22087 - GuillaumeGomez:int-pow, r=alexcrichton

Fixes issue #22016

9 years agostd: Implement stdio for `std::io`
Alex Crichton [Wed, 25 Feb 2015 07:27:20 +0000 (23:27 -0800)]
std: Implement stdio for `std::io`

This is an implementation of RFC 899 and adds stdio functionality to the new
`std::io` module. Details of the API can be found on the RFC, but from a high
level:

* `io::{stdin, stdout, stderr}` constructors are now available. There are also
  `*_raw` variants for unbuffered and unlocked access.
* All handles are globally shared (excluding raw variants).
* The stderr handle is no longer buffered.
* All handles can be explicitly locked (excluding the raw variants).

The `print!` and `println!` machinery has not yet been hooked up to these
streams just yet. The `std::fmt::output` module has also not yet been
implemented as part of this commit.

9 years agoAuto merge of #22909 - Manishearth:rollup, r=Manishearth
bors [Sun, 1 Mar 2015 06:32:54 +0000 (06:32 +0000)]
Auto merge of #22909 - Manishearth:rollup, r=Manishearth

r? @Manishearth

9 years agoRollup merge of #22910 - dotdash:time_llvm_passes, r=cmr
Manish Goregaokar [Sun, 1 Mar 2015 04:20:30 +0000 (09:50 +0530)]
Rollup merge of #22910 - dotdash:time_llvm_passes, r=cmr

 The timing code break when using multiple codegen units, but that
shouldn't stop us from using it with a single codegen unit.

9 years agoRollup merge of #22908 - mdinger:fix_link, r=Gankro
Manish Goregaokar [Sun, 1 Mar 2015 04:20:18 +0000 (09:50 +0530)]
Rollup merge of #22908 - mdinger:fix_link, r=Gankro

 The markdown listing the link in [StrExt::width](http://doc.rust-lang.org/std/str/trait.StrExt.html#tymethod.width) isn't being parsed properly. I'm expecting it's because the `[ ]` is across 2 lines so this changes that. This is untested though.

9 years agoAdd import of usize (fixup #22901)
Manish Goregaokar [Sat, 28 Feb 2015 20:15:53 +0000 (01:45 +0530)]
Add import of usize (fixup #22901)

9 years agoRollup merge of #22907 - dotdash:static_assert_bool, r=eddyb
Manish Goregaokar [Sat, 28 Feb 2015 19:49:26 +0000 (01:19 +0530)]
Rollup merge of #22907 - dotdash:static_assert_bool, r=eddyb

 static_assert is documented as working on static with type `bool`, but
we currently accept it on any const static and crash when the const has
an non-integral type.

This is a breaking-change for anyone who used static_assert on types
likes i32, which happened to work but seems like an unintended
consequence of the missing error checking.

[breaking-change]

Fixes #22056

9 years agoRollup merge of #22904 - dotdash:drop_old_clang, r=alexcrichton
Manish Goregaokar [Sat, 28 Feb 2015 19:49:19 +0000 (01:19 +0530)]
Rollup merge of #22904 - dotdash:drop_old_clang, r=alexcrichton

 Fixes #20467

9 years agoRollup merge of #22903 - semarie:openbsd-stack, r=alexcrichton
Manish Goregaokar [Sat, 28 Feb 2015 19:49:12 +0000 (01:19 +0530)]
Rollup merge of #22903 - semarie:openbsd-stack, r=alexcrichton

 some commits in OpenBSD OS have corrected a problem of stack position.
Now, we can adjust more accurately the page guard in rust.

@dhuseby I am not sure that bitrig have already integrated these changes (the `$OpenBSD$` header in sys/kern/kern_exec.c is too old). But when they do, you may want this patch too.

9 years agoRollup merge of #22901 - thepowersgang:patch-1, r=eddyb
Manish Goregaokar [Sat, 28 Feb 2015 19:49:05 +0000 (01:19 +0530)]
Rollup merge of #22901 - thepowersgang:patch-1, r=eddyb

 A misplaced uint->u32 instead of usize in fmt::Pointer. Added a basic test.

9 years agoRollup merge of #22898 - edwardw:one-less-unsafe-impl, r=huonw
Manish Goregaokar [Sat, 28 Feb 2015 19:48:59 +0000 (01:18 +0530)]
Rollup merge of #22898 - edwardw:one-less-unsafe-impl, r=huonw

 These implementations were temporary workaround. Now #22828 has been
fixed, they can be removed.

9 years agoRollup merge of #22896 - Ms2ger:InlineAttr, r=huonw
Manish Goregaokar [Sat, 28 Feb 2015 19:48:52 +0000 (01:18 +0530)]
Rollup merge of #22896 - Ms2ger:InlineAttr, r=huonw

9 years agoAuto merge of #22898 - edwardw:one-less-unsafe-impl, r=huonw
bors [Sun, 1 Mar 2015 04:06:03 +0000 (04:06 +0000)]
Auto merge of #22898 - edwardw:one-less-unsafe-impl, r=huonw

These implementations were temporary workaround. Now #22828 has been
fixed, they can be removed.

9 years agoFix errors, remove unused files
GuillaumeGomez [Thu, 19 Feb 2015 00:12:45 +0000 (01:12 +0100)]
Fix errors, remove unused files

9 years agoRemove int/uint
GuillaumeGomez [Wed, 18 Feb 2015 22:46:22 +0000 (23:46 +0100)]
Remove int/uint

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 agoMake Int::pow() take exp as u32 instead usize
Guillaume Gomez [Fri, 27 Feb 2015 20:04:15 +0000 (21:04 +0100)]
Make Int::pow() take exp as u32 instead usize

9 years agoRename LintPass::check_trait_method to check_trait_item
Ivan Petkov [Sat, 28 Feb 2015 21:56:37 +0000 (13:56 -0800)]
Rename LintPass::check_trait_method to check_trait_item

Traits can have associated types and not just methods. This
clarification reflects the the type of the input the method accepts.

[breaking-change]

9 years agoRe-enable -Z time-llvm-passes when using a single codegen unit
Björn Steinbrink [Sat, 28 Feb 2015 21:40:39 +0000 (22:40 +0100)]
Re-enable -Z time-llvm-passes when using a single codegen unit

The timing code break when using multiple codegen units, but that
shouldn't stop us from using it with a single codegen unit.

9 years agoFix incorrectly parsed markdown link
mdinger [Sat, 28 Feb 2015 19:05:50 +0000 (14:05 -0500)]
Fix incorrectly parsed markdown link

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 agoError out when using static_assert on a non-boolean value
Björn Steinbrink [Sat, 28 Feb 2015 18:22:24 +0000 (19:22 +0100)]
Error out when using static_assert on a non-boolean value

static_assert is documented as working on static with type `bool`, but
we currently accept it on any const static and crash when the const has
an non-integral type.

This is a breaking-change for anyone who used static_assert on types
likes i32, which happened to work but seems like an unintended
consequence of the missing error checking.

[breaking-change]

Fixes #22056

9 years agoDrop support for clang < 3.2
Björn Steinbrink [Sat, 28 Feb 2015 16:53:12 +0000 (17:53 +0100)]
Drop support for clang < 3.2

Fixes #20467

9 years agoopenbsd: adjust page guard address
Sébastien Marie [Mon, 23 Feb 2015 18:58:48 +0000 (19:58 +0100)]
openbsd: adjust page guard address

some commits in OpenBSD base have corrected a problem of stack position.
Now, we can adjust more accurately the page guard in rust.

9 years agoifmt - Add a basic test for {:p} getting truncated
John Hodge [Sat, 28 Feb 2015 14:51:29 +0000 (22:51 +0800)]
ifmt - Add a basic test for {:p} getting truncated

9 years agoFix assuming 32-bit pointers
John Hodge [Sat, 28 Feb 2015 14:44:10 +0000 (22:44 +0800)]
Fix assuming 32-bit pointers

9 years agoRemove two unsafe impls from `iter::Peekable`
Edward Wang [Sat, 28 Feb 2015 14:39:50 +0000 (22:39 +0800)]
Remove two unsafe impls from `iter::Peekable`

These implementations were temporary workaround. Now #22828 has been
fixed, they can be removed.

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 agoUse if-let for UnusedImportBraces.
Ms2ger [Sat, 28 Feb 2015 12:32:34 +0000 (13:32 +0100)]
Use if-let for UnusedImportBraces.

9 years agoCollapse nested matches in method_context.
Ms2ger [Sat, 28 Feb 2015 12:32:18 +0000 (13:32 +0100)]
Collapse nested matches in method_context.

9 years agoAvoid unnecessary mutability for UnusedResults.
Ms2ger [Sat, 28 Feb 2015 12:31:55 +0000 (13:31 +0100)]
Avoid unnecessary mutability for UnusedResults.

9 years agoAdd a comment to code that confused me.
Ms2ger [Sat, 28 Feb 2015 12:31:27 +0000 (13:31 +0100)]
Add a comment to code that confused me.

9 years agoVarious formatting cleanup.
Ms2ger [Sat, 28 Feb 2015 12:31:14 +0000 (13:31 +0100)]
Various formatting cleanup.

9 years agoQualify uses of MethodContext variants.
Ms2ger [Sat, 28 Feb 2015 11:17:11 +0000 (12:17 +0100)]
Qualify uses of MethodContext 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 agostd: Deprecated the `old_io::extensions` module
Alex Crichton [Fri, 27 Feb 2015 23:46:02 +0000 (15:46 -0800)]
std: Deprecated the `old_io::extensions` module

The `u64_from_be_bytes` and `u64_to_be_bytes` functions are being deprecated
with no replacement for now.

[breaking-change]

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,