]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoAuto merge of #36766 - nnethercote:hash-span-capacity, r=bluss
bors [Mon, 3 Oct 2016 11:25:58 +0000 (04:25 -0700)]
Auto merge of #36766 - nnethercote:hash-span-capacity, r=bluss

Clarify HashMap's capacity handling.

HashMap has two notions of "capacity":

- "Usable capacity": the number of elements a hash map can hold without
  resizing. This is the meaning of "capacity" used in HashMap's API,
  e.g. the `with_capacity()` function.

- "Internal capacity": the number of allocated slots. Except for the
  zero case, it is always larger than the usable capacity (because some
  slots must be left empty) and is always a power of two.

HashMap's code is confusing because it does a poor job of
distinguishing these two meanings. I propose using two different terms
for these two concepts. Because "capacity" is already used in HashMap's
API to mean "usable capacity", I will use a different word for "internal
capacity". I propose "span", though I'm happy to consider other names.

7 years agoAuto merge of #36767 - jseyfried:enforce_rfc_1560_shadowing, r=nrc
bors [Mon, 3 Oct 2016 08:30:32 +0000 (01:30 -0700)]
Auto merge of #36767 - jseyfried:enforce_rfc_1560_shadowing, r=nrc

Enforce the shadowing restrictions from RFC 1560 for today's macros

This PR enforces a weakened version of the shadowing restrictions from RFC 1560. More specifically,
 - If a macro expansion contains a `macro_rules!` macro definition that is used outside of the expansion, the defined macro may not shadow an existing macro.
 - If a macro expansion contains a `#[macro_use] extern crate` macro import that is used outside of the expansion, the imported macro may not shadow an existing macro.

This is a [breaking-change]. For example,
```rust
macro_rules! m { () => {} }
macro_rules! n { () => {
    macro_rules! m { () => {} } //< This shadows an existing macro.
    m!(); //< This is inside the expansion that generated `m`'s definition, so it is OK.
} }
n!();
m!(); //< This use of `m` is outside the expansion, so it causes the shadowing to be an error.
```

r? @nrc

7 years agoAvoid overflow check in `HashMap::reserve`'s fast path.
Nicholas Nethercote [Mon, 3 Oct 2016 03:31:30 +0000 (14:31 +1100)]
Avoid overflow check in `HashMap::reserve`'s fast path.

7 years agoAuto merge of #36807 - brson:pal, r=brson
bors [Mon, 3 Oct 2016 00:33:34 +0000 (17:33 -0700)]
Auto merge of #36807 - brson:pal, r=brson

Restrict where in the tree platform-specific cfgs may be mentioned

With the ports of Rust never ending, it's important that we keep things tidy. The main thing this PR does is introduce  a new "pal" (platform abstraction layer) tidy check that limits where platform-specific CFGs may appear.

This is intended to maintain existing standards of code organization
in hopes that the standard library will continue to be refactored to
isolate platform-specific bits, making porting easier; where "standard
library" roughly means "all the dependencies of the std and test
crates".

This generally means placing restrictions on where `cfg(unix)`,
`cfg(windows)`, `cfg(target_os)` and `cfg(target_env)` may appear,
the basic objective being to isolate platform-specific code to the
platform-specific `std::sys` modules, and to the allocation,
unwinding, and libc crates.

Following are the basic rules, though there are currently
exceptions:

- core may not have platform-specific code
- liballoc_system may have platform-specific code
- liballoc_jemalloc may have platform-specific code
- libpanic_abort may have platform-specific code
- libpanic_unwind may have platform-specific code
- other crates in the std facade may not
- std may have platform-specific code in the following places
  - sys/unix/
  - sys/windows/
  - os/

There are plenty of exceptions today though, noted in the whitelist.

The end-state, IMO, is for the standard library to be portable by porting only `std::sys` (possibly extracted to its own crate), an allocator crate, an unwinder crate, and possibly a libc crate (if std depends on it); but that outcome is far off and independent of the utility of enforcing where such code lives today.

cc @rust-lang/libs

7 years agoMove platform-specific arg handling to sys::args
Brian Anderson [Thu, 29 Sep 2016 22:00:44 +0000 (22:00 +0000)]
Move platform-specific arg handling to sys::args

7 years agoAdd a platform-abstraction tidy script
Brian Anderson [Thu, 22 Sep 2016 01:30:30 +0000 (01:30 +0000)]
Add a platform-abstraction tidy script

