]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #27338 - alexcrichton:remove-morestack, r=brson
bors [Mon, 10 Aug 2015 23:40:54 +0000 (23:40 +0000)]
Auto merge of #27338 - alexcrichton:remove-morestack, r=brson

This commit removes all morestack support from the compiler which entails:

* Segmented stacks are no longer emitted in codegen.
* We no longer build or distribute libmorestack.a
* The `stack_exhausted` lang item is no longer required

The only current use of the segmented stack support in LLVM is to detect stack
overflow. This is no longer really required, however, because we already have
guard pages for all threads and registered signal handlers watching for a
segfault on those pages (to print out a stack overflow message). Additionally,
major platforms (aka Windows) already don't use morestack.

This means that Rust is by default less likely to catch stack overflows because
if a function takes up more than one page of stack space it won't hit the guard
page. This is what the purpose of morestack was (to catch this case), but it's
better served with stack probes which have more cross platform support and no
runtime support necessary. Until LLVM supports this for all platform it looks
like morestack isn't really buying us much.

cc #16012 (still need stack probes)
Closes #26458 (a drive-by fix to help diagnostics on stack overflow)

r? @brson

8 years agoRemove morestack support
Alex Crichton [Mon, 27 Jul 2015 20:41:35 +0000 (13:41 -0700)]
Remove morestack support

This commit removes all morestack support from the compiler which entails:

* Segmented stacks are no longer emitted in codegen.
* We no longer build or distribute libmorestack.a
* The `stack_exhausted` lang item is no longer required

The only current use of the segmented stack support in LLVM is to detect stack
overflow. This is no longer really required, however, because we already have
guard pages for all threads and registered signal handlers watching for a
segfault on those pages (to print out a stack overflow message). Additionally,
major platforms (aka Windows) already don't use morestack.

This means that Rust is by default less likely to catch stack overflows because
if a function takes up more than one page of stack space it won't hit the guard
page. This is what the purpose of morestack was (to catch this case), but it's
better served with stack probes which have more cross platform support and no
runtime support necessary. Until LLVM supports this for all platform it looks
like morestack isn't really buying us much.

cc #16012 (still need stack probes)
Closes #26458 (a drive-by fix to help diagnostics on stack overflow)

8 years agoAuto merge of #27531 - bluss:io-copy-dst, r=alexcrichton
bors [Mon, 10 Aug 2015 22:03:09 +0000 (22:03 +0000)]
Auto merge of #27531 - bluss:io-copy-dst, r=alexcrichton

std: Allow ?Sized parameters in std::io::copy

8 years agoAuto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton
bors [Mon, 10 Aug 2015 20:24:06 +0000 (20:24 +0000)]
Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton

