]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRemove #[static_assert]
Steve Klabnik [Tue, 28 Apr 2015 20:45:22 +0000 (16:45 -0400)]
Remove #[static_assert]

This was always a weird feature, and isn't being used in the compiler.
Static assertions should be done better than this.

This implements RFC #1096.

Fixes #13951
Fixes #23008
Fixes #6676

This is behind a feature gate, but that's still a

[breaking-change]

9 years agoAuto merge of #25984 - Manishearth:rollup, r=Manishearth
bors [Wed, 3 Jun 2015 09:44:26 +0000 (09:44 +0000)]
Auto merge of #25984 - Manishearth:rollup, r=Manishearth

- Successful merges: #25939, #25963, #25970, #25971, #25974
- Failed merges:

9 years agoRollup merge of #25974 - richo:stack-msg, r=alexcrichton
Manish Goregaokar [Wed, 3 Jun 2015 09:16:41 +0000 (14:46 +0530)]
Rollup merge of #25974 - richo:stack-msg, r=alexcrichton

These are implemented in asm, they're just not inlined.

Open questions are:
* Should I just inline them? They're.. big, but it seems as though this needs violates the #[inline(always)] gaurantees the others make.
* Does something (llvm?) provide these as intrinsics? The structure of this code suggests that we could be hoisting off something else, instead of flagrantly ignoring it like we do for power and mips.

9 years agoRollup merge of #25971 - richo:configurable-python, r=alexcrichton
Manish Goregaokar [Wed, 3 Jun 2015 09:16:41 +0000 (14:46 +0530)]
Rollup merge of #25971 - richo:configurable-python, r=alexcrichton

r? @alexcrichton

9 years agoRollup merge of #25970 - gkoz:make_compiler_docs, r=brson
Manish Goregaokar [Wed, 3 Jun 2015 09:16:41 +0000 (14:46 +0530)]
Rollup merge of #25970 - gkoz:make_compiler_docs, r=brson

9 years agoRollup merge of #25963 - steveklabnik:link_to_cell, r=alexcrichton
Manish Goregaokar [Wed, 3 Jun 2015 09:16:40 +0000 (14:46 +0530)]
Rollup merge of #25963 - steveklabnik:link_to_cell, r=alexcrichton

9 years agoRollup merge of #25939 - wca:fix-freebsd-configure, r=alexcrichton
Manish Goregaokar [Wed, 3 Jun 2015 09:16:40 +0000 (14:46 +0530)]
Rollup merge of #25939 - wca:fix-freebsd-configure, r=alexcrichton

Bug fixes for configure on FreeBSD:
- Don't ban using gcc; newer versions can be installed and other checks should enforce its suitability.
- Don't force Rust to link itself with /usr/local/lib{,gcc4[46]}, which causes builds to fail if Rust is already installed.  I've not been able to find an use case where this is actually necessary.

9 years agoAuto merge of #25938 - wca:fix-clang-check-compatibility, r=alexcrichton
bors [Wed, 3 Jun 2015 06:07:44 +0000 (06:07 +0000)]
Auto merge of #25938 - wca:fix-clang-check-compatibility, r=alexcrichton

