]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoadd newline so list is parsed properly
Dongie Agnir [Fri, 2 Oct 2015 04:45:47 +0000 (18:45 -1000)]
add newline so list is parsed properly

8 years agoAuto merge of #28432 - aochagavia:docs2, r=alexcrichton
bors [Wed, 16 Sep 2015 19:02:55 +0000 (19:02 +0000)]
Auto merge of #28432 - aochagavia:docs2, r=alexcrichton

Fixes #28431

8 years agoAuto merge of #28353 - GuillaumeGomez:error_codes, r=Manishearth
bors [Wed, 16 Sep 2015 08:51:30 +0000 (08:51 +0000)]
Auto merge of #28353 - GuillaumeGomez:error_codes, r=Manishearth

r? @Manishearth

This is a work in progress.

8 years agoSimplify sample code for {Option, Result}::iter_mut
Adolfo Ochagavía [Wed, 16 Sep 2015 08:17:38 +0000 (10:17 +0200)]
Simplify sample code for {Option, Result}::iter_mut

Fixes #28431

8 years agoEnd of adding error codes in librustc
Guillaume Gomez [Mon, 14 Sep 2015 19:25:04 +0000 (21:25 +0200)]
End of adding error codes in librustc

8 years agoAuto merge of #28420 - christopherdumas:intergrate_error_burnstushi, r=steveklabnik
bors [Wed, 16 Sep 2015 05:48:49 +0000 (05:48 +0000)]
Auto merge of #28420 - christopherdumas:intergrate_error_burnstushi, r=steveklabnik

This was pointed out by @filsmick and @swatteau in #28412.

8 years agoAuto merge of #28417 - apasel422:issue-23036, r=arielb1
bors [Wed, 16 Sep 2015 04:07:07 +0000 (04:07 +0000)]
Auto merge of #28417 - apasel422:issue-23036, r=arielb1

Closes #23036.

8 years agoAuto merge of #28401 - christopherdumas:beginners_manuel, r=Gankro
bors [Wed, 16 Sep 2015 02:18:01 +0000 (02:18 +0000)]
Auto merge of #28401 - christopherdumas:beginners_manuel, r=Gankro

r? @steveklabnik

8 years agoAuto merge of #28399 - nrc:attrs, r=nikomatsakis
bors [Wed, 16 Sep 2015 00:35:24 +0000 (00:35 +0000)]
Auto merge of #28399 - nrc:attrs, r=nikomatsakis

This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.

8 years agoUse ast attributes every where (remove HIR attributes).
Nick Cameron [Mon, 14 Sep 2015 09:58:20 +0000 (21:58 +1200)]
Use ast attributes every where (remove HIR attributes).

This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.

8 years agoAuto merge of #28426 - brson:ver, r=alexcrichton
bors [Tue, 15 Sep 2015 22:52:59 +0000 (22:52 +0000)]
Auto merge of #28426 - brson:ver, r=alexcrichton

8 years agoAuto merge of #28408 - brson:relnotes, r=aturon
bors [Tue, 15 Sep 2015 21:10:16 +0000 (21:10 +0000)]
Auto merge of #28408 - brson:relnotes, r=aturon

I'd love to have any tips about highlights and lang stuff I missed. Sadly, this needs to be merged *tomorrow*.

[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md)

8 years agoBump to 1.5
Brian Anderson [Tue, 15 Sep 2015 21:05:10 +0000 (14:05 -0700)]
Bump to 1.5

8 years ago1.3 release notes
Brian Anderson [Wed, 19 Aug 2015 21:16:26 +0000 (14:16 -0700)]
1.3 release notes

8 years agoFixe heading
christopherdumas [Tue, 15 Sep 2015 17:37:52 +0000 (10:37 -0700)]
Fixe heading

8 years agoFix option link and anchor links.
christopherdumas [Tue, 15 Sep 2015 14:54:43 +0000 (07:54 -0700)]
Fix option link and anchor links.

8 years agoAuto merge of #28263 - christopherdumas:add_help_E0118, r=nikomatsakis
bors [Tue, 15 Sep 2015 16:43:41 +0000 (16:43 +0000)]
Auto merge of #28263 - christopherdumas:add_help_E0118, r=nikomatsakis

Contributing to the Rust error explanations. Should I also add a better error for it by default?

8 years agoAuto merge of #28413 - arielb1:deduplication, r=eddyb
bors [Tue, 15 Sep 2015 15:01:05 +0000 (15:01 +0000)]
Auto merge of #28413 - arielb1:deduplication, r=eddyb

clean a few things discovered during my split_ty work

r? @eddyb

8 years agoAdd test for #23036
Andrew Paseltiner [Tue, 15 Sep 2015 14:14:11 +0000 (10:14 -0400)]
Add test for #23036

Closes #23036.

8 years agoAuto merge of #28407 - mmcco:master, r=alexcrichton
bors [Tue, 15 Sep 2015 13:18:13 +0000 (13:18 +0000)]
Auto merge of #28407 - mmcco:master, r=alexcrichton