An implementation of [RFC 1219](https://github.com/rust-lang/rfcs/pull/1219).

The RFC is not merged yet, but once merged, this could be.

8 years agoAuto merge of #27252 - tbu-:pr_less_transmutes, r=alexcrichton
bors [Mon, 10 Aug 2015 18:46:21 +0000 (18:46 +0000)]
Auto merge of #27252 - tbu-:pr_less_transmutes, r=alexcrichton

The replacements are functions that usually use a single `mem::transmute` in their body and restrict input and output via more concrete types than `T` and `U`. Worth noting are the `transmute` functions for slices and the `from_utf8*` family for mutable slices. Additionally, `mem::transmute` was often used for casting raw pointers, when you can already cast raw pointers just fine with `as`.

This builds upon #27233.

8 years agoAuto merge of #27516 - alexcrichton:osx-flaky-zomg, r=brson
bors [Mon, 10 Aug 2015 17:06:15 +0000 (17:06 +0000)]
Auto merge of #27516 - alexcrichton:osx-flaky-zomg, r=brson

The investigation into #14232 discovered that it's possible that signal delivery
to a newly spawned process is racy on OSX. This test has been failing spuriously
on the OSX bots for some time now, so ignore it as we don't currently know a
solution and it looks like it may be out of our control.

8 years agoAuto merge of #27547 - vberger:more_perseverant_resolve, r=nrc
bors [Mon, 10 Aug 2015 14:40:07 +0000 (14:40 +0000)]
Auto merge of #27547 - vberger:more_perseverant_resolve, r=nrc

As noted in my previous PR #27439 , the import resolution algorithm has two cases where it bails out:

- The algorithm will delay an import if the module containing the target of the import still has unresolved glob imports
- The algorithm will delay a glob import of the target module still has unresolved imports

This PR alters the behaviour to only bail out when the above described unresolved imports are `pub`, as non-pub imports don't affect the result anyway.

It is still possible to fail the algorithm with examples like
```rust
pub mod a {
    pub use b::*;
}

pub mod b {
    pub use a::*;
}
```
but such configurations cannot be resolved in any meaningful way, as these are cyclic imports.

Closes #4865

8 years agostd: Allow ?Sized parameters in std::io::copy
Ulrik Sverdrup [Wed, 5 Aug 2015 11:31:05 +0000 (13:31 +0200)]
std: Allow ?Sized parameters in std::io::copy

std::io::copy did not allow passing trait objects directly (only with an
extra &mut wrapping).

8 years agoAuto merge of #27634 - TimNN:master, r=dotdash
bors [Mon, 10 Aug 2015 12:01:01 +0000 (12:01 +0000)]
Auto merge of #27634 - TimNN:master, r=dotdash

I don't know how this single inline caused the breakage but it seems to be the cause of the issue (see https://github.com/rust-lang/rust/issues/27619#issuecomment-129420094).

8 years agoRevert "Mark round_up_to_next as inline"
Tim Neumann [Mon, 10 Aug 2015 11:51:55 +0000 (13:51 +0200)]
Revert "Mark round_up_to_next as inline"

This reverts commit febdc3b201bcce1546c88e3be1b956d3f90d3059.

8 years agoRemove unused feature
Tobias Bucher [Sun, 9 Aug 2015 21:53:28 +0000 (23:53 +0200)]
Remove unused feature

8 years agoRemove #[cfg(stage0)] annotation
Tobias Bucher [Sun, 9 Aug 2015 19:53:00 +0000 (21:53 +0200)]
Remove #[cfg(stage0)] annotation

8 years agoChange TODO to FIXME
Tobias Bucher [Sun, 9 Aug 2015 19:50:53 +0000 (21:50 +0200)]
Change TODO to FIXME

8 years agoMake `str::as_bytes_mut` private
Tobias Bucher [Fri, 24 Jul 2015 20:10:12 +0000 (22:10 +0200)]
Make `str::as_bytes_mut` private

8 years agoMake `slice::transmute*` private
Tobias Bucher [Fri, 24 Jul 2015 19:02:05 +0000 (21:02 +0200)]
Make `slice::transmute*` private

8 years agoReplace many uses of `mem::transmute` with more specific functions
Tobias Bucher [Fri, 24 Jul 2015 01:04:55 +0000 (03:04 +0200)]
Replace many uses of `mem::transmute` with more specific functions

The replacements are functions that usually use a single `mem::transmute` in
their body and restrict input and output via more concrete types than `T` and
`U`. Worth noting are the `transmute` functions for slices and the `from_utf8*`
family for mutable slices. Additionally, `mem::transmute` was often used for
casting raw pointers, when you can already cast raw pointers just fine with
`as`.

8 years agoMark round_up_to_next as inline
Ariel Ben-Yehuda [Sun, 9 Aug 2015 14:20:12 +0000 (17:20 +0300)]
Mark round_up_to_next as inline

This speeds up rustc on #25916 from 1.36Â0.022s to 1.326Â0.025s

8 years agoAuto merge of #27182 - AlisdairO:diagnostics382, r=Manishearth
bors [Sat, 8 Aug 2015 20:32:27 +0000 (20:32 +0000)]
Auto merge of #27182 - AlisdairO:diagnostics382, r=Manishearth

As title :-)
Part of #24407.

r? @Manishearth

8 years agoadd long diagnostics for E0382
Alisdair Owens [Tue, 21 Jul 2015 11:03:21 +0000 (12:03 +0100)]
add long diagnostics for E0382

8 years agorustc: rename multiple imports in a list
Sean McArthur [Sat, 1 Aug 2015 05:20:25 +0000 (22:20 -0700)]
rustc: rename multiple imports in a list

8 years agoAuto merge of #27595 - mike-marcacci:patch-1, r=steveklabnik
bors [Sat, 8 Aug 2015 16:27:12 +0000 (16:27 +0000)]
Auto merge of #27595 - mike-marcacci:patch-1, r=steveklabnik

Keeping integer values and integer references in the "value" columns made the examples quite difficult for me to follow. I've added unicode arrows to references to make them more obvious, without using any characters with actual meaning in the rust language (like `&` or previously `~`).