This is intended to maintain existing standards of code organization
in hopes that the standard library will continue to be refactored to
isolate platform-specific bits, making porting easier; where "standard
library" roughly means "all the dependencies of the std and test
crates".

This generally means placing restrictions on where `cfg(unix)`,
`cfg(windows)`, `cfg(target_os)` and `cfg(target_env)` may appear,
the basic objective being to isolate platform-specific code to the
platform-specific `std::sys` modules, and to the allocation,
unwinding, and libc crates.

Following are the basic rules, though there are currently
exceptions:

- core may not have platform-specific code
- liballoc_system may have platform-specific code
- liballoc_jemalloc may have platform-specific code
- libpanic_abort may have platform-specific code
- libpanic_unwind may have platform-specific code
- other crates in the std facade may not
- std may have platform-specific code in the following places
  - sys/unix/
  - sys/windows/
  - os/

There are plenty of exceptions today though, noted in the whitelist.

7 years agoAuto merge of #36904 - camlorn:field_offsets_refactor, r=eddyb
bors [Sun, 2 Oct 2016 21:13:27 +0000 (14:13 -0700)]
Auto merge of #36904 - camlorn:field_offsets_refactor, r=eddyb

Refactor layout to store offsets of fields, not offsets after fields

This is the next PR moving us towards being able to reorder struct fields.

The old code implicitly stored the offset of the first field.  This is inadequate because the first field may no longer be offset 0 in future.  This PR refactors `layout` to use a `offsets` vector instead of a `offset_after_field` vector.

7 years agoReplace offset_after_field with offsets
Austin Hicks [Sun, 2 Oct 2016 01:25:40 +0000 (21:25 -0400)]
Replace offset_after_field with offsets

7 years agoAuto merge of #36404 - christopherdumas:master, r=GuillaumeGomez
bors [Sun, 2 Oct 2016 15:32:07 +0000 (08:32 -0700)]
Auto merge of #36404 - christopherdumas:master, r=GuillaumeGomez

Documentation change to macros.rs for `includes!`

I'm not sure if this documentation is clear or extensive enough, but this is just to get started on the problem, fixes issue #36387.

7 years agoAuto merge of #36862 - chamoysvoice:E0220, r=GuillaumeGomez
bors [Sun, 2 Oct 2016 12:01:57 +0000 (05:01 -0700)]
Auto merge of #36862 - chamoysvoice:E0220, r=GuillaumeGomez

Update E0220 error format

@jonathandturner
Part of #35233 .
Fixes #35385.

7 years agoFix fallout in tests.
Jeffrey Seyfried [Tue, 27 Sep 2016 06:38:17 +0000 (06:38 +0000)]
Fix fallout in tests.

7 years agoAdd test.
Jeffrey Seyfried [Sun, 2 Oct 2016 07:46:17 +0000 (07:46 +0000)]
Add test.

7 years agoEnforce the weakened shadowing restriction.
Jeffrey Seyfried [Sun, 2 Oct 2016 01:41:19 +0000 (01:41 +0000)]
Enforce the weakened shadowing restriction.

7 years agoAuto merge of #36853 - TimNN:rustbuild-out-of-tree, r=alexcrichton
bors [Sun, 2 Oct 2016 06:53:35 +0000 (23:53 -0700)]
Auto merge of #36853 - TimNN:rustbuild-out-of-tree, r=alexcrichton

fix out-of-tree rustbuild

See https://github.com/rust-lang/rust/pull/36456#issuecomment-250589906

r? @alexcrichton

7 years agoRecord macro import site spans.
Jeffrey Seyfried [Sun, 2 Oct 2016 04:21:34 +0000 (04:21 +0000)]
Record macro import site spans.

7 years agoRefactor out `resolve_macro_name`.
Jeffrey Seyfried [Mon, 26 Sep 2016 03:17:05 +0000 (03:17 +0000)]
Refactor out `resolve_macro_name`.

7 years agoAdd field `backtrace: SyntaxContext` to `ExpansionData`.
Jeffrey Seyfried [Sat, 1 Oct 2016 04:24:19 +0000 (04:24 +0000)]
Add field `backtrace: SyntaxContext` to `ExpansionData`.

7 years agoRefactor `ext::base::Resolver::add_ext` to only define macros in the crate root.
Jeffrey Seyfried [Sun, 2 Oct 2016 05:49:56 +0000 (05:49 +0000)]
Refactor `ext::base::Resolver::add_ext` to only define macros in the crate root.