…e len is actually one more than the length of argv[0]. However, this is precarious and should probably be replaced with more robust logic.

8 years agoAuto merge of #28406 - petrochenkov:primitive, r=eddyb
bors [Tue, 15 Sep 2015 11:35:11 +0000 (11:35 +0000)]
Auto merge of #28406 - petrochenkov:primitive, r=eddyb

This was missing from https://github.com/rust-lang/rust/pull/27451

r? @eddyb

8 years agoAuto merge of #28393 - arielb1:required-because-it-appears, r=nikomatsakis
bors [Tue, 15 Sep 2015 09:52:04 +0000 (09:52 +0000)]
Auto merge of #28393 - arielb1:required-because-it-appears, r=nikomatsakis

new error style:
```
path.rs:4:6: 4:7 error: the trait `core::marker::Sized` is not implemented for the type `[u8]` [E0277]
path.rs:4 fn f(p: Path) {}
               ^
path.rs:4:6: 4:7 help: run `rustc --explain E0277` to see a detailed explanation
path.rs:4:6: 4:7 note: `[u8]` does not have a constant size known at compile-time
path.rs:4:6: 4:7 note: required because it appears within the type `std::sys::os_str::Slice`
path.rs:4:6: 4:7 note: required because it appears within the type `std::ffi::os_str::OsStr`
path.rs:4:6: 4:7 note: required because it appears within the type `std::path::Path`
path.rs:4:6: 4:7 note: all local variables must have a statically known size
path.rs:7:5: 7:36 error: the trait `core::marker::Send` is not implemented for the type `alloc::rc::Rc<()>` [E0277]
path.rs:7     foo::<BTreeMap<Rc<()>, Rc<()>>>();
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
path.rs:7:5: 7:36 help: run `rustc --explain E0277` to see a detailed explanation
path.rs:7:5: 7:36 note: `alloc::rc::Rc<()>` cannot be sent between threads safely
path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::node::Node<alloc::rc::Rc<()>, alloc::rc::Rc<()>>`
path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::map::BTreeMap<alloc::rc::Rc<()>, alloc::rc::Rc<()>>`
path.rs:7:5: 7:36 note: required by `foo`
error: aborting due to 2 previous errors
```

Fixes #21793
Fixes #23286

r? @nikomatsakis

8 years agoAuto merge of #28268 - petrochenkov:fnptr, r=alexcrichton
bors [Tue, 15 Sep 2015 08:09:20 +0000 (08:09 +0000)]
Auto merge of #28268 - petrochenkov:fnptr, r=alexcrichton

Closes https://github.com/rust-lang/rust/issues/26082

8 years agoAuto merge of #28395 - ebfull:fix-associated-item-resolution, r=arielb1
bors [Tue, 15 Sep 2015 06:25:38 +0000 (06:25 +0000)]
Auto merge of #28395 - ebfull:fix-associated-item-resolution, r=arielb1

Fixes #28344

8 years agoAuto merge of #28351 - jonas-schievink:macro-bt, r=nrc
bors [Tue, 15 Sep 2015 03:21:30 +0000 (03:21 +0000)]
Auto merge of #28351 - jonas-schievink:macro-bt, r=nrc

The second commit in this PR will stop printing the macro definition site in backtraces, which cuts their length in half and increases readability (the definition site was only correct for local macros).

The third commit will not print an invocation if the last one printed occurred at the same place (span). This will make backtraces caused by a self-recursive macro much shorter.

(A possible alternative would be to capture the backtrace first, then limit it to a few frames at the start and end of the chain and print `...` inbetween. This would also work with multiple macros calling each other, which is not addressed by this PR - although the backtrace will still be halved)

Example:
```rust
macro_rules! m {
 ( 0 $($t:tt)* ) => ( m!($($t)*); );
 () => ( fn main() {0} );
}

m!(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0);
```

On a semi-recent nightly, this yields:
```
test.rs:3:21: 3:22 error: mismatched types:
 expected `()`,
    found `_`
(expected (),
    found integral variable) [E0308]
test.rs:3  () => ( fn main() {0} );
                              ^
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:2:23: 2:34 note: expansion site
test.rs:1:1: 4:2 note: in expansion of m!
test.rs:6:1: 6:35 note: expansion site
test.rs:3:21: 3:22 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to previous error
```

After this patch:
```
test.rs:3:21: 3:22 error: mismatched types:
 expected `()`,
    found `_`
(expected (),
    found integral variable) [E0308]
test.rs:3  () => ( fn main() {0} );
                              ^
test.rs:2:23: 2:34 note: in this expansion of m!
test.rs:6:1: 6:35 note: in this expansion of m!
test.rs:3:21: 3:22 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to previous error
```

8 years agoAuto merge of #28274 - arielb1:split-ty, r=nikomatsakis
bors [Tue, 15 Sep 2015 01:38:00 +0000 (01:38 +0000)]
Auto merge of #28274 - arielb1:split-ty, r=nikomatsakis

That file got way too big for its own good. It could be split more - this is just a start.

r? @nikomatsakis