r? @steveklabnik

8 years agoAuto merge of #27596 - tsion:fix-27450, r=arielb1
bors [Sat, 8 Aug 2015 09:55:42 +0000 (09:55 +0000)]
Auto merge of #27596 - tsion:fix-27450, r=arielb1

Fixes #27450.

r? @steveklabnik

8 years agoAdded arrows to references in tables
Mike Marcacci [Sat, 8 Aug 2015 06:13:08 +0000 (23:13 -0700)]
Added arrows to references in tables

Keeping integer values and integer references in the "value" columns made the examples quite difficult for me to follow. I've added unicode arrows to make references more obvious, without using a character with actual meaning in the rust language (like `&` or previously `~`).

8 years agoFix the diagnostic for fat pointer to usize casts.
Scott Olson [Sat, 8 Aug 2015 02:08:28 +0000 (22:08 -0400)]
Fix the diagnostic for fat pointer to usize casts.

Fixes #27450.

8 years agoAuto merge of #27378 - GuillaumeGomez:patch-2, r=brson
bors [Fri, 7 Aug 2015 17:58:17 +0000 (17:58 +0000)]
Auto merge of #27378 - GuillaumeGomez:patch-2, r=brson

Part of #24407.
r? @Manishearth

8 years agoAuto merge of #27582 - pnkfelix:disable-nonzeroing-move-hint-by-default, r=nikomatsakis
bors [Fri, 7 Aug 2015 16:24:22 +0000 (16:24 +0000)]
Auto merge of #27582 - pnkfelix:disable-nonzeroing-move-hint-by-default, r=nikomatsakis

Turn nonzeroing move hints back off by default.

Works around bugs injected by PR #26173.

 * (@pnkfelix is unavailable in the short-term (i.e. for the next week) to fix them.)

 * When the bugs are fixed, we will turn nonzeroing move hints back on by default.

Fix #27401

8 years agoplacate the pretty tests by ignoring my test.
Felix S. Klock II [Fri, 7 Aug 2015 16:23:37 +0000 (18:23 +0200)]
placate the pretty tests by ignoring my test.

8 years agoRegression test for dropflag reinit issue.
Felix S. Klock II [Fri, 7 Aug 2015 14:21:22 +0000 (16:21 +0200)]
Regression test for dropflag reinit issue.

Fix #27401.

8 years agoTurn nonzeroing move hints back off by default.
Felix S. Klock II [Fri, 7 Aug 2015 13:51:25 +0000 (15:51 +0200)]
Turn nonzeroing move hints back off by default.

This is a temporary workaround for the bugs that have been found in
the implementation of PR #26173.

 * pnkfelix is unavailable in the short-term (i.e. for the next week) to fix them.

 * When the bugs are fixed, we will turn this back on by default.

(If you want to play with the known-to-be-buggy optimization in the
meantime, you can opt-back in via the debugging option that this
commit is toggling.)

8 years agoAdd a guard example for E0416
Guillaume Gomez [Fri, 7 Aug 2015 13:23:00 +0000 (15:23 +0200)]
Add a guard example for E0416

8 years agoImprove examples of E0102
Guillaume Gomez [Fri, 7 Aug 2015 13:07:20 +0000 (15:07 +0200)]
Improve examples of E0102

8 years agoAuto merge of #27551 - arielb1:adt-def, r=nikomatsakis
bors [Fri, 7 Aug 2015 12:23:06 +0000 (12:23 +0000)]
Auto merge of #27551 - arielb1:adt-def, r=nikomatsakis

This ended up being a bigger refactoring than I thought, as I also cleaned a few ugly points in rustc. There are still a few areas that need improvements.

Performance numbers:
```
Before:
572.70user 5.52system 7:33.21elapsed 127%CPU (0avgtext+0avgdata 1173368maxresident)k
llvm-time: 385.858

After:
545.27user 5.49system 7:10.22elapsed 128%CPU (0avgtext+0avgdata 1145348maxresident)k
llvm-time: 387.119
```

A good 5% perf improvement. Note that after this patch >70% of the time is spent in LLVM - Amdahl's law is in full effect.

Passes make check locally.

r? @nikomatsakis

8 years agoCustomize error messages for self glob imports.
Victor Berger [Fri, 7 Aug 2015 10:00:46 +0000 (12:00 +0200)]
Customize error messages for self glob imports.