7 years agoRefactor field `expansion_data` of `Resolver` to use a `Mark` instead of a `u32`.
Jeffrey Seyfried [Sat, 1 Oct 2016 04:21:10 +0000 (04:21 +0000)]
Refactor field `expansion_data` of `Resolver` to use a `Mark` instead of a `u32`.

7 years agoAdd struct `macros::NameBinding`.
Jeffrey Seyfried [Sat, 1 Oct 2016 03:49:12 +0000 (03:49 +0000)]
Add struct `macros::NameBinding`.

7 years agoAuto merge of #36840 - eulerdisk:incr_test_for_hash_enum, r=michaelwoerister
bors [Sun, 2 Oct 2016 03:34:34 +0000 (20:34 -0700)]
Auto merge of #36840 - eulerdisk:incr_test_for_hash_enum, r=michaelwoerister

Test Case for Incr. Comp. Hash for enums #36674.

Fixes #36674
Part of #36350

r? @michaelwoerister

7 years agoAuto merge of #36828 - pnkfelix:update-compiler-rt, r=dotdash
bors [Sat, 1 Oct 2016 21:53:04 +0000 (14:53 -0700)]
Auto merge of #36828 - pnkfelix:update-compiler-rt, r=dotdash

Update src/compiler-rt to incoporate fix for UB in floatsidf.

Update src/compiler-rt to incoporate fix for UB in floatsidf.

Fix #36518

7 years agostd: Remove plattform-specific code from os_str
Brian Anderson [Thu, 22 Sep 2016 00:57:18 +0000 (00:57 +0000)]
std: Remove plattform-specific code from os_str

7 years agostd: Move platform specific stdio code into sys
Brian Anderson [Thu, 22 Sep 2016 00:29:00 +0000 (00:29 +0000)]
std: Move platform specific stdio code into sys

7 years agostd: Move platform specific memchr code into sys
Brian Anderson [Thu, 22 Sep 2016 00:10:37 +0000 (00:10 +0000)]
std: Move platform specific memchr code into sys

7 years agostd: Move platform specific env code into sys
Brian Anderson [Wed, 21 Sep 2016 19:50:30 +0000 (19:50 +0000)]
std: Move platform specific env code into sys

7 years agostd: Move platform specific path code into sys
Brian Anderson [Wed, 21 Sep 2016 19:11:39 +0000 (19:11 +0000)]
std: Move platform specific path code into sys

7 years agoAuto merge of #36885 - Manishearth:rollup, r=Manishearth
bors [Sat, 1 Oct 2016 17:17:20 +0000 (10:17 -0700)]
Auto merge of #36885 - Manishearth:rollup, r=Manishearth

Rollup of 6 pull requests

- Successful merges: #36865, #36872, #36873, #36877, #36880, #36882
- Failed merges:

7 years agoAuto merge of #36857 - Manishearth:syntax-rollup, r=Manishearth
bors [Sat, 1 Oct 2016 13:59:09 +0000 (06:59 -0700)]
Auto merge of #36857 - Manishearth:syntax-rollup, r=Manishearth

Syntax breaking batch

None

7 years agoRollup merge of #34764 - pnkfelix:attrs-on-generic-formals, r=eddyb
Manish Goregaokar [Fri, 30 Sep 2016 12:13:40 +0000 (17:43 +0530)]
Rollup merge of #34764 - pnkfelix:attrs-on-generic-formals, r=eddyb

 First step for #34761