Not all /bin/sh have [[ available, so for compatibility using case..esac
for pattern matching is better.

9 years agoAuto merge of #25935 - wesleywiser:fix_libcollection_build_warnings, r=alexcrichton
bors [Wed, 3 Jun 2015 02:47:45 +0000 (02:47 +0000)]
Auto merge of #25935 - wesleywiser:fix_libcollection_build_warnings, r=alexcrichton

Fixes a bunch of warnings that are generated during the stage0 build of libcollections.

9 years agostd: clarify comments about sp* implementations
Richo Healey [Tue, 2 Jun 2015 23:55:50 +0000 (16:55 -0700)]
std: clarify comments about sp* implementations

9 years agoAuto merge of #25867 - petrochenkov:ucellv, r=alexcrichton
bors [Tue, 2 Jun 2015 23:23:32 +0000 (23:23 +0000)]
Auto merge of #25867 - petrochenkov:ucellv, r=alexcrichton

Now when const functions are implemented and used, the `value` field of `UnsafeCell` can be made deprecated (and then private as intended).

9 years agoconfigure: Allow specifying your python with --python
Richo Healey [Tue, 2 Jun 2015 22:16:30 +0000 (15:16 -0700)]
configure: Allow specifying your python with --python

9 years agomk: fix the CFG_ENABLE_COMPILER_DOCS spelling
Gleb Kozyrev [Tue, 2 Jun 2015 21:49:47 +0000 (00:49 +0300)]
mk: fix the CFG_ENABLE_COMPILER_DOCS spelling

9 years agoAuto merge of #25926 - Ms2ger:enum_variant_ids, r=alexcrichton
bors [Tue, 2 Jun 2015 20:05:49 +0000 (20:05 +0000)]
Auto merge of #25926 - Ms2ger:enum_variant_ids, r=alexcrichton

9 years agoAuto merge of #25868 - alexcrichton:issue-25505, r=brson
bors [Tue, 2 Jun 2015 16:37:21 +0000 (16:37 +0000)]
Auto merge of #25868 - alexcrichton:issue-25505, r=brson

The compiler already has special support for fixing up verbatim paths with disks
on Windows to something that can be correctly passed down to gcc, and this
commit adds support for verbatim UNC paths as well.

Closes #25505

9 years agoLink to cell in TRPL: mutability
Steve Klabnik [Tue, 2 Jun 2015 13:37:54 +0000 (09:37 -0400)]
Link to cell in TRPL: mutability

9 years agoAuto merge of #25905 - michaelwoerister:lldb-pp-strings, r=brson
bors [Tue, 2 Jun 2015 13:07:41 +0000 (13:07 +0000)]
Auto merge of #25905 - michaelwoerister:lldb-pp-strings, r=brson

GDB and LLDB pretty printers have some common functionality and also access some common information, such as the layout of standard library types. So far, this information has been duplicated in the two pretty printing python modules. This PR introduces a common module used by both debuggers.

This PR also implements proper rendering of `String` and `&str` values in LLDB.

9 years agoAuto merge of #25958 - Manishearth:rollup, r=Manishearth
bors [Tue, 2 Jun 2015 08:28:20 +0000 (08:28 +0000)]
Auto merge of #25958 - Manishearth:rollup, r=Manishearth

- Successful merges: #25751, #25821, #25920, #25932, #25933, #25936, #25941, #25949, #25951
- Failed merges:

9 years agoRollup merge of #25951 - mbrubeck:nan, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:09 +0000 (11:14 +0530)]
Rollup merge of #25951 - mbrubeck:nan, r=alexcrichton

This is based on the documented behavior of cmath::{fmin,fmax}.  It is also tested by existing unit tests in this module.

9 years agoRollup merge of #25949 - mbrubeck:ndebug, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:09 +0000 (11:14 +0530)]
Rollup merge of #25949 - mbrubeck:ndebug, r=alexcrichton

As of rust-lang/rust#22980 only `cfg(debug_assertions)` is used in the
standard library and rustc code.

9 years agoRollup merge of #25941 - puzza007:trpl-infinite-iterator-chain-take, r=steveklabnik
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25941 - puzza007:trpl-infinite-iterator-chain-take, r=steveklabnik

9 years agoRollup merge of #25936 - tshepang:patch-2, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25936 - tshepang:patch-2, r=alexcrichton

9 years agoRollup merge of #25933 - bluss:rustdoc-fn-css, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25933 - bluss:rustdoc-fn-css, r=alexcrichton

rustdoc: Tweak css of function where clauses

Method where clauses are put indented on a new line, do the same tweak
to free functions, which makes it cleaner and easier to read.

9 years agoRollup merge of #25932 - bluss:doc-book-1, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25932 - bluss:doc-book-1, r=alexcrichton

trpl: Fix typo in Raw Pointers chapter

9 years agoRollup merge of #25920 - tshepang:option-map-example, r=Gankro
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25920 - tshepang:option-map-example, r=Gankro

9 years agoRollup merge of #25821 - jooert:remove_build_date, r=brson
Manish Goregaokar [Tue, 2 Jun 2015 05:44:07 +0000 (11:14 +0530)]
Rollup merge of #25821 - jooert:remove_build_date, r=brson

Closes #25812.

9 years agoRollup merge of #25751 - steveklabnik:translations, r=brson
Manish Goregaokar [Tue, 2 Jun 2015 05:44:07 +0000 (11:14 +0530)]
Rollup merge of #25751 - steveklabnik:translations, r=brson

/cc @kgv, @rust-kr, @KaiserY, @mkpankov

9 years agoAuto merge of #25848 - alexcrichton:fix-msvc, r=brson
bors [Tue, 2 Jun 2015 05:12:51 +0000 (05:12 +0000)]
Auto merge of #25848 - alexcrichton:fix-msvc, r=brson

Now that MSVC support has landed in the most recent nightlies we can now have
MSVC bootstrap itself without going through a GNU compiler first. Unfortunately,
however, the bootstrap currently fails due to the compiler not being able to
find the llvm-ar.exe tool during the stage0 libcore compile. The compiler cannot
find this tool because it's looking inside a directory that does not exist:

    $SYSROOT/rustlib/x86_64-pc-windows-gnu/bin

The `gnu` on this triple is because the bootstrap compiler's host architecture
is GNU. The build system, however, only arranges for the llvm-ar.exe tool to be
available in this location:

    $SYSROOT/rustlib/x86_64-pc-windows-msvc/bin

To resolve this discrepancy, the build system has been modified to understand
triples that are bootstrapped from another triple, and in this case copy the
native tools to the right location.

9 years agoAuto merge of #25654 - petrochenkov:encenv, r=alexcrichton
bors [Tue, 2 Jun 2015 02:08:17 +0000 (02:08 +0000)]
Auto merge of #25654 - petrochenkov:encenv, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/25268 and a couple of similar test errors

r? @alexcrichton

9 years ago[libcollections] Fix unused import warnings during stage0 build
Wesley Wiser [Sat, 30 May 2015 23:49:56 +0000 (19:49 -0400)]
[libcollections] Fix unused import warnings during stage0 build

9 years agoAuto merge of #25246 - mzabaluev:io-invalid-data, r=alexcrichton
bors [Mon, 1 Jun 2015 23:12:52 +0000 (23:12 +0000)]
Auto merge of #25246 - mzabaluev:io-invalid-data, r=alexcrichton

This takes the cases from `InvalidInput` where a data format error
was encountered. This is different from the documented semantics
of `InvalidInput`, which more likely indicate a programming error.

Fixes rust-lang/rfcs#906

9 years agoDocument behavior of {f32,f64}::{min,max} on NaN
Matt Brubeck [Mon, 1 Jun 2015 21:59:30 +0000 (14:59 -0700)]
Document behavior of {f32,f64}::{min,max} on NaN

This is based on the documented behavior of cmath::{fmin,fmax}.  It is also
tested by existing unit tests in this module.

9 years agoStop passing the old ndebug/debug cfg directives
Matt Brubeck [Mon, 1 Jun 2015 21:01:13 +0000 (14:01 -0700)]
Stop passing the old ndebug/debug cfg directives

As of rust-lang/rust#22980 only `cfg(debug_assertions)` is used in the
standard library and rustc code.

9 years agoAdd community translations.
Steve Klabnik [Sun, 24 May 2015 15:37:11 +0000 (11:37 -0400)]
Add community translations.

9 years agoAuto merge of #25858 - alexcrichton:disable-os-tls, r=brson
bors [Mon, 1 Jun 2015 19:51:57 +0000 (19:51 +0000)]
Auto merge of #25858 - alexcrichton:disable-os-tls, r=brson

This commit adds a ./configure option called `--disable-elf-tls` which disables
ELF based TLS (that which is communicated to LLVM) on platforms which already
support it. OSX 10.6 does not support this form of TLS, and some users of Rust
need to target 10.6 and are unable to do so due to the usage of TLS. The
standard library will continue to use ELF based TLS on OSX by default (as the
officially supported platform is 10.7+), but this adds an option to compile the
standard library in a way that is compatible with 10.6.

Closes #25342

9 years agodoc: improve Option::map example
Tshepang Lekhonkhobe [Sun, 31 May 2015 07:37:52 +0000 (09:37 +0200)]
doc: improve Option::map example

9 years agoFix platform detection
petrochenkov [Mon, 1 Jun 2015 17:50:35 +0000 (20:50 +0300)]
Fix platform detection

9 years agoAuto merge of #25825 - GuillaumeGomez:check_co, r=Manishearth
bors [Mon, 1 Jun 2015 10:59:37 +0000 (10:59 +0000)]
Auto merge of #25825 - GuillaumeGomez:check_co, r=Manishearth

Part of #24407.

9 years agotrpl: Use infinite iterator in chain example with take
Paul Oliver [Mon, 1 Jun 2015 10:44:50 +0000 (12:44 +0200)]
trpl: Use infinite iterator in chain example with take

9 years agoUpdate diagnostics.rs
Guillaume Gomez [Mon, 1 Jun 2015 10:33:41 +0000 (12:33 +0200)]
Update diagnostics.rs

9 years agoRemove full path
Guillaume Gomez [Mon, 1 Jun 2015 08:46:28 +0000 (10:46 +0200)]
Remove full path

9 years agoReturn an iterator from enum_variant_ids.
Ms2ger [Sun, 31 May 2015 14:02:45 +0000 (16:02 +0200)]
Return an iterator from enum_variant_ids.

9 years agoAuto merge of #25924 - FuGangqiang:master, r=Gankro
bors [Mon, 1 Jun 2015 04:57:00 +0000 (04:57 +0000)]
Auto merge of #25924 - FuGangqiang:master, r=Gankro

9 years agoAuto merge of #25923 - tshepang:patch-1, r=Gankro
bors [Mon, 1 Jun 2015 02:18:49 +0000 (02:18 +0000)]
Auto merge of #25923 - tshepang:patch-1, r=Gankro

9 years agoAuto merge of #25922 - tshepang:better-map-or-doc, r=Gankro
bors [Mon, 1 Jun 2015 00:45:44 +0000 (00:45 +0000)]
Auto merge of #25922 - tshepang:better-map-or-doc, r=Gankro

`def` is also ambiguous

9 years agoAuto merge of #25907 - tshepang:patch-8, r=Gankro
bors [Sun, 31 May 2015 23:13:26 +0000 (23:13 +0000)]
Auto merge of #25907 - tshepang:patch-8, r=Gankro

9 years agodoc: make String::as_bytes example more simple
Tshepang Lekhonkhobe [Sun, 31 May 2015 22:26:11 +0000 (00:26 +0200)]
doc: make String::as_bytes example more simple

9 years agoAuto merge of #25911 - olombard:borrowing-link, r=alexcrichton
bors [Sun, 31 May 2015 21:40:47 +0000 (21:40 +0000)]
Auto merge of #25911 - olombard:borrowing-link, r=alexcrichton

r? @steveklabnik

9 years agorustdoc: Tweak css of function where clauses
Ulrik Sverdrup [Sun, 31 May 2015 20:46:19 +0000 (22:46 +0200)]
rustdoc: Tweak css of function where clauses

Method where clauses are put indented on a new line, do the same tweak
to free functions, which makes it cleaner and easier to read.

9 years agotrpl: Fix typo in Raw Pointers chapter
Ulrik Sverdrup [Sun, 31 May 2015 20:35:34 +0000 (22:35 +0200)]
trpl: Fix typo in Raw Pointers chapter

9 years agoAuto merge of #25908 - bluss:arc-mark-unsafe, r=sfackler
bors [Sun, 31 May 2015 20:07:49 +0000 (20:07 +0000)]
Auto merge of #25908 - bluss:arc-mark-unsafe, r=sfackler

Mark Arc function get_mut and method make_unique unsafe

This is a temporary mitigation for issue #24880 which points out that
these functions are racy in a particular situation where weak pointers
exist.

To mitigate this, mark the functions unsafe until this can be fixed or
another decision is made.

9 years agoAuto merge of #25927 - stevegury:patch-1, r=steveklabnik
bors [Sun, 31 May 2015 17:39:26 +0000 (17:39 +0000)]
Auto merge of #25927 - stevegury:patch-1, r=steveklabnik

`(1..100).map(|x| x + 1)` is actually mapping [1,100) to [2,101)

9 years agoAdd E0011 explanation
Guillaume Gomez [Fri, 29 May 2015 22:44:22 +0000 (00:44 +0200)]
Add E0011 explanation

9 years agoUpdate iterators.md
Steve Gury [Sun, 31 May 2015 17:24:30 +0000 (10:24 -0700)]
Update iterators.md

Fix the actual off by one

9 years agoFix off by one in the iterator documentation
Steve Gury [Sun, 31 May 2015 14:32:21 +0000 (07:32 -0700)]
Fix off by one in the iterator documentation

`(1..100).map(|x| x + 1)` is actually mapping [1,100) to [2,101)

9 years agotrpl:add missing comma
FuGangqiang [Sun, 31 May 2015 10:16:58 +0000 (18:16 +0800)]
trpl:add missing comma

9 years agoAuto merge of #25921 - eddyb:inline-calculate-offsets, r=Aatch
bors [Sun, 31 May 2015 09:53:49 +0000 (09:53 +0000)]
Auto merge of #25921 - eddyb:inline-calculate-offsets, r=Aatch

The `HashMap` and `HashSet` iterators use `RawTable::first_bucket_raw` which is generic and will get inlined cross-crate.
However, `first_bucket_raw` calls `calculate_offsets` and the call doesn't get inlined, despite being a simple function.
This missing `#[inline]` results in `hash_table::calculate_offsets` showing up at the top of a callgrind profile with 3 million calls (for the testcase in #25916).

9 years agodoc: fix displayed message
Tshepang Lekhonkhobe [Sun, 31 May 2015 08:49:22 +0000 (10:49 +0200)]
doc: fix displayed message

9 years agodoc: improve map_or and map_or_else
Tshepang Lekhonkhobe [Sun, 31 May 2015 08:16:49 +0000 (10:16 +0200)]
doc: improve map_or and map_or_else

9 years agoInline hash_table::calculate_offsets, used by iterators.
Eduard Burtescu [Sun, 31 May 2015 08:03:46 +0000 (11:03 +0300)]
Inline hash_table::calculate_offsets, used by iterators.

The `HashMap` and `HashSet` iterators use `RawTable::first_bucket_raw` which is generic and will get inlined cross-crate.
However, `first_bucket_raw` calls `calculate_offsets` and the call doesn't get inlined, despite being a simple function.
This missing `#[inline]` results in `hash_table::calculate_offsets` showing up at the top of a callgrind profile with 3 million calls (for the testcase in #25916).

9 years agoAuto merge of #25914 - andars:master, r=sanxiyn
bors [Sun, 31 May 2015 07:29:25 +0000 (07:29 +0000)]
Auto merge of #25914 - andars:master, r=sanxiyn

Previous:
```
    --disable-llvm-version-check     don't don't check if the LLVM version is supported, build anyway
```

New:
```
    --disable-llvm-version-check     don't check if the LLVM version is supported, build anyway
```

9 years agoremove duplicate "don't"
Andrew Foote [Sun, 31 May 2015 01:12:32 +0000 (18:12 -0700)]
remove duplicate "don't"

9 years agoTRPL: Fix a broken link to 'borrowing'
olombard [Sat, 30 May 2015 21:43:23 +0000 (23:43 +0200)]
TRPL: Fix a broken link to 'borrowing'

9 years agoAuto merge of #25882 - steveklabnik:gh25554, r=alexcrichton
bors [Sat, 30 May 2015 21:10:07 +0000 (21:10 +0000)]
Auto merge of #25882 - steveklabnik:gh25554, r=alexcrichton

Fixes #25554

9 years agoMark Arc function get_mut and method make_unique unsafe
Ulrik Sverdrup [Sat, 30 May 2015 20:03:57 +0000 (22:03 +0200)]
Mark Arc function get_mut and method make_unique unsafe

This is a temporary mitigation for issue #24880 which points out that
these functions are racy in a particular situation where weak pointers
exist.

To mitigate this, mark the functions unsafe until this can be fixed or
another decision is made.

This is a breaking change to unstable API, because the new version
requires an `unsafe` block. Review carefully if weak pointers may race
for any uses of this API and consider abandoning it.

[breaking-change]

9 years agodoc: be more clear/explicit that we got String type
Tshepang Lekhonkhobe [Sat, 30 May 2015 19:21:56 +0000 (21:21 +0200)]
doc: be more clear/explicit that we got String type

9 years agodebuginfo: Create common debugger pretty printer module.
Michael Woerister [Sat, 9 May 2015 14:48:36 +0000 (16:48 +0200)]
debuginfo: Create common debugger pretty printer module.

GDB and LLDB pretty printers have some common functionality
and also access some common information, such as the layout of
standard library types. So far, this information has been
duplicated in the two pretty printing python modules. This
commit introduces a common module used by both debuggers.

9 years agoAuto merge of #25904 - benaryorg:master, r=steveklabnik
bors [Sat, 30 May 2015 17:09:53 +0000 (17:09 +0000)]
Auto merge of #25904 - benaryorg:master, r=steveklabnik

perhaps the smallest and least useful fix in the whole history of rust

I will not blame you if you do not want to merge it

9 years agoWarn if the test suite is run on Windows in console with non-UTF-8 code page
petrochenkov [Sat, 30 May 2015 16:22:12 +0000 (19:22 +0300)]
Warn if the test suite is run on Windows in console with non-UTF-8 code page

9 years agofix documentation in libserialize
benaryorg [Sat, 30 May 2015 15:41:09 +0000 (17:41 +0200)]
fix documentation in libserialize

the object was serialized with an 'i' but the comment stated the print command
would output 'j'

9 years agostd::io: bump the stability tag on ErrorKind::InvalidData to 1.2.0
Mikhail Zabaluev [Sat, 30 May 2015 12:09:13 +0000 (15:09 +0300)]
std::io: bump the stability tag on ErrorKind::InvalidData to 1.2.0

9 years agoDeprecate UnsafeCell::value
petrochenkov [Sat, 30 May 2015 09:15:19 +0000 (12:15 +0300)]
Deprecate UnsafeCell::value

9 years agoAuto merge of #25818 - sfackler:socket-timeouts, r=alexcrichton
bors [Sat, 30 May 2015 04:20:20 +0000 (04:20 +0000)]
Auto merge of #25818 - sfackler:socket-timeouts, r=alexcrichton

Closes #25619

r? @alexcrichton

9 years agoLoosen timeout restrictions
Steven Fackler [Sat, 30 May 2015 02:09:29 +0000 (19:09 -0700)]
Loosen timeout restrictions

9 years agoAuto merge of #25817 - XMPPwocky:once_cleanedup, r=alexcrichton
bors [Sat, 30 May 2015 01:12:35 +0000 (01:12 +0000)]
Auto merge of #25817 - XMPPwocky:once_cleanedup, r=alexcrichton

Closes #24443.

9 years agoAuto merge of #25888 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 29 May 2015 21:00:26 +0000 (21:00 +0000)]
Auto merge of #25888 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #25788, #25861, #25864, #25865, #25866, #25873, #25876, #25883, #25886
- Failed merges:

9 years agoRollup merge of #25886 - nhowell:patch-1, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25886 - nhowell:patch-1, r=steveklabnik

r? @steveklabnik

9 years agoRollup merge of #25883 - steveklabnik:gh25417, r=alexcrichton
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25883 - steveklabnik:gh25417, r=alexcrichton

Fixes #25417

9 years agoRollup merge of #25876 - tshepang:patch-3, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25876 - tshepang:patch-3, r=steveklabnik

9 years agoRollup merge of #25873 - nham:update_E0015, r=Aatch
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25873 - nham:update_E0015, r=Aatch

The E0397 explanation, as I've written it, isn't really an explanation, but I'm not sure what to put here. I will happily take suggestions.

Partially addresses https://github.com/rust-lang/rust/issues/25851

9 years agoRollup merge of #25866 - jooert:update_guidelines, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25866 - jooert:update_guidelines, r=steveklabnik

So that rust-guidelines can be deleted and src/doc/style can prosper as the official home of the rust guidelines. :smiley:

9 years agoRollup merge of #25865 - azerupi:patch-2, r=alexcrichton
Steve Klabnik [Fri, 29 May 2015 19:24:46 +0000 (15:24 -0400)]
Rollup merge of #25865 - azerupi:patch-2, r=alexcrichton

"workd" corrected to "world"

9 years agoRollup merge of #25864 - azerupi:patch-1, r=alexcrichton
Steve Klabnik [Fri, 29 May 2015 19:24:46 +0000 (15:24 -0400)]
Rollup merge of #25864 - azerupi:patch-1, r=alexcrichton

There was no opening parenthesis for this closing parenthesis...

9 years agoRollup merge of #25861 - tringenbach:master, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:46 +0000 (15:24 -0400)]
Rollup merge of #25861 - tringenbach:master, r=steveklabnik

This adds an example from mem::swap, and provides some suggested uses of this
function.

This is my attempt to summarize the answers to a question I asked on reddit http://www.reddit.com/r/rust/comments/37jcul/what_is_forget_for/ and add the answers to the documentation so that no one else has to google or ask the question again.

9 years agoRollup merge of #25788 - maxjacobson:add-missing-space-to-glossary, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:46 +0000 (15:24 -0400)]
Rollup merge of #25788 - maxjacobson:add-missing-space-to-glossary, r=steveklabnik

r? @steveklabnik

9 years agoAuto merge of #25494 - alexcrichton:stdio-from-raw, r=aturon
bors [Fri, 29 May 2015 19:24:40 +0000 (19:24 +0000)]
Auto merge of #25494 - alexcrichton:stdio-from-raw, r=aturon

This commit implements a number of standard traits for the standard library's
process I/O handles. The `FromRaw{Fd,Handle}` traits are now implemented for the
`Stdio` type and the `AsRaw{Fd,Handle}` traits are now implemented for the
`Child{Stdout,Stdin,Stderr}` types.

The stability markers for these implementations mention that they are stable for
1.1 as I will nominate this commit for cherry-picking to beta.

9 years agostd::io: New ErrorKind value InvalidData
Mikhail Zabaluev [Sat, 9 May 2015 15:57:26 +0000 (18:57 +0300)]
std::io: New ErrorKind value InvalidData

This takes the cases from InvalidInput where a data format error
was encountered. This is different from the documented semantics
of InvalidInput, which more likely indicate a programming error.

9 years agoImplement RFC 771: std::iter::once
Nathaniel Theis [Tue, 26 May 2015 23:39:18 +0000 (16:39 -0700)]
Implement RFC 771: std::iter::once

9 years agoImprove mem::forget documentation
Tim Ringenbach [Thu, 28 May 2015 18:04:17 +0000 (13:04 -0500)]
Improve mem::forget documentation

This adds an example from mem::swap, and provides some suggested uses of this
function.

Change wording on comment on forget line to be more specific as to why we
need to call forget.

This breaks the examples up into three pieces. The last piece isn't
compiling for some reason.

9 years agotrpl: eight sections, not seven
Nick Howell [Fri, 29 May 2015 18:29:35 +0000 (14:29 -0400)]
trpl: eight sections, not seven

9 years agoAuto merge of #25880 - nikomatsakis:const-fn-feature-gate-calls, r=alexcrichton
bors [Fri, 29 May 2015 17:38:40 +0000 (17:38 +0000)]
Auto merge of #25880 - nikomatsakis:const-fn-feature-gate-calls, r=alexcrichton

The previous feature gate assumed we would not define any (stable) const fns. But then @eddyb went and cleaned up the code. So this now extends the feature-gate to prohibit calls; but calls inside of macros are considered ok.

r? @alexcrichton

9 years agoAdd syntax for multiple lifetimes
Steve Klabnik [Fri, 29 May 2015 16:37:18 +0000 (12:37 -0400)]
Add syntax for multiple lifetimes

Fixes #25417

9 years agoMake note about $ more prominent.
Steve Klabnik [Fri, 29 May 2015 16:20:32 +0000 (12:20 -0400)]
Make note about $ more prominent.

Fixes #25554

9 years agoNew tests for cross-crate usages of const fn and so forth
Niko Matsakis [Fri, 29 May 2015 13:57:36 +0000 (09:57 -0400)]
New tests for cross-crate usages of const fn and so forth

9 years agoFix windows recvfrom definition
Steven Fackler [Fri, 29 May 2015 07:21:33 +0000 (00:21 -0700)]
Fix windows recvfrom definition

9 years agoSkip timeout upper bound check on windows
Steven Fackler [Fri, 29 May 2015 07:21:06 +0000 (00:21 -0700)]
Skip timeout upper bound check on windows

9 years agoAuto merge of #25857 - killercup:patch-14, r=steveklabnik
bors [Fri, 29 May 2015 14:53:59 +0000 (14:53 +0000)]
Auto merge of #25857 - killercup:patch-14, r=steveklabnik

Thanks to @cers who reported this in killercup/trpl-ebook#14!

r? @steveklabnik

9 years agoadd const_fn features
Niko Matsakis [Fri, 29 May 2015 13:42:32 +0000 (09:42 -0400)]
add const_fn features

9 years agoadd a test for const fn methods, as suggested by @pnkfelix
Niko Matsakis [Thu, 28 May 2015 19:20:32 +0000 (15:20 -0400)]
add a test for const fn methods, as suggested by @pnkfelix

9 years agopermit const-fn in macro expansions
Niko Matsakis [Thu, 28 May 2015 19:18:47 +0000 (15:18 -0400)]
permit const-fn in macro expansions