8 years agorename ADTDef to AdtDef etc.
Ariel Ben-Yehuda [Fri, 7 Aug 2015 11:41:33 +0000 (14:41 +0300)]
rename ADTDef to AdtDef etc.

8 years agostop using skip_binder
Ariel Ben-Yehuda [Fri, 7 Aug 2015 10:57:39 +0000 (13:57 +0300)]
stop using skip_binder

8 years agoadd documentation
Ariel Ben-Yehuda [Fri, 7 Aug 2015 10:48:29 +0000 (13:48 +0300)]
add documentation

8 years agoAuto merge of #27576 - rust-lang:steveklabnik-patch-1, r=Gankro
bors [Fri, 7 Aug 2015 05:57:24 +0000 (05:57 +0000)]
Auto merge of #27576 - rust-lang:steveklabnik-patch-1, r=Gankro

1. this isn't actually true about diabetes
2. people with diabetes will get *real sad* when reading this
3. it isn't actually necessary.

r? @Gankro

8 years agoAuto merge of #27558 - mlalic:patch-1, r=brson
bors [Fri, 7 Aug 2015 04:21:47 +0000 (04:21 +0000)]
Auto merge of #27558 - mlalic:patch-1, r=brson

r? @steveklabnik

8 years agoAuto merge of #27552 - tshepang:misc, r=brson
bors [Fri, 7 Aug 2015 02:46:43 +0000 (02:46 +0000)]
Auto merge of #27552 - tshepang:misc, r=brson

8 years agoAuto merge of #27574 - brson:cache-staged-api, r=huonw
bors [Fri, 7 Aug 2015 01:12:15 +0000 (01:12 +0000)]
Auto merge of #27574 - brson:cache-staged-api, r=huonw

This search happens a lot! Locally, compiling hyper sees the following improvements:

before

real    0m30.843s
user    0m51.644s
sys     0m2.128s

real    0m30.164s
user    0m53.320s
sys     0m2.208s

after

real    0m28.438s
user    0m51.076s
sys     0m2.276s

real    0m28.612s
user    0m51.560s
sys     0m2.192s

8 years agoRemove reference to diabetes
Steve Klabnik [Fri, 7 Aug 2015 00:18:49 +0000 (20:18 -0400)]
Remove reference to diabetes

1. this isn't actually true about diabetes
2. people with diabetes will get *real sad* when reading this
3. it isn't actually necessary.

8 years agoCache a linear search for the #[staged_api] attribute.
Brian Anderson [Thu, 6 Aug 2015 01:25:33 +0000 (18:25 -0700)]
Cache a linear search for the #[staged_api] attribute.

This search happens a lot! Locally, compiling hyper sees the following improvements:

before

real    0m30.843s
user    0m51.644s
sys     0m2.128s

real    0m30.164s
user    0m53.320s
sys     0m2.208s

after

real    0m28.438s
user    0m51.076s
sys     0m2.276s

real    0m28.612s
user    0m51.560s
sys     0m2.192s

8 years agoAuto merge of #27566 - rubymeow:master, r=steveklabnik
bors [Thu, 6 Aug 2015 20:45:39 +0000 (20:45 +0000)]
Auto merge of #27566 - rubymeow:master, r=steveklabnik

I got a bit confused reading the guide over why all of a sudden there was an asterisk in the code. I was explained what it was there for in the IRC, and I think it should added it to the docs to prevent any further confusion!

8 years agoAuto merge of #27296 - jroesch:type-macros, r=huonw
bors [Thu, 6 Aug 2015 19:11:17 +0000 (19:11 +0000)]
Auto merge of #27296 - jroesch:type-macros, r=huonw