7 years agoRollup merge of #36599 - jonas-schievink:whats-a-pirates-favorite-data-structure...
Manish Goregaokar [Fri, 30 Sep 2016 12:13:22 +0000 (17:43 +0530)]
Rollup merge of #36599 - jonas-schievink:whats-a-pirates-favorite-data-structure, r=pnkfelix

 Contains a syntax-[breaking-change] as a separate commit (cc #31645).nnAlso renames slice patterns from `PatKind::Vec` to `PatKind::Slice`.

7 years agoRollup merge of #35874 - CensoredUsername:stmt_let_typed_fix, r=Manishearth
Manish Goregaokar [Fri, 30 Sep 2016 12:13:04 +0000 (17:43 +0530)]
Rollup merge of #35874 - CensoredUsername:stmt_let_typed_fix, r=Manishearth

 This commit makes the return type of AstBuilder.stmt_let_typed match the return type of other AstBuilder.stmt* functions. This avoids unnecessary boxing/unboxing whenever Stmt's are stored in a Vec, which is the default use case.nnThis is a potentially plugin breaking change.

7 years agoRollup merge of #36882 - jseyfried:fix_36881, r=eddyb
Manish Goregaokar [Sat, 1 Oct 2016 11:08:33 +0000 (16:38 +0530)]
Rollup merge of #36882 - jseyfried:fix_36881, r=eddyb

resolve: fix incorrect code in `module_to_string`

Fixes #36881.
r? @nrc or @eddyb

7 years agoRollup merge of #36880 - durka:debug-unsized-ptr, r=bluss
Manish Goregaokar [Sat, 1 Oct 2016 11:08:33 +0000 (16:38 +0530)]
Rollup merge of #36880 - durka:debug-unsized-ptr, r=bluss

impl Debug for raw pointers to unsized data

`?Sized` was missing from these impls for seemingly no reason.

Fixes #36870.

7 years agoRollup merge of #36877 - solson:rustc-version-build-issue, r=eddyb
Manish Goregaokar [Sat, 1 Oct 2016 11:08:32 +0000 (16:38 +0530)]
Rollup merge of #36877 - solson:rustc-version-build-issue, r=eddyb

Fix RUSTC_VERSION for 'documenting' build stage.

Previously the `env!("RUSTC_VERSION")` requirement would break the "Documenting rustc_metadata" stage of the rustc build, since that environment variable is only defined during the main build.

r? @eddyb

7 years agoRollup merge of #36873 - GuillaumeGomez:e0035_e0036, r=jonathandturner
Manish Goregaokar [Sat, 1 Oct 2016 11:08:32 +0000 (16:38 +0530)]
Rollup merge of #36873 - GuillaumeGomez:e0035_e0036, r=jonathandturner

Update E0035, E0036 and E0370 to new error format

Fixes #35634.
Fixes #35206.
Fixes #35207.

r? @jonathandturner

7 years agoRollup merge of #36872 - frewsxcv:rustdoc, r=GuillaumeGomez
Manish Goregaokar [Sat, 1 Oct 2016 11:08:32 +0000 (16:38 +0530)]
Rollup merge of #36872 - frewsxcv:rustdoc, r=GuillaumeGomez

A couple refactorings in librustdoc.

None

7 years agoRollup merge of #36865 - kallisti5:master, r=brson
Manish Goregaokar [Sat, 1 Oct 2016 11:08:32 +0000 (16:38 +0530)]
Rollup merge of #36865 - kallisti5:master, r=brson

Haiku: Fix target triplet delimiter

7 years agoAuto merge of #36824 - kali:master, r=alexcrichton
bors [Sat, 1 Oct 2016 08:19:47 +0000 (01:19 -0700)]
Auto merge of #36824 - kali:master, r=alexcrichton

SO_NOSIGPIPE and MSG_NOSIGNAL (rebased #36426)

I'm not sure what happened when I pushed a rebased branch on #36426 , github closed it...

7 years agoFix `module_to_string`.
Jeffrey Seyfried [Sat, 1 Oct 2016 07:38:47 +0000 (07:38 +0000)]
Fix `module_to_string`.

7 years agoAuto merge of #36339 - brson:emscripten-new, r=alexcrichton
bors [Sat, 1 Oct 2016 02:00:36 +0000 (19:00 -0700)]
Auto merge of #36339 - brson:emscripten-new, r=alexcrichton

Working asmjs and wasm targets

This patch set results in a working standard library for the asmjs-unknown-emscripten and wasm32-unknown-emscripten targets. It is based on the work of @badboy and @rschulman.

It does a few things:

- Updates LLVM with the emscripten [fastcomp](https://github.com/rust-lang/llvm/pull/50) patches, which include the pnacl IR legalizer and the asm.js backend. This patch is thought not to have any significant effect on existing targets.
- Teaches rustbuild to correctly link C code with emscripten
- Updates gcc-rs to work correctly with emscripten
- Teaches rustbuild to run crate tests for emscripten with node
- Modifies Thread::new to return an error on emscripten, to facilitate debugging a common failure mode
- Modifies libtest to run in single-threaded mode for emscripten
- Ignores a host of tests that don't work yet, mostly dealing with threads and I/O
- Updates libc with wasm32 definitions (presently the same as asmjs)
- Adds a wasm32-unknown-emscripten target that feeds the output of LLVM's asmjs backend through emcc to generate wasm

Notes and caveats:

- This is only known to work with `--enable-rustbuild`.
- The wasm32 target can't be tested correctly yet because of issues in compiletest and limitations in node https://github.com/kripken/emscripten/issues/4542, but hello.rs does seem to work when run on node via the binaryen interpreter
- This requires an up to date installation of the emscripten sdk from its incoming branch
- Unwinding is very broken
- When enabling the emscripten targets jemalloc is disabled for all targets, which results in test failures for the host

Next steps are to fix the jemalloc issue, start building the two emscripten targets on the auto builders, then start producing nightlies.

https://github.com/rust-lang/rust/issues/36317 tracks work on this.

Fixes https://github.com/rust-lang/rust/issues/36515
Fixes https://github.com/rust-lang/rust/issues/36515
Fixes https://github.com/rust-lang/rust/issues/36356

7 years agoimpl Debug for raw pointers to unsized data
Alex Burka [Sat, 1 Oct 2016 01:50:56 +0000 (01:50 +0000)]
impl Debug for raw pointers to unsized data

7 years agoAuto merge of #36866 - alexcrichton:fix-hash-again, r=eddyb
bors [Fri, 30 Sep 2016 22:43:52 +0000 (15:43 -0700)]
Auto merge of #36866 - alexcrichton:fix-hash-again, r=eddyb

rustc: More fixes for arch-independent hashing

In another attempt to fix #36793 this commit attempts to head off any future
problems by adding a custom `WidentUsizeHasher` which will widen any hashing of
`isize` and `usize` to a `u64` as necessary. This obviates the need for a
previous number of `as u64` annotations and will hopefully protect us against
future problems here.

Closes #36793 (hopefully)

7 years agoFix RUSTC_VERSION for 'documenting' build stage.
Scott Olson [Fri, 30 Sep 2016 22:24:50 +0000 (16:24 -0600)]
Fix RUSTC_VERSION for 'documenting' build stage.

Previously the `env!("RUSTC_VERSION")` requirement would break the
"Documenting rustc_metadata" stage of the rustc build, since that
environment variable is only defined during the main build.

7 years agoUpdate E0370 to new error format
Guillaume Gomez [Fri, 30 Sep 2016 20:52:47 +0000 (22:52 +0200)]
Update E0370 to new error format

7 years agoUpdate E0036 to new error format
Guillaume Gomez [Fri, 30 Sep 2016 19:44:55 +0000 (21:44 +0200)]
Update E0036 to new error format

7 years agorustc: More fixes for arch-independent hashing
Alex Crichton [Fri, 30 Sep 2016 18:06:51 +0000 (11:06 -0700)]
rustc: More fixes for arch-independent hashing

In another attempt to fix #36793 this commit attempts to head off any future
problems by adding a custom `WidentUsizeHasher` which will widen any hashing of
`isize` and `usize` to a `u64` as necessary. This obviates the need for a
previous number of `as u64` annotations and will hopefully protect us against
future problems here.

Closes #36793 (hopefully)

7 years agoDon't build any native compiler-builtin components for emscripten
Brian Anderson [Wed, 28 Sep 2016 16:08:59 +0000 (16:08 +0000)]
Don't build any native compiler-builtin components for emscripten

7 years agoBuild a dummy alloc_jemalloc crate on platforms that don't support it
Brian Anderson [Tue, 27 Sep 2016 21:27:22 +0000 (21:27 +0000)]
Build a dummy alloc_jemalloc crate on platforms that don't support it

This is a hack to support building targets that don't support jemalloc
alongside hosts that do. The jemalloc build is controlled by a feature
of the std crate, and if that feature changes between targets, it
invalidates the fingerprint of std's build script (this is a cargo
bug); so we must ensure that the feature set used by std is the same
across all targets, which means we have to build the alloc_jemalloc
crate for targets like emscripten, even if we don't use it.

7 years agoDocument emscripten's unwind impl and remove unused function
Brian Anderson [Tue, 27 Sep 2016 21:25:52 +0000 (21:25 +0000)]
Document emscripten's unwind impl and remove unused function

7 years agoCleanup bootstrap
Brian Anderson [Tue, 27 Sep 2016 19:56:50 +0000 (19:56 +0000)]
Cleanup bootstrap

7 years agoUnignore some working emscripten tests
Brian Anderson [Tue, 27 Sep 2016 21:07:17 +0000 (21:07 +0000)]
Unignore some working emscripten tests

7 years agoCall emcc with ERROR_ON_UNDEFINED_SYMBOLS
Brian Anderson [Sun, 25 Sep 2016 20:47:00 +0000 (20:47 +0000)]
Call emcc with ERROR_ON_UNDEFINED_SYMBOLS

7 years agorustbuild: Only build 'dist' when building the host
Brian Anderson [Fri, 23 Sep 2016 01:25:51 +0000 (01:25 +0000)]
rustbuild: Only build 'dist' when building the host

Doing this step for the target results in the build system
trying to build rustc for asmjs, which doesn't work.

7 years agoIgnore various entire test modules on emscripten
Brian Anderson [Thu, 22 Sep 2016 20:04:48 +0000 (20:04 +0000)]
Ignore various entire test modules on emscripten

7 years agoRewrite emscripten unwinding to use libcxx
Brian Anderson [Thu, 22 Sep 2016 19:55:42 +0000 (19:55 +0000)]
Rewrite emscripten unwinding to use libcxx

7 years agoIgnore another emscripten test because missing intrinsics
Brian Anderson [Fri, 16 Sep 2016 18:07:17 +0000 (18:07 +0000)]
Ignore another emscripten test because missing intrinsics

7 years agoUpdate bootstrap and compiletest to use the detected nodejs
Brian Anderson [Thu, 15 Sep 2016 19:42:26 +0000 (19:42 +0000)]
Update bootstrap and compiletest to use the detected nodejs

7 years agoChange the sigs of set_print/set_panic to allow restoring the default objects
Brian Anderson [Wed, 14 Sep 2016 17:15:48 +0000 (17:15 +0000)]
Change the sigs of set_print/set_panic to allow restoring the default objects

7 years agoIgnore entire test modules on emscripten instead of individual tests
Brian Anderson [Wed, 14 Sep 2016 17:10:43 +0000 (17:10 +0000)]
Ignore entire test modules on emscripten instead of individual tests

7 years agoTidy
Brian Anderson [Thu, 8 Sep 2016 01:58:00 +0000 (01:58 +0000)]
Tidy

7 years agoUpdate LLVM with fastcomp patches
Brian Anderson [Wed, 7 Sep 2016 15:13:24 +0000 (15:13 +0000)]
Update LLVM with fastcomp patches

7 years agoIgnore all debuginfo tests on emscripten
Brian Anderson [Wed, 7 Sep 2016 15:10:57 +0000 (15:10 +0000)]
Ignore all debuginfo tests on emscripten

7 years agoIgnore lots and lots of std tests on emscripten
Brian Anderson [Wed, 7 Sep 2016 05:34:15 +0000 (05:34 +0000)]
Ignore lots and lots of std tests on emscripten

7 years agoImprove bootstrap crate testing for emscripten
Brian Anderson [Tue, 6 Sep 2016 20:36:14 +0000 (20:36 +0000)]
Improve bootstrap crate testing for emscripten

7 years agoUpdate libtest for single-threaded emscripten support
Brian Anderson [Tue, 6 Sep 2016 20:16:56 +0000 (20:16 +0000)]
Update libtest for single-threaded emscripten support

7 years agoPreliminary wasm32 support
Brian Anderson [Tue, 6 Sep 2016 00:41:50 +0000 (00:41 +0000)]
Preliminary wasm32 support

7 years agoAdding ignore-emscripten to failing tests.
Ross Schulman [Tue, 6 Sep 2016 00:00:09 +0000 (20:00 -0400)]
Adding ignore-emscripten to failing tests.

7 years agoAdapting bootstrap to run tests on asmjs.
Ross Schulman [Mon, 5 Sep 2016 23:56:48 +0000 (19:56 -0400)]
Adapting bootstrap to run tests on asmjs.

7 years agoUpdate gcc-rs for emscripten
Brian Anderson [Wed, 31 Aug 2016 20:47:11 +0000 (20:47 +0000)]
Update gcc-rs for emscripten

7 years agoSupport emscripten in rustbuild
Brian Anderson [Tue, 30 Aug 2016 22:56:26 +0000 (22:56 +0000)]
Support emscripten in rustbuild

7 years agoPatch panic_unwind to compile, but this is surely broken
Jan-Erik Rediger [Sat, 6 Aug 2016 22:14:33 +0000 (00:14 +0200)]
Patch panic_unwind to compile, but this is surely broken

7 years agoMake the jsbackend an optional component
Jan-Erik Rediger [Sat, 6 Aug 2016 19:13:14 +0000 (21:13 +0200)]
Make the jsbackend an optional component

7 years agoConfigure LLVM to use js backend
Jan-Erik Rediger [Sat, 6 Aug 2016 10:52:17 +0000 (12:52 +0200)]
Configure LLVM to use js backend

Initialize the asmjs backend for LLVM

7 years agoUpdate E0220 error format
Jesus Garlea [Fri, 30 Sep 2016 15:58:27 +0000 (10:58 -0500)]
Update E0220 error format

squash! Update E0220 error format

Update Error E0220 to new format

7 years agoSimplify logic around Context's root_path.
Corey Farwell [Thu, 29 Sep 2016 04:40:32 +0000 (00:40 -0400)]
Simplify logic around Context's root_path.

Was previously cached and maintained in the `Context`, which to me seems
overkill.

7 years agoMigrate Item ➡ ItemType function to method.
Corey Farwell [Thu, 29 Sep 2016 02:53:35 +0000 (22:53 -0400)]
Migrate Item ➡ ItemType function to method.

7 years agoUpdate E0035 to new error format
Guillaume Gomez [Fri, 30 Sep 2016 19:30:05 +0000 (21:30 +0200)]
Update E0035 to new error format

7 years agoHaiku: Fix target triplet delimiter
Alex von Gluck IV [Fri, 30 Sep 2016 18:17:22 +0000 (13:17 -0500)]
Haiku: Fix target triplet delimiter

7 years agoAuto merge of #36864 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 30 Sep 2016 18:08:58 +0000 (11:08 -0700)]
Auto merge of #36864 - steveklabnik:rollup, r=steveklabnik

Rollup of 13 pull requests

- Successful merges: #36529, #36535, #36576, #36623, #36711, #36750, #36810, #36829, #36833, #36841, #36842, #36851, #36860
- Failed merges:

7 years agoRollup merge of #36860 - wesleywiser:patch-2, r=Manishearth
Steve Klabnik [Fri, 30 Sep 2016 17:44:48 +0000 (13:44 -0400)]
Rollup merge of #36860 - wesleywiser:patch-2, r=Manishearth

Add `Send` and `Sync` traits to the reference

Fixes #36859

7 years agoRollup merge of #36851 - tmiasko:fix-read-until-docs, r=bluss
Steve Klabnik [Fri, 30 Sep 2016 17:44:48 +0000 (13:44 -0400)]
Rollup merge of #36851 - tmiasko:fix-read-until-docs, r=bluss

Fix BufRead::read_until documentation.

Second paragraph already fully explains what happens when EOF is
encountered. The third paragraph (removed one) is spurious and
misleading.

7 years agoRollup merge of #36842 - cjm00:release-notes-fix, r=brson
Steve Klabnik [Fri, 30 Sep 2016 17:44:48 +0000 (13:44 -0400)]
Rollup merge of #36842 - cjm00:release-notes-fix, r=brson

Fixed wrong link in release notes

The link for the pull request updating hash_map to implement Debug was a copy of the previous link, this changes the link to the correct PR.

7 years agoRollup merge of #36841 - GuillaumeGomez:process_doc, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36841 - GuillaumeGomez:process_doc, r=steveklabnik

Improve process module doc a bit

r? @steveklabnik

7 years agoRollup merge of #36833 - tmiasko:system-time-error, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36833 - tmiasko:system-time-error, r=steveklabnik

Reword description of SystemTimeError.

Repalce timestamp with a system time, to be more consistent with
remaining documentation.

r? @steveklabnik

7 years agoRollup merge of #36829 - apasel422:releases-typo, r=alexcrichton
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36829 - apasel422:releases-typo, r=alexcrichton

Fix typo in RELEASES.md

7 years agoRollup merge of #36810 - GuillaumeGomez:ops_doc, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36810 - GuillaumeGomez:ops_doc, r=steveklabnik

Add missing urls for ops module

Part of #29365.

r? @steveklabnik

7 years agoRollup merge of #36750 - GuillaumeGomez:cmp_doc, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36750 - GuillaumeGomez:cmp_doc, r=steveklabnik

Add missing links on cmp module

r? @steveklabnik

7 years agoRollup merge of #36711 - pcn:patch-1, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:46 +0000 (13:44 -0400)]
Rollup merge of #36711 - pcn:patch-1, r=steveklabnik

Suggesting a change to a comment that puzzled me

While reading this, the comment made it difficult for me to simply absorb the concept.  It interrupted my reading flow, and I think this expresses the same meaning, but reads a bit better.  It's trivial, but makes it easier for me to move on to the next line.

7 years agoRollup merge of #36623 - GuillaumeGomez:doc_typos, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:46 +0000 (13:44 -0400)]
Rollup merge of #36623 - GuillaumeGomez:doc_typos, r=steveklabnik

Fix some typos and improve doc comments style

r? @steveklabnik

7 years agoRollup merge of #36576 - GuillaumeGomez:box_urls, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:46 +0000 (13:44 -0400)]
Rollup merge of #36576 - GuillaumeGomez:box_urls, r=steveklabnik

Add missing urls for Box doc

r? @steveklabnik

7 years agoRollup merge of #36535 - GuillaumeGomez:macro_url, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:46 +0000 (13:44 -0400)]
Rollup merge of #36535 - GuillaumeGomez:macro_url, r=steveklabnik

Update to new macro url syntax

r? @steveklabnik

7 years agoRollup merge of #36529 - bluss:index-doc, r=GuillaumeGomez
Steve Klabnik [Fri, 30 Sep 2016 17:44:45 +0000 (13:44 -0400)]
Rollup merge of #36529 - bluss:index-doc, r=GuillaumeGomez

Clarify Index/IndexMut trait docs

Use examples and placeholder variable names with more meaning, to not
make it so abstract.

7 years agofix out-of-tree rustbuild
Tim Neumann [Fri, 30 Sep 2016 09:15:37 +0000 (11:15 +0200)]
fix out-of-tree rustbuild

7 years agoFix another comment in test/incremental/hashes/enum_defs
Michael Woerister [Fri, 30 Sep 2016 15:34:33 +0000 (11:34 -0400)]
Fix another comment in test/incremental/hashes/enum_defs

7 years agoFix comment in test/incremental/hashes/enum_defs
Michael Woerister [Fri, 30 Sep 2016 15:12:37 +0000 (11:12 -0400)]
Fix comment in test/incremental/hashes/enum_defs

7 years agoFixes requested by @michaelwoerister.
Andrea Pretto [Fri, 30 Sep 2016 14:49:52 +0000 (16:49 +0200)]
Fixes requested by @michaelwoerister.

7 years agoAuto merge of #36823 - durka:discriminant_value, r=nagisa
bors [Fri, 30 Sep 2016 14:35:04 +0000 (07:35 -0700)]
Auto merge of #36823 - durka:discriminant_value, r=nagisa

add wrapper for discriminant_value, take 2

[This is #34785 reopened, since @bors apparently gave up on that thread.]

add wrapper for discriminant_value intrinsic

Implementation of [RFC 1696](https://github.com/rust-lang/rfcs/blob/master/text/1696-discriminant.md).

Wraps the `discriminant_value` intrinsic under the name `std::mem::discriminant`. In order to avoid prematurely leaking information about the implementation of enums, the return value is an opaque type, generic over the enum type, which implements Copy, Clone, PartialEq, Eq, Hash, and Debug (notably not PartialOrd). There is currently no way to get the value out excepting printing the debug representation.

The wrapper is safe and can be stabilized soon as per discussion in #24263.

cc @aturon
r? @nagisa

7 years agoAdd `Send` and `Sync` traits to the reference
Wesley Wiser [Fri, 30 Sep 2016 13:56:58 +0000 (09:56 -0400)]
Add `Send` and `Sync` traits to the reference

Fixes #36859

7 years agoAuto merge of #36822 - Aatch:resolve-callee-expr, r=luqmana
bors [Fri, 30 Sep 2016 11:24:38 +0000 (04:24 -0700)]
Auto merge of #36822 - Aatch:resolve-callee-expr, r=luqmana

Resolve the callee type in check_call before autoderef

If the callee type is an associated type, then it needs to be normalized
before trying to deref it. This matches the behaviour of
`check_method_call` for autoderef behaviour in calls.

Fixes #36786