8 years agoAuto merge of #28256 - petrochenkov:conv, r=alexcrichton
bors [Mon, 14 Sep 2015 22:21:41 +0000 (22:21 +0000)]
Auto merge of #28256 - petrochenkov:conv, r=alexcrichton

This patch transforms functions of the form
```
fn f<Generic: AsRef<Concrete>>(arg: Generic) {
let arg: &Concrete = arg.as_ref();
// Code using arg
}
```
to the next form:
```
#[inline]
fn f<Generic: AsRef<Concrete>>(arg: Generic) {
fn f_inner(arg: &Concrete) {
// Code using arg
}

f_inner(arg.as_ref());
}
```

Therefore, most of the code is concrete and not duplicated during monomorphisation (unless inlined)
and only the tiny bit of conversion code is duplicated. This method was mentioned by @aturon in the
Conversion Traits RFC (https://github.com/rust-lang/rfcs/blame/master/text/0529-conversion-traits.md#L249) and similar techniques are not uncommon in C++ template libraries.

This patch goes to the extremes and applies the transformation even to smaller functions<sup>1</sup>
for purity of the experiment. *Some of them can be rolled back* if considered too ridiculous.

<sup>1</sup> However who knows how small are these functions are after inlining and everything.

The functions in question are mostly `fs`/`os` functions and not used especially often with variety
of argument types, so the code size reduction is rather small (but consistent). Here are the sizes
of stage2 artifacts before and after the patch:
https://gist.github.com/petrochenkov/e76a6b280f382da13c5d
https://gist.github.com/petrochenkov/6cc28727d5256dbdfed0

Note:
All the `inner` functions are concrete and unavailable for cross-crate inlining, some of them may
need `#[inline]` annotations in the future.

r? @aturon

8 years agoRemove a needless memset(). It's okay that we don't append NUL because len is actuall...
Michael McConville [Mon, 14 Sep 2015 19:29:55 +0000 (15:29 -0400)]
Remove a needless memset(). It's okay that we don't append NUL because len is actually one more than the length of argv[0]. However, this is precarious and should probably be replaced with more robust logic.

8 years agoProhibit renaming to primitive types' names in import lists
Vadim Petrochenkov [Mon, 14 Sep 2015 22:07:17 +0000 (01:07 +0300)]
Prohibit renaming to primitive types' names in import lists

8 years agodeduplicate erase_regions
Ariel Ben-Yehuda [Mon, 14 Sep 2015 21:47:14 +0000 (00:47 +0300)]
deduplicate erase_regions

there is no need for 3 versions of the function

8 years agoAuto merge of #28247 - christopherdumas:fix_28243, r=eddyb
bors [Mon, 14 Sep 2015 20:37:49 +0000 (20:37 +0000)]
Auto merge of #28247 - christopherdumas:fix_28243, r=eddyb

as per #28243.

8 years agoAuto merge of #28403 - sfackler:timeout-cap-removal, r=alexcrichton
bors [Mon, 14 Sep 2015 18:54:01 +0000 (18:54 +0000)]
Auto merge of #28403 - sfackler:timeout-cap-removal, r=alexcrichton

Windows's scheduler apparently has "problems" unblocking calls in the
asked for time period.

8 years agoDrop upper bounds on net timeout tests
Steven Fackler [Mon, 14 Sep 2015 17:11:40 +0000 (10:11 -0700)]
Drop upper bounds on net timeout tests

Windows's scheduler apparently has "problems" unblocking calls in the
asked for time period.

8 years agoAuto merge of #28248 - PeterReid:master, r=alexcrichton
bors [Mon, 14 Sep 2015 17:10:09 +0000 (17:10 +0000)]
Auto merge of #28248 - PeterReid:master, r=alexcrichton

Overflows in integer pow() computations would be missed if they
preceded a 0 bit of the exponent being processed. This made
calls such as 2i32.pow(1024) not trigger an overflow.

Fixes #28012

8 years agoCheat sheet
christopherdumas [Mon, 14 Sep 2015 14:28:06 +0000 (07:28 -0700)]
Cheat sheet

8 years agoFix tuple float bug.
christopherdumas [Wed, 2 Sep 2015 22:48:21 +0000 (15:48 -0700)]
Fix tuple float bug.

8 years agoPrint the file in which a macro was defined
Jonas Schievink [Mon, 14 Sep 2015 14:09:57 +0000 (16:09 +0200)]
Print the file in which a macro was defined

8 years agoFix typo
christopherdumas [Mon, 14 Sep 2015 13:29:32 +0000 (06:29 -0700)]
Fix typo

8 years agouse RegionEscape instead of inherent has_escaping_regions fns
Ariel Ben-Yehuda [Mon, 14 Sep 2015 11:58:19 +0000 (14:58 +0300)]
use RegionEscape instead of inherent has_escaping_regions fns

8 years agosplit ty::util and ty::adjustment
Ariel Ben-Yehuda [Mon, 14 Sep 2015 11:55:56 +0000 (14:55 +0300)]
split ty::util and ty::adjustment

8 years agoAuto merge of #28358 - dotdash:nounwind, r=alexcrichton
bors [Mon, 14 Sep 2015 11:05:34 +0000 (11:05 +0000)]
Auto merge of #28358 - dotdash:nounwind, r=alexcrichton

This allows to skip the codegen for all the unneeded landing pads, reducing code size across the board by about 2-5%, depending on the crate. Compile times seem to be pretty unaffected though :-/

8 years agomove traits structural impls to traits::structural_impls
Ariel Ben-Yehuda [Mon, 14 Sep 2015 09:53:53 +0000 (12:53 +0300)]
move traits structural impls to traits::structural_impls

8 years agoMark all extern functions as nounwind
Björn Steinbrink [Fri, 11 Sep 2015 18:10:43 +0000 (20:10 +0200)]
Mark all extern functions as nounwind

Unwinding across an FFI boundary is undefined behaviour, so we can mark
all external function as nounwind. The obvious exception are those
functions that actually perform the unwinding.

8 years agosplit ty.rs into smaller parts
Ariel Ben-Yehuda [Sun, 6 Sep 2015 18:51:58 +0000 (21:51 +0300)]
split ty.rs into smaller parts

8 years agoAuto merge of #28389 - aidanhs:aphs-update-musl-linking, r=steveklabnik
bors [Mon, 14 Sep 2015 09:22:56 +0000 (09:22 +0000)]
Auto merge of #28389 - aidanhs:aphs-update-musl-linking, r=steveklabnik

In addition to instruction updates I
 - changed from wget to curl, because curl is a prerequisite of rust itself
 - removed `[...]` because they're missing from so many places it would just obscure the instructions if they were all put in

r? @steveklabnik

8 years agoCleaner abstraction for type_substs
Sean Bowe [Mon, 14 Sep 2015 08:33:29 +0000 (02:33 -0600)]
Cleaner abstraction for type_substs

8 years agomove middle::ty and related modules to middle/ty/
Ariel Ben-Yehuda [Sun, 6 Sep 2015 15:32:34 +0000 (18:32 +0300)]
move middle::ty and related modules to middle/ty/

8 years agoAuto merge of #28396 - arielb1:misplaced-binding, r=eddyb
bors [Mon, 14 Sep 2015 06:51:18 +0000 (06:51 +0000)]
Auto merge of #28396 - arielb1:misplaced-binding, r=eddyb

Technically a [breaking-change], but the broken code is useless,
like `i32<Param=()>`.

Fixes #24682

r? @eddyb

8 years agoAuto merge of #28392 - arielb1:sort-bounds-list, r=eddyb
bors [Mon, 14 Sep 2015 05:08:27 +0000 (05:08 +0000)]
Auto merge of #28392 - arielb1:sort-bounds-list, r=eddyb

The sort key is a (DefId, Name), which is *not* stable between
runs, so we must re-sort when loading.

Fixes #24063
Fixes #25467
Fixes #27222
Fixes #28377

r? @eddyb

8 years agoAdded test for partially supplied type params in which remaining reference non-exista...
Sean Bowe [Mon, 14 Sep 2015 03:43:24 +0000 (21:43 -0600)]
Added test for partially supplied type params in which remaining reference non-existant self

8 years agoAuto merge of #28383 - semarie:openbsd-jemalloc, r=alexcrichton
bors [Mon, 14 Sep 2015 03:25:25 +0000 (03:25 +0000)]
Auto merge of #28383 - semarie:openbsd-jemalloc, r=alexcrichton

ignore severals tests under openbsd as we have disabling jemalloc under
this target.

r? @alexcrichton

8 years agoRefactor ty_infer invocation
Sean Bowe [Mon, 14 Sep 2015 03:22:30 +0000 (21:22 -0600)]
Refactor ty_infer invocation

8 years agoAdd test for overflowing pow
Peter Reid [Mon, 14 Sep 2015 02:19:36 +0000 (22:19 -0400)]
Add test for overflowing pow

This would catch regressions of issue #28012.

8 years agoAuto merge of #28368 - lfairy:write-impl, r=alexcrichton
bors [Mon, 14 Sep 2015 01:43:10 +0000 (01:43 +0000)]
Auto merge of #28368 - lfairy:write-impl, r=alexcrichton

There is already a corresponding impl for `std::io::Write`. This change
will make the two traits more consistent.

8 years agoAuto merge of #28357 - semmaz:libfmt-macros, r=alexcrichton
bors [Sun, 13 Sep 2015 23:09:27 +0000 (23:09 +0000)]
Auto merge of #28357 - semmaz:libfmt-macros, r=alexcrichton

This changes libfmt_macros `CharIndices` iterator into `Peekable` so it can be used without `.clone()`.

Also changed some `loop match` and `match` to `while let` and `if let` respectively (mostly for readability).

8 years agoAdd an attribute to mark function as unwinding
Björn Steinbrink [Fri, 11 Sep 2015 18:09:19 +0000 (20:09 +0200)]
Add an attribute to mark function as unwinding

8 years agoCentralise the handling of attributes on extern functions
Björn Steinbrink [Fri, 11 Sep 2015 18:07:12 +0000 (20:07 +0200)]
Centralise the handling of attributes on extern functions

8 years agoAuto merge of #28178 - christopherdumas:fix_ice, r=nikomatsakis
bors [Sun, 13 Sep 2015 21:27:07 +0000 (21:27 +0000)]
Auto merge of #28178 - christopherdumas:fix_ice, r=nikomatsakis

This fixes the ICE, and makes it just a compiler error/warning. I'm not exactly sure that's whats wanted, so tell me if it isn't.

8 years agoensure projections are prohibited when type parameters are
Ariel Ben-Yehuda [Sun, 13 Sep 2015 20:05:04 +0000 (23:05 +0300)]
ensure projections are prohibited when type parameters are

Technically a [breaking-change], but the broken code is useless,
like `i32<Param=()>`.

Fixes #24682

8 years agoFixed regression in associated item resolution with default type parameters that...
Sean Bowe [Sun, 13 Sep 2015 20:14:04 +0000 (14:14 -0600)]
Fixed regression in associated item resolution with default type parameters that reference Self in traits.

8 years agoAuto merge of #28339 - alexcrichton:stabilize-1.4, r=aturon
bors [Sun, 13 Sep 2015 19:45:15 +0000 (19:45 +0000)]
Auto merge of #28339 - alexcrichton:stabilize-1.4, r=aturon

The FCP is coming to a close and 1.4 is coming out soon, so this brings in the
libs team decision for all library features this cycle.

Stabilized APIs:

* `<Box<str>>::into_string`
* `Arc::downgrade`
* `Arc::get_mut`
* `Arc::make_mut`
* `Arc::try_unwrap`
* `Box::from_raw`
* `Box::into_raw`
* `CStr::to_str`
* `CStr::to_string_lossy`
* `CString::from_raw`
* `CString::into_raw`
* `IntoRawFd::into_raw_fd`
* `IntoRawFd`
* `IntoRawHandle::into_raw_handle`
* `IntoRawHandle`
* `IntoRawSocket::into_raw_socket`
* `IntoRawSocket`
* `Rc::downgrade`
* `Rc::get_mut`
* `Rc::make_mut`
* `Rc::try_unwrap`
* `Result::expect`
* `String::into_boxed_slice`
* `TcpSocket::read_timeout`
* `TcpSocket::set_read_timeout`
* `TcpSocket::set_write_timeout`
* `TcpSocket::write_timeout`
* `UdpSocket::read_timeout`
* `UdpSocket::set_read_timeout`
* `UdpSocket::set_write_timeout`
* `UdpSocket::write_timeout`
* `Vec::append`
* `Vec::split_off`
* `VecDeque::append`
* `VecDeque::retain`
* `VecDeque::split_off`
* `rc::Weak::upgrade`
* `rc::Weak`
* `slice::Iter::as_slice`
* `slice::IterMut::into_slice`
* `str::CharIndices::as_str`
* `str::Chars::as_str`
* `str::split_at_mut`
* `str::split_at`
* `sync::Weak::upgrade`
* `sync::Weak`
* `thread::park_timeout`
* `thread::sleep`

Deprecated APIs

* `BTreeMap::with_b`
* `BTreeSet::with_b`
* `Option::as_mut_slice`
* `Option::as_slice`
* `Result::as_mut_slice`
* `Result::as_slice`
* `f32::from_str_radix`
* `f64::from_str_radix`

Closes #27277
Closes #27718
Closes #27736
Closes #27764
Closes #27765
Closes #27766
Closes #27767
Closes #27768
Closes #27769
Closes #27771
Closes #27773
Closes #27775
Closes #27776
Closes #27785
Closes #27792
Closes #27795
Closes #27797

8 years agodon't duplicate the code snippet in the "trait unimplemented" error
Ariel Ben-Yehuda [Sun, 13 Sep 2015 19:42:21 +0000 (22:42 +0300)]
don't duplicate the code snippet in the "trait unimplemented" error

new error style:
```
path.rs:4:6: 4:7 error: the trait `core::marker::Sized` is not implemented for the type `[u8]` [E0277]
path.rs:4 fn f(p: Path) {}
               ^
path.rs:4:6: 4:7 help: run `rustc --explain E0277` to see a detailed explanation
path.rs:4:6: 4:7 note: `[u8]` does not have a constant size known at compile-time
path.rs:4:6: 4:7 note: required because it appears within the type `std::sys::os_str::Slice`
path.rs:4:6: 4:7 note: required because it appears within the type `std::ffi::os_str::OsStr`
path.rs:4:6: 4:7 note: required because it appears within the type `std::path::Path`
path.rs:4:6: 4:7 note: all local variables must have a statically known size
path.rs:7:5: 7:36 error: the trait `core::marker::Send` is not implemented for the type `alloc::rc::Rc<()>` [E0277]
path.rs:7     foo::<BTreeMap<Rc<()>, Rc<()>>>();
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
path.rs:7:5: 7:36 help: run `rustc --explain E0277` to see a detailed explanation
path.rs:7:5: 7:36 note: `alloc::rc::Rc<()>` cannot be sent between threads safely
path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::node::Node<alloc::rc::Rc<()>, alloc::rc::Rc<()>>`
path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::map::BTreeMap<alloc::rc::Rc<()>, alloc::rc::Rc<()>>`
path.rs:7:5: 7:36 note: required by `foo`
error: aborting due to 2 previous errors
```

This improves the #21793/#23286 situation

8 years agosort the existential bounds list in tydecode
Ariel Ben-Yehuda [Sun, 13 Sep 2015 15:22:05 +0000 (18:22 +0300)]
sort the existential bounds list in tydecode

The sort key is a (DefId, Name), which is *not* stable between
runs, so we must re-sort when loading.

Fixes #24063
Fixes #25467
Fixes #27222
Fixes #28377

8 years agoAuto merge of #28390 - christopherdumas:beginners_manuel, r=steveklabnik
bors [Sun, 13 Sep 2015 16:57:09 +0000 (16:57 +0000)]
Auto merge of #28390 - christopherdumas:beginners_manuel, r=steveklabnik

8 years agoAdded link to @bors cheetsheet (thanks, @nagisa)
christopherdumas [Sun, 13 Sep 2015 15:14:17 +0000 (08:14 -0700)]
Added link to @bors cheetsheet (thanks, @nagisa)

8 years agoImplement more traits for function pointers
Vadim Petrochenkov [Sun, 13 Sep 2015 15:11:10 +0000 (18:11 +0300)]
Implement more traits for function pointers

8 years agoUpdate musl build in light of llvm 3.7 release
Aidan Hobson Sayers [Sun, 13 Sep 2015 12:11:03 +0000 (13:11 +0100)]
Update musl build in light of llvm 3.7 release

8 years agoAuto merge of #28286 - matklad:remove-dead-code, r=eddyb
bors [Sun, 13 Sep 2015 13:09:22 +0000 (13:09 +0000)]
Auto merge of #28286 - matklad:remove-dead-code, r=eddyb

There is a dead code in libsyntax/parser/parse.rs, when parsing structs.

Two functions are involved:

* [parse_item_struct](https://github.com/rust-lang/rust/blob/cd9c9f048f6aa0be091cd9835771ba0712bead4e/src/libsyntax/parse/parser.rs#L4691)
* [parse_tuple_struct_body](https://github.com/rust-lang/rust/blob/cd9c9f048f6aa0be091cd9835771ba0712bead4e/src/libsyntax/parse/parser.rs#L4769)

The problem is that both functions handle the case with unit structs. But because
`parse_tuple_struct_body` is called from `parse_item_struct`, it never faces
this case.

This PR removes unit struct case from `parse_tuple_struct_body` function. I tested with `make -j8 check-statge1`.

8 years agoAuto merge of #28370 - ranma42:slow_pat_gen, r=alexcrichton
bors [Sun, 13 Sep 2015 00:01:28 +0000 (00:01 +0000)]
Auto merge of #28370 - ranma42:slow_pat_gen, r=alexcrichton

Commit 9104a902c052c1ad7fd5c1245cb1e03f88aa2f70 fixed the generated
files, but that change would be lost (or require additional manual
intervention) if they are re-generated of if new architectures are
added.

cc #28273

8 years agoAdd a blanket impl for &mut std::fmt::Write
Chris Wong [Sat, 12 Sep 2015 03:19:25 +0000 (15:19 +1200)]
Add a blanket impl for &mut std::fmt::Write

There is already a corresponding impl for `std::io::Write`. This change
will make the two traits more consistent.

8 years agoAdd part of new error codes in librustc
Guillaume Gomez [Fri, 11 Sep 2015 14:17:15 +0000 (16:17 +0200)]
Add part of new error codes in librustc

8 years agoRwind LLVM
christopherdumas [Sat, 12 Sep 2015 22:26:50 +0000 (15:26 -0700)]
Rwind LLVM

8 years agoAuto merge of #28366 - christopherdumas:beginners_manuel, r=steveklabnik
bors [Sat, 12 Sep 2015 22:15:41 +0000 (22:15 +0000)]
Auto merge of #28366 - christopherdumas:beginners_manuel, r=steveklabnik

This is something that I wish I had when I started contributing to Rust (not that long ago :). I plan on writing a manual for bors and the rust testing setup too, if there isn't one already.

8 years agoAuto merge of #28375 - tbu-:pr_sip_write, r=alexcrichton
bors [Sat, 12 Sep 2015 19:23:05 +0000 (19:23 +0000)]
Auto merge of #28375 - tbu-:pr_sip_write, r=alexcrichton

8 years agoAuto merge of #28371 - killercup:docs/trpl-markup-fixes, r=steveklabnik
bors [Sat, 12 Sep 2015 16:31:10 +0000 (16:31 +0000)]
Auto merge of #28371 - killercup:docs/trpl-markup-fixes, r=steveklabnik

- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC

r? @steveklabnik

8 years agodisable jemalloc tests for openbsd
Sébastien Marie [Sat, 12 Sep 2015 15:33:18 +0000 (17:33 +0200)]
disable jemalloc tests for openbsd

ignore severals tests under openbsd as we have disabling jemalloc under
this target.

8 years agoAdd a comment to explain the `#[inline(never)]` annotation
Andrea Canciani [Sat, 12 Sep 2015 15:05:29 +0000 (17:05 +0200)]
Add a comment to explain the `#[inline(never)]` annotation

and regenerate the platform intrinsics source files.

8 years agoCompiler test manual
christopherdumas [Sat, 12 Sep 2015 15:02:01 +0000 (08:02 -0700)]
Compiler test manual

8 years agoStop a private method on `SipHasher` from shadowing `Hasher::write`
Tobias Bucher [Sat, 12 Sep 2015 14:25:39 +0000 (15:25 +0100)]
Stop a private method on `SipHasher` from shadowing `Hasher::write`

8 years agoAuto merge of #28372 - killercup:docs/nomicon-markup-fixes, r=steveklabnik
bors [Sat, 12 Sep 2015 13:44:44 +0000 (13:44 +0000)]
Auto merge of #28372 - killercup:docs/nomicon-markup-fixes, r=steveklabnik

The style `[name][]` does not work with Pandoc, whereas `[name]` does. I hope hoedown accepts this as well.

r? @steveklabnik

8 years agoNomicon: Fix Links
Pascal Hertleif [Sat, 12 Sep 2015 10:13:24 +0000 (12:13 +0200)]
Nomicon: Fix Links

The style `[name][]` does not work with Pandoc, whereas `[name]` does.
I hope hoedown accepts this as well.

8 years agoTRPL: Fix Headlines, Links in "Error Handling"
Pascal Hertleif [Sat, 12 Sep 2015 10:09:59 +0000 (12:09 +0200)]
TRPL: Fix Headlines, Links in "Error Handling"

- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC

8 years agoFix generator.py to avoid pathological inlining
Andrea Canciani [Sat, 12 Sep 2015 07:25:11 +0000 (09:25 +0200)]
Fix generator.py to avoid pathological inlining

Commit 9104a902c052c1ad7fd5c1245cb1e03f88aa2f70 fixed the generated
files, but that change would be lost (or require additional manual
intervention) if they are re-generated of if new architectures are
added.

cc #28273

8 years agoAuto merge of #28340 - brson:configure, r=alexcrichton
bors [Sat, 12 Sep 2015 02:57:01 +0000 (02:57 +0000)]
Auto merge of #28340 - brson:configure, r=alexcrichton

Redirect stdout on the python bogosity detector. This is printing
pwd to the terminal currently.

Reformat the bogus python/cmake messages so they format correctly.
echo does not always escape newlines (it doesn't here), and multiline
strings don't whitespace munch.

r? @alexcrichton

8 years agoAdded useful links section
christopherdumas [Fri, 11 Sep 2015 23:21:11 +0000 (16:21 -0700)]
Added useful links section

8 years agoAuto merge of #28350 - dotdash:llvm_fix, r=eddyb
bors [Fri, 11 Sep 2015 23:03:47 +0000 (23:03 +0000)]
Auto merge of #28350 - dotdash:llvm_fix, r=eddyb

8 years agoconfigure cleanup on windows
Brian Anderson [Thu, 10 Sep 2015 21:41:14 +0000 (14:41 -0700)]
configure cleanup on windows

Redirect stdout on the python bogosity detector. This is printing
pwd to the terminal currently.

Reformat the bogus python/cmake messages so they format correctly.
echo does not always escape newlines (it doesn't here), and multiline
strings don't whitespace munch.

8 years agoAdd release dates for all releases
Brian Anderson [Fri, 11 Sep 2015 20:29:26 +0000 (13:29 -0700)]
Add release dates for all releases

8 years agoAuto merge of #28306 - alexcrichton:less-rt, r=brson
bors [Fri, 11 Sep 2015 19:42:19 +0000 (19:42 +0000)]
Auto merge of #28306 - alexcrichton:less-rt, r=brson

This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.

8 years agoFixed test
christopherdumas [Fri, 11 Sep 2015 18:53:45 +0000 (11:53 -0700)]
Fixed test

8 years agostd: Internalize almost all of `std::rt`
Alex Crichton [Tue, 8 Sep 2015 22:53:46 +0000 (15:53 -0700)]
std: Internalize almost all of `std::rt`

This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.

8 years agoAuto merge of #28348 - petrochenkov:novirt, r=alexcrichton
bors [Fri, 11 Sep 2015 17:58:59 +0000 (17:58 +0000)]
Auto merge of #28348 - petrochenkov:novirt, r=alexcrichton

Noticed these yesterday while reading libsyntax

8 years agostd: Stabilize/deprecate features for 1.4
Alex Crichton [Thu, 10 Sep 2015 20:26:44 +0000 (13:26 -0700)]
std: Stabilize/deprecate features for 1.4

The FCP is coming to a close and 1.4 is coming out soon, so this brings in the
libs team decision for all library features this cycle.

Stabilized APIs:

* `<Box<str>>::into_string`
* `Arc::downgrade`
* `Arc::get_mut`
* `Arc::make_mut`
* `Arc::try_unwrap`
* `Box::from_raw`
* `Box::into_raw`
* `CStr::to_str`
* `CStr::to_string_lossy`
* `CString::from_raw`
* `CString::into_raw`
* `IntoRawFd::into_raw_fd`
* `IntoRawFd`
* `IntoRawHandle::into_raw_handle`
* `IntoRawHandle`
* `IntoRawSocket::into_raw_socket`
* `IntoRawSocket`
* `Rc::downgrade`
* `Rc::get_mut`
* `Rc::make_mut`
* `Rc::try_unwrap`
* `Result::expect`
* `String::into_boxed_slice`
* `TcpSocket::read_timeout`
* `TcpSocket::set_read_timeout`
* `TcpSocket::set_write_timeout`
* `TcpSocket::write_timeout`
* `UdpSocket::read_timeout`
* `UdpSocket::set_read_timeout`
* `UdpSocket::set_write_timeout`
* `UdpSocket::write_timeout`
* `Vec::append`
* `Vec::split_off`
* `VecDeque::append`
* `VecDeque::retain`
* `VecDeque::split_off`
* `rc::Weak::upgrade`
* `rc::Weak`
* `slice::Iter::as_slice`
* `slice::IterMut::into_slice`
* `str::CharIndices::as_str`
* `str::Chars::as_str`
* `str::split_at_mut`
* `str::split_at`
* `sync::Weak::upgrade`
* `sync::Weak`
* `thread::park_timeout`
* `thread::sleep`

Deprecated APIs

* `BTreeMap::with_b`
* `BTreeSet::with_b`
* `Option::as_mut_slice`
* `Option::as_slice`
* `Result::as_mut_slice`
* `Result::as_slice`
* `f32::from_str_radix`
* `f64::from_str_radix`

Closes #27277
Closes #27718
Closes #27736
Closes #27764
Closes #27765
Closes #27766
Closes #27767
Closes #27768
Closes #27769
Closes #27771
Closes #27773
Closes #27775
Closes #27776
Closes #27785
Closes #27792
Closes #27795
Closes #27797

8 years agosome code improvements in libfmt_macros
Simon Mazur [Thu, 10 Sep 2015 13:48:11 +0000 (16:48 +0300)]
some code improvements in libfmt_macros

8 years agoChanged libfmt_macros Parse iterator to Peekable
Simon Mazur [Thu, 10 Sep 2015 12:03:22 +0000 (15:03 +0300)]
Changed libfmt_macros Parse iterator to Peekable

8 years agoUpdate LLVM to fix nightly build failures
Björn Steinbrink [Fri, 11 Sep 2015 09:46:01 +0000 (11:46 +0200)]
Update LLVM to fix nightly build failures

8 years agoAuto merge of #28354 - dotdash:slow_plat, r=eddyb
bors [Fri, 11 Sep 2015 14:45:32 +0000 (14:45 +0000)]
Auto merge of #28354 - dotdash:slow_plat, r=eddyb

When the inliner has to decided if it wants to inline a function A into an
internal function B, it first checks whether it would be more profitable
to inline B into its callees instead. This means that it has to analyze
B, which involves checking the assumption cache. Building the assumption
cache requires scanning the whole function, and because inlining
currently clears the assumption cache, this scan happens again and
again, getting even slower as the function grows from inlining.

As inlining the huge find functions isn't really useful anyway, we can
mark them as noinline, which skips the cost analysis and reduces compile
times by as much as 70%.

cc #28273

8 years agoAvoid triggering a pathological case in the LLVM inliner
Björn Steinbrink [Fri, 11 Sep 2015 14:37:52 +0000 (16:37 +0200)]
Avoid triggering a pathological case in the LLVM inliner

When the inliner has to decided if it wants to inline a function A into an
internal function B, it first checks whether it would be more profitable
to inline B into its callees instead. This means that it has to analyze
B, which involves checking the assumption cache. Building the assumption
cache requires scanning the whole function, and because inlining
currently clears the assumption cache, this scan happens again and
again, getting even slower as the function grows from inlining.

As inlining the huge find functions isn't really useful anyway, we can
mark them as noinline, which skips the cost analysis and reduces compile
times by as much as 70%.

cc #28273

8 years agoAuto merge of #28338 - erickt:str-cmp, r=bluss
bors [Fri, 11 Sep 2015 10:33:02 +0000 (10:33 +0000)]
Auto merge of #28338 - erickt:str-cmp, r=bluss

llvm seems to be having some trouble optimizing the iterator-based string comparsion method into some equivalent to memcmp. This explicitly calls out to the memcmp intrinisic in order to allow llvm to generate better code. In some manual benchmarking, this memcmp-based approach is 20 times faster than the iterator approach.

8 years agoDon't print duplicate macro backtrace frames
Jonas Schievink [Fri, 11 Sep 2015 09:48:44 +0000 (11:48 +0200)]
Don't print duplicate macro backtrace frames