This pull request implements the functionality for [RFC 873](https://github.com/rust-lang/rfcs/blob/master/text/0873-type-macros.md). This is currently just an update of @freebroccolo's branch from January, the corresponding commits are linked in each commit message.

@nikomatsakis and I had talked about updating the macro language to support a lifetime fragment specifier, and it is possible to do that work on this branch as well. If so we can (collectively) talk about it next week during the pre-RustCamp work week.

8 years agoAdd another example for E0412
Guillaume Gomez [Thu, 6 Aug 2015 18:47:10 +0000 (20:47 +0200)]
Add another example for E0412

8 years agofixed the few nits!
Ruby [Thu, 6 Aug 2015 18:55:53 +0000 (19:55 +0100)]
fixed the few nits!

8 years agoExplained asterisk on & and &mut reference
Ruby [Thu, 6 Aug 2015 18:29:03 +0000 (19:29 +0100)]
Explained asterisk on & and &mut reference

8 years agoUpdate E0423 example
Guillaume Gomez [Thu, 6 Aug 2015 13:42:22 +0000 (15:42 +0200)]
Update E0423 example

8 years agoAuto merge of #27556 - taliesinb:tarpl-clarity-2, r=Gankro
bors [Thu, 6 Aug 2015 17:36:21 +0000 (17:36 +0000)]
Auto merge of #27556 - taliesinb:tarpl-clarity-2, r=Gankro

* Some clarifying rephrasing.
* Rename B.x back to B.a.
* Make null pointer optimization section bit more concrete.

r? @Gankro

8 years agocache Ty::is_simd
Ariel Ben-Yehuda [Thu, 6 Aug 2015 15:25:15 +0000 (18:25 +0300)]
cache Ty::is_simd

8 years agofix dropck overflow error message
Ariel Ben-Yehuda [Thu, 6 Aug 2015 14:43:08 +0000 (17:43 +0300)]
fix dropck overflow error message

Perf numbers:

Before this patchset:
572.70user 5.52system 7:33.21elapsed 127%CPU (0avgtext+0avgdata 1173368maxresident)k
llvm-time: 385.858

After this patch:
557.84user 5.73system 7:22.10elapsed 127%CPU (0avgtext+0avgdata 1142848maxresident)k
llvm-time: 385.834

nice 2.5% perf improvement

8 years agoAuto merge of #27434 - jeehoonkang:master, r=Gankro
bors [Thu, 6 Aug 2015 15:01:35 +0000 (15:01 +0000)]
Auto merge of #27434 - jeehoonkang:master, r=Gankro

In Section 3.2, TARPL says that "standard allocators (including jemalloc, the one used by default in Rust) generally consider passing in 0 for the size of an allocation as Undefined Behaviour."
However, the C standard and jemalloc manual says allocating zero bytes
should succeed:

- C11 7.22.3 paragraph 1: "If the size of the space requested is zero, the behavior is implementation-defined: either a null pointer is returned, or the behavior is as if the size were some nonzero value, except that the returned pointer shall not be used to access an object."
- [jemalloc manual](http://www.freebsd.org/cgi/man.cgi?query=jemalloc&sektion=3): "The malloc and calloc functions return a pointer to the allocated memory if successful; otherwise a NULL pointer is returned and errno is set to ENOMEM."
    + Note that the description for `allocm` says "Behavior is undefined if size is 0," but it is an experimental API.

r? @Gankro

8 years agohandle associated types correctly in null pointer optimization
Ariel Ben-Yehuda [Thu, 6 Aug 2015 14:00:41 +0000 (17:00 +0300)]
handle associated types correctly in null pointer optimization

Fixes #27532

Thanks @eefriedman for the test.

8 years agoremove ty::{VariantInfo, FieldTy}
Ariel Ben-Yehuda [Wed, 5 Aug 2015 22:55:13 +0000 (01:55 +0300)]
remove ty::{VariantInfo, FieldTy}

8 years agoresolve todo
Ariel Ben-Yehuda [Wed, 5 Aug 2015 22:32:04 +0000 (01:32 +0300)]
resolve todo

8 years agoremove struct_fields & enum_variants from the tcx
Ariel Ben-Yehuda [Wed, 5 Aug 2015 22:29:52 +0000 (01:29 +0300)]
remove struct_fields & enum_variants from the tcx

8 years agouse VariantDef instead of struct_fields
Ariel Ben-Yehuda [Sun, 2 Aug 2015 19:52:50 +0000 (22:52 +0300)]
use VariantDef instead of struct_fields

8 years agoAdd E0416 error explanation
Guillaume Gomez [Thu, 6 Aug 2015 13:30:33 +0000 (15:30 +0200)]
Add E0416 error explanation

8 years agoAdd E0415 error explanation
Guillaume Gomez [Thu, 6 Aug 2015 13:21:25 +0000 (15:21 +0200)]
Add E0415 error explanation

8 years agocreate VariantDef-s (but don't actually use them)
Ariel Ben-Yehuda [Wed, 22 Jul 2015 18:53:52 +0000 (21:53 +0300)]
create VariantDef-s (but don't actually use them)

8 years agoadd variant info to ADTDef, but don't actually use it
Ariel Ben-Yehuda [Wed, 22 Jul 2015 17:10:18 +0000 (20:10 +0300)]
add variant info to ADTDef, but don't actually use it

8 years agointroduce an ADTDef struct for struct/enum definitions
Ariel Ben-Yehuda [Mon, 20 Jul 2015 19:13:36 +0000 (22:13 +0300)]
introduce an ADTDef struct for struct/enum definitions

8 years agoadd an Ivar for write-only variables
Ariel Ben-Yehuda [Mon, 20 Jul 2015 12:48:24 +0000 (15:48 +0300)]
add an Ivar for write-only variables

8 years agoAdd test descriptions.
Victor Berger [Thu, 6 Aug 2015 10:48:42 +0000 (12:48 +0200)]
Add test descriptions.

8 years agoFactor inc/dec count methods.
Victor Berger [Thu, 6 Aug 2015 10:47:10 +0000 (12:47 +0200)]
Factor inc/dec count methods.

8 years agoAuto merge of #27555 - dotdash:drop_flag_ty, r=pnkfelix
bors [Thu, 6 Aug 2015 10:46:26 +0000 (10:46 +0000)]
Auto merge of #27555 - dotdash:drop_flag_ty, r=pnkfelix

The drop flags are Lvalue (and thus ByRef) datums that hold a u8 value,
so their value type should be u8, not a pointer to u8.

8 years agoAdd E0419 error explanation
Guillaume Gomez [Thu, 6 Aug 2015 10:07:55 +0000 (12:07 +0200)]
Add E0419 error explanation

8 years agoTRPL/lifetimes.md: Fix typo lifteimes -> lifetimes
Marko Lalic [Thu, 6 Aug 2015 09:57:55 +0000 (11:57 +0200)]
TRPL/lifetimes.md: Fix typo lifteimes -> lifetimes

8 years agoAdd examples in E0412
Guillaume Gomez [Thu, 6 Aug 2015 09:57:53 +0000 (11:57 +0200)]
Add examples in E0412

8 years agoFix expected parse error
Jared Roesch [Wed, 5 Aug 2015 21:18:29 +0000 (14:18 -0700)]
Fix expected parse error

8 years agoAuto merge of #27557 - Manishearth:rollup, r=Manishearth
bors [Thu, 6 Aug 2015 06:59:19 +0000 (06:59 +0000)]
Auto merge of #27557 - Manishearth:rollup, r=Manishearth

- Successful merges: #27546, #27550
- Failed merges:

8 years agoRevise TARPL's description for allocating 0 bytes
Jeehoon Kang [Fri, 31 Jul 2015 14:55:01 +0000 (23:55 +0900)]
Revise TARPL's description for allocating 0 bytes

In Section 3.2, TARPL says that "standard allocators (including jemalloc, the one used by default in Rust) generally consider passing in 0 for the size of an allocation as Undefined Behaviour."
However, the C standard and jemalloc manual says allocating zero bytes
should succeed:

- C11 7.22.3 paragraph 1: "If the size of the space requested is zero, the behavior is implementation-defined: either a null pointer is returned, or the behavior is as if the size were some nonzero value, except that the returned pointer shall not be used to access an object."
- [jemalloc manual](http://www.freebsd.org/cgi/man.cgi?query=jemalloc&sektion=3): "The malloc and calloc functions return a pointer to the allocated memory if successful; otherwise a NULL pointer is returned and errno is set to ENOMEM."
    + Note that the description for `allocm` says "Behavior is undefined if size is 0," but it is an experimental API.

8 years agoRollup merge of #27550 - tshepang:missing-info, r=brson
Manish Goregaokar [Thu, 6 Aug 2015 06:12:57 +0000 (11:42 +0530)]
Rollup merge of #27550 - tshepang:missing-info, r=brson

8 years agoRollup merge of #27546 - steveklabnik:gh26115, r=brson
Manish Goregaokar [Thu, 6 Aug 2015 06:12:56 +0000 (11:42 +0530)]
Rollup merge of #27546 - steveklabnik:gh26115, r=brson

Fixes #26115

8 years agoSome rerp-rust improvements.
Taliesin Beynon [Thu, 6 Aug 2015 06:04:11 +0000 (02:04 -0400)]
Some rerp-rust improvements.

* Some clarifying rephrasing.
* Rename B.x back to B.a.
* Make null pointer optimization section bit more concrete.

8 years agoUse the right type for drop flag datums
Björn Steinbrink [Thu, 6 Aug 2015 05:43:46 +0000 (07:43 +0200)]
Use the right type for drop flag datums

The drop flags are Lvalue (and thus ByRef) datums that hold a u8 value,
so their value type should be u8, not a pointer to u8.

8 years agoAuto merge of #27548 - tamird:opaque-ctypes, r=alexcrichton
bors [Thu, 6 Aug 2015 05:19:16 +0000 (05:19 +0000)]
Auto merge of #27548 - tamird:opaque-ctypes, r=alexcrichton

r? @alexcrichton

8 years agoAuto merge of #27545 - apasel422:btree-range, r=Gankro
bors [Thu, 6 Aug 2015 03:40:42 +0000 (03:40 +0000)]
Auto merge of #27545 - apasel422:btree-range, r=Gankro

This permits collections with `String` keys to be ranged over with
`&str` bounds. The `K` defaults for `Min` and `Max` permit the default
type parameter fallback to work with things like

```rust
use std::collections::{BTreeSet, Bound};
let set = BTreeSet::<String>::new();
set.range(Bound::Included("a"), Bound::Unbounded);
```

Without the defaults, the type of the maximum bound would be
unconstrained.

r? @Gankro

8 years agobook: some improvements to Advanced Linking
Tshepang Lekhonkhobe [Thu, 6 Aug 2015 00:31:38 +0000 (02:31 +0200)]
book: some improvements to Advanced Linking

8 years agoAuto merge of #27505 - steveklabnik:exterminate_exterminate, r=brson
bors [Wed, 5 Aug 2015 23:53:48 +0000 (23:53 +0000)]
Auto merge of #27505 - steveklabnik:exterminate_exterminate, r=brson

These are for syntaxes that haven't existed for a long time.

8 years agodoc: add info about the u64 wrapped in Result
Tshepang Lekhonkhobe [Wed, 5 Aug 2015 22:48:57 +0000 (00:48 +0200)]
doc: add info about the u64 wrapped in Result

8 years agoBetter FFI discipline
Tamir Duberstein [Wed, 5 Aug 2015 21:50:18 +0000 (17:50 -0400)]
Better FFI discipline

8 years agoAuto merge of #27544 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 5 Aug 2015 21:34:19 +0000 (21:34 +0000)]
Auto merge of #27544 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #27285, #27524, #27533, #27535, #27538, #27539
- Failed merges:

8 years agoUpdate tests and add some more.
Victor Berger [Wed, 5 Aug 2015 19:56:49 +0000 (21:56 +0200)]
Update tests and add some more.

8 years agoFully generalize `BTree{Map, Set}` range iterators
Andrew Paseltiner [Wed, 5 Aug 2015 19:12:10 +0000 (15:12 -0400)]
Fully generalize `BTree{Map, Set}` range iterators

This permits collections with `String` keys to be ranged over with
`&str` bounds. The `K` defaults for `Min` and `Max` permit the default
type parameter fallback to work with things like

```rust
use std::collections::{BTreeSet, Bound};
let set = BTreeSet::<String>::new();
set.range(Bound::Included("a"), Bound::Unbounded);
```

Without the defaults, the type of the maximum bound would be
unconstrained.

8 years agoBlock import resolution only on 'pub' imports.
Victor Berger [Wed, 5 Aug 2015 19:47:01 +0000 (21:47 +0200)]
Block import resolution only on 'pub' imports.

When resolving 'use' statements, only consider pub imports of the
target module as blocking.

Closes #4865

8 years agoAdd an example to Trait section of reference
Steve Klabnik [Wed, 5 Aug 2015 19:31:19 +0000 (15:31 -0400)]
Add an example to Trait section of reference

Fixes #26115

8 years agoRollup merge of #27539 - steveklabnik:gh26746, r=brson
Steve Klabnik [Wed, 5 Aug 2015 19:09:50 +0000 (15:09 -0400)]
Rollup merge of #27539 - steveklabnik:gh26746, r=brson

1. mention them in the function chapter
2. mention their coercion to closures in the closures chapter

Fixes #26746

8 years agoRollup merge of #27538 - steveklabnik:gh26917, r=Gankro
Steve Klabnik [Wed, 5 Aug 2015 19:09:50 +0000 (15:09 -0400)]
Rollup merge of #27538 - steveklabnik:gh26917, r=Gankro

We haven't discussed this syntax yet, so provide a basic explanation
and link up to later chapters.

Fixes #26917

8 years agoRollup merge of #27535 - steveklabnik:for_jhun, r=alexcrichton
Steve Klabnik [Wed, 5 Aug 2015 19:09:50 +0000 (15:09 -0400)]
Rollup merge of #27535 - steveklabnik:for_jhun, r=alexcrichton

'work' can refer to the game itself, ie, 'this compiles but the game isn't finished,'
so 'compile' is a more clear way to describe the problem.

Thanks jhun on irc

8 years agoRollup merge of #27533 - steveklabnik:gh27109, r=Gankro
Steve Klabnik [Wed, 5 Aug 2015 19:09:49 +0000 (15:09 -0400)]
Rollup merge of #27533 - steveklabnik:gh27109, r=Gankro

This should be a bit more prominent.

Fixes #27109

8 years agoRollup merge of #27524 - steveklabnik:gh27523, r=gankro
Steve Klabnik [Wed, 5 Aug 2015 19:09:49 +0000 (15:09 -0400)]
Rollup merge of #27524 - steveklabnik:gh27523, r=gankro

This wording was too strong.

Fixes #27523

8 years agoRollup merge of #27285 - lastorset:trait-operator-impl, r=steveklabnik
Steve Klabnik [Wed, 5 Aug 2015 19:09:49 +0000 (15:09 -0400)]
Rollup merge of #27285 - lastorset:trait-operator-impl, r=steveklabnik

I also included some smaller trait-related changes.

Fixes #26991.

r? @shepmaster
r? @steveklabnik

8 years agoAuto merge of #27534 - alexcrichton:revert-adding-gdb-pp-tests, r=michaelwoerister
bors [Wed, 5 Aug 2015 18:48:53 +0000 (18:48 +0000)]
Auto merge of #27534 - alexcrichton:revert-adding-gdb-pp-tests, r=michaelwoerister

… are not actually broken."

This reverts commit 354cf4b56b8e2af67cc68965eb816deec0e79e4b.

Unfortunately these [tests are failing](http://buildbot.rust-lang.org/builders/nightly-dist-rustc-linux/builds/224/steps/distcheck/logs/stdio) on the snapshot/nightly bots with the [same message](https://gist.github.com/alexcrichton/611705ded07b0d73ded9) found in #27514

8 years agoAdd more infor about function pointers to TRPL
Steve Klabnik [Wed, 5 Aug 2015 17:44:54 +0000 (13:44 -0400)]
Add more infor about function pointers to TRPL

1. mention them in the function chapter
2. mention their coercion to closures in the closures chapter

Fixes #26746

8 years agoClarify claims about PhantomData<T>.
Steve Klabnik [Tue, 4 Aug 2015 20:43:45 +0000 (16:43 -0400)]
Clarify claims about PhantomData<T>.

This wording was too strong.

Fixes #27523

8 years agoExpand further on <> syntax in TRPL.
Steve Klabnik [Wed, 5 Aug 2015 17:23:22 +0000 (13:23 -0400)]
Expand further on <> syntax in TRPL.

We haven't discussed this syntax yet, so provide a basic explanation
and link up to later chapters.

Fixes #26917

8 years agoMake note of Hash in Borrow's docs
Steve Klabnik [Wed, 5 Aug 2015 16:16:37 +0000 (12:16 -0400)]
Make note of Hash in Borrow's docs

This should be a bit more prominent.

Fixes #27109

8 years agowork -> compile in Guessing Game
Steve Klabnik [Wed, 5 Aug 2015 16:30:00 +0000 (12:30 -0400)]
work -> compile in Guessing Game

'work' can refer to the game itself, ie, 'this compiles but the game isn't finished,'
so 'compile' is a more clear way to describe the problem.

Thanks jhun on irc

8 years agoRevert "debuginfo: Bring back some GDB pretty printing autotests that are not actuall...
Alex Crichton [Wed, 5 Aug 2015 16:20:28 +0000 (09:20 -0700)]
Revert "debuginfo: Bring back some GDB pretty printing autotests that are not actually broken."

This reverts commit 354cf4b56b8e2af67cc68965eb816deec0e79e4b.