]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoUse `try_into` and move some functions
Tobias Bucher [Sat, 8 Oct 2016 23:06:55 +0000 (01:06 +0200)]
Use `try_into` and move some functions

7 years agoDynamically detect presence of `p{read,write}64` on Android
Tobias Bucher [Sat, 8 Oct 2016 12:32:57 +0000 (14:32 +0200)]
Dynamically detect presence of `p{read,write}64` on Android

7 years agoImplement reading and writing atomically at certain offsets
Tobias Bucher [Mon, 15 Aug 2016 23:11:33 +0000 (01:11 +0200)]
Implement reading and writing atomically at certain offsets

These functions allow to read from and write to a file in one atomic
action from multiple threads, avoiding the race between the seek and the
read.

The functions are named `{read,write}_at` on non-Windows (which don't
change the file cursor), and `seek_{read,write}` on Windows (which
change the file cursor).

7 years agoAuto merge of #36637 - GuillaumeGomez:fix_run_button, r=bluss
bors [Sun, 9 Oct 2016 02:42:55 +0000 (19:42 -0700)]
Auto merge of #36637 - GuillaumeGomez:fix_run_button, r=bluss

Fixes run button appearing when it shouldn't

Fixes #36621.

r? @steveklabnik

7 years agoAuto merge of #37041 - tbu-:pr_less_sizet_casts, r=alexcrichton
bors [Sat, 8 Oct 2016 22:59:49 +0000 (15:59 -0700)]
Auto merge of #37041 - tbu-:pr_less_sizet_casts, r=alexcrichton

Use less `size_t` casts in libstd since it's now defined as `usize`

7 years agoAuto merge of #37027 - alexcrichton:less-deps-in-bootstrap, r=japaric
bors [Sat, 8 Oct 2016 19:36:11 +0000 (12:36 -0700)]
Auto merge of #37027 - alexcrichton:less-deps-in-bootstrap, r=japaric

rustbuild: Optimize build times slightly

As the entry point for building the Rust compiler, a good user experience hinges
on this compiling quickly to get to the meat of the problem. To that end use
`#[cfg]`-specific dependencies to avoid building Windows crates on Unix and drop
the `regex` crate for now which was easily replacable with some string
searching.

7 years agorustbuild: Optimize build times slightly
Alex Crichton [Fri, 7 Oct 2016 19:26:45 +0000 (12:26 -0700)]
rustbuild: Optimize build times slightly

As the entry point for building the Rust compiler, a good user experience hinges
on this compiling quickly to get to the meat of the problem. To that end use
`#[cfg]`-specific dependencies to avoid building Windows crates on Unix and drop
the `regex` crate for now which was easily replacable with some string
searching.

7 years agoUse less `size_t` casts in libstd since it's now defined as `usize`
Tobias Bucher [Sat, 8 Oct 2016 13:48:28 +0000 (15:48 +0200)]
Use less `size_t` casts in libstd since it's now defined as `usize`

7 years agoAuto merge of #37039 - Manishearth:rollup, r=Manishearth
bors [Sat, 8 Oct 2016 12:55:27 +0000 (05:55 -0700)]
Auto merge of #37039 - Manishearth:rollup, r=Manishearth

Rollup of 6 pull requests

- Successful merges: #36937, #37016, #37028, #37029, #37031, #37034
- Failed merges: #37027

7 years agoRollup merge of #37034 - nox:empty-trait-list, r=alexcrichton
Manish Goregaokar [Sat, 8 Oct 2016 11:22:44 +0000 (16:52 +0530)]
Rollup merge of #37034 - nox:empty-trait-list, r=alexcrichton

Do not add an empty #[derive()] list in expand_derive (fixes #37033)

7 years agoRollup merge of #37031 - fitzgen:typo-in-gcc-rs-comment, r=alexcrichton
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #37031 - fitzgen:typo-in-gcc-rs-comment, r=alexcrichton

Fix a typo in a comment describing gcc.rs's eh_frame_registry module

s/reigster/register/

r? @alexcrichton

7 years agoRollup merge of #37029 - japaric:no-panics-in-checked-ops, r=alexcrichton
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #37029 - japaric:no-panics-in-checked-ops, r=alexcrichton

rewrite checked_{div,rem} to no contain any reference to panics

even without optimizations

r? @alexcrichton

7 years agoRollup merge of #37028 - alexcrichton:fix-deps, r=japaric
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #37028 - alexcrichton:fix-deps, r=japaric

rustbuild: Fix dependencies of check-docs step

Some of the doc tests depend on `extern crate test`, so depend on libtest
instead of libstd here.

7 years agoRollup merge of #37016 - alexcrichton:workspaces, r=japaric
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #37016 - alexcrichton:workspaces, r=japaric

Leverage Cargo workspaces in rustbuild

This is a continuation of https://github.com/rust-lang/rust/pull/36032 which implements the change to use `cargo metadata` to learn about the crate graph.

7 years agoRollup merge of #36937 - wesleywiser:patch-3, r=frewsxcv
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #36937 - wesleywiser:patch-3, r=frewsxcv

Fix documentation for `write!` on `std::fmt` page

Fixes #36906

7 years agoAuto merge of #37015 - ahmedcharles:sudo, r=alexcrichton
bors [Sat, 8 Oct 2016 09:23:47 +0000 (02:23 -0700)]
Auto merge of #37015 - ahmedcharles:sudo, r=alexcrichton

Prevent accidentally running 'make install' as sudo.

r? @alexcrichton

I missed this in the previous PR, but this seems to work. It should probably go in a rollup, but I don't know how to do those. :/

7 years agoAuto merge of #37014 - nnethercote:avoid-pat_to_string, r=arielb1
bors [Sat, 8 Oct 2016 05:51:04 +0000 (22:51 -0700)]
Auto merge of #37014 - nnethercote:avoid-pat_to_string, r=arielb1

Avoid some `pat_to_string` calls.

`ty_of_method_or_bare_fn` currently calls `pat_to_string` even when it
doesn't need to. Fixing this avoids hundreds of large allocations (e.g.
171,600 bytes, in `mk_printer`) in several of rustc-benchmarks.

7 years agoAuto merge of #37006 - brson:jsbackend, r=alexcrichton
bors [Sat, 8 Oct 2016 01:17:54 +0000 (18:17 -0700)]
Auto merge of #37006 - brson:jsbackend, r=alexcrichton

Turn on JSBackend in the makefiles

This should make the nightlies work with emscripten. r? @alexcrichton

Closes #37004

7 years agorustbuild: Use `cargo metadata` to learn about DAG
Alex Crichton [Fri, 7 Oct 2016 06:30:38 +0000 (23:30 -0700)]
rustbuild: Use `cargo metadata` to learn about DAG

This updates the commit to use workspaces to use `cargo metadata` instead of
hardcoded lists about what to test. This should help us be resilient to updates
in the future on behalf of the crate DAG and minimize the amount of files that
need to be touched.

7 years agoDo not add an empty #[derive()] list in expand_derive (fixes #37033)
Anthony Ramine [Fri, 7 Oct 2016 23:42:58 +0000 (01:42 +0200)]
Do not add an empty #[derive()] list in expand_derive (fixes #37033)

7 years agoFix a typo in a comment describing gcc.rs's eh_frame_registry module
Nick Fitzgerald [Fri, 7 Oct 2016 22:00:48 +0000 (15:00 -0700)]
Fix a typo in a comment describing gcc.rs's eh_frame_registry module

s/reigster/register/

7 years agorewrite checked_{div,rem} to no contain any reference to panics
Jorge Aparicio [Fri, 7 Oct 2016 20:12:21 +0000 (15:12 -0500)]
rewrite checked_{div,rem} to no contain any reference to panics

even without optimizations

7 years agorustbuild: Fix dependencies of check-docs step
Alex Crichton [Fri, 7 Oct 2016 19:28:54 +0000 (12:28 -0700)]
rustbuild: Fix dependencies of check-docs step

Some of the doc tests depend on `extern crate test`, so depend on libtest
instead of libstd here.

7 years agoUse workspaces and switch to a single Cargo.lock.
Ahmed Charles [Fri, 2 Sep 2016 08:55:29 +0000 (01:55 -0700)]
Use workspaces and switch to a single Cargo.lock.

This involves hacking the code used to run cargo test on various
packages, because it reads Cargo.lock to determine which packages should
be tested. This change implements a blacklist, since that will catch new
crates when they are added in the future.

7 years agoAuto merge of #36981 - alexcrichton:catch-unwind-for-tests, r=sfackler
bors [Fri, 7 Oct 2016 18:38:27 +0000 (11:38 -0700)]
Auto merge of #36981 - alexcrichton:catch-unwind-for-tests, r=sfackler

std: Minor cleanup to libtest

* Don't spawn two threads for all tests, just one now that `catch_unwind` is
  stable.
* Remove usage of the unstable `box` keyword
* Remove usage of the unstable `FnBox` trait

7 years agoAuto merge of #36945 - alexcrichton:proc-macro-rename, r=nrc
bors [Fri, 7 Oct 2016 14:58:27 +0000 (07:58 -0700)]
Auto merge of #36945 - alexcrichton:proc-macro-rename, r=nrc

rustc: Rename rustc_macro to proc_macro

This commit blanket renames the `rustc_macro` infrastructure to `proc_macro`,
which reflects the general consensus of #35900. A follow up PR to Cargo will be
required to purge the `rustc-macro` name as well.

7 years agoAvoid some `pat_to_string` calls.
Nicholas Nethercote [Fri, 7 Oct 2016 01:51:53 +0000 (12:51 +1100)]
Avoid some `pat_to_string` calls.

`ty_of_method_or_bare_fn` currently calls `pat_to_string` even when it
doesn't need to. Fixing this avoids hundreds of large allocations (e.g.
171,600 bytes, in `mk_printer`) in several of the rustc-benchmarks.

7 years agoFix documentation for `write!` on `std::fmt` page
Wesley Wiser [Thu, 6 Oct 2016 00:27:47 +0000 (20:27 -0400)]
Fix documentation for `write!` on `std::fmt` page

Fixes #36906

7 years agoAuto merge of #37024 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Fri, 7 Oct 2016 11:24:24 +0000 (04:24 -0700)]
Auto merge of #37024 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 5 pull requests

- Successful merges: #36222, #36665, #36929, #37003, #37008
- Failed merges:

7 years agoRollup merge of #37008 - tshepang:quotes, r=steveklabnik
Guillaume Gomez [Fri, 7 Oct 2016 09:45:05 +0000 (11:45 +0200)]
Rollup merge of #37008 - tshepang:quotes, r=steveklabnik

reference: use ticks instead of quotes

7 years agoRollup merge of #37003 - GuillaumeGomez:underline-removal, r=steveklabnik
Guillaume Gomez [Fri, 7 Oct 2016 09:45:04 +0000 (11:45 +0200)]
Rollup merge of #37003 - GuillaumeGomez:underline-removal, r=steveklabnik

Remove underline when run button hovered

r? @steveklabnik

7 years agoRollup merge of #36929 - angelsl:issue-36683, r=steveklabnik
Guillaume Gomez [Fri, 7 Oct 2016 09:45:04 +0000 (11:45 +0200)]
Rollup merge of #36929 - angelsl:issue-36683, r=steveklabnik

Reference: Mention `move` keyword for lambdas

From issue #36683

7 years agoRollup merge of #36665 - kmcallister:arc-docs, r=steveklabnik
Guillaume Gomez [Fri, 7 Oct 2016 09:45:04 +0000 (11:45 +0200)]
Rollup merge of #36665 - kmcallister:arc-docs, r=steveklabnik

Update Arc docs to match new Rc docs

`Rc` docs were updated in #36571. This applies similar changes to `Arc` docs.

r? @GuillaumeGomez

7 years agoRollup merge of #36222 - acrrd:better_underline_E0057, r=GuillaumeGomez
Guillaume Gomez [Fri, 7 Oct 2016 09:45:04 +0000 (11:45 +0200)]
Rollup merge of #36222 - acrrd:better_underline_E0057, r=GuillaumeGomez

Better underline for E0057,E0060,E0061

Fix #35214
Part of #35233

r? @jonathandturner

7 years agoAuto merge of #36940 - eulerdisk:incr_test_for_hash_trait, r=michaelwoerister
bors [Fri, 7 Oct 2016 07:51:28 +0000 (00:51 -0700)]
Auto merge of #36940 - eulerdisk:incr_test_for_hash_trait, r=michaelwoerister

Test Case for Incr. Comp. Hash for traits #36681.

Fixes #36681
Part of #36350

Currently, the following tests fail:

Unsafe modifier
Extern modifier
Extern c to rust-intrinsic
Trait unsafety
Change type of method parameter (&i32 => &mut i32)
Mode of self parameter

r? @michaelwoerister

7 years agoAuto merge of #36753 - srinivasreddy:hash, r=nrc
bors [Fri, 7 Oct 2016 04:53:29 +0000 (21:53 -0700)]
Auto merge of #36753 - srinivasreddy:hash, r=nrc

run rustfmt on libstd/collections/hash folder

7 years agoPrevent accidentally running 'make install' as sudo.
Ahmed Charles [Fri, 7 Oct 2016 02:36:36 +0000 (19:36 -0700)]
Prevent accidentally running 'make install' as sudo.

7 years agoAuto merge of #35641 - ahmedcharles:install, r=alexcrichton
bors [Thu, 6 Oct 2016 23:31:27 +0000 (16:31 -0700)]
Auto merge of #35641 - ahmedcharles:install, r=alexcrichton

rustbuild: Add install target. #34675

It just prints to the screen currently.

r? @alexcrichton

I'm working on the next commit to actually have it install.

7 years agoreference: use ticks instead of quotes
Tshepang Lekhonkhobe [Thu, 6 Oct 2016 20:29:05 +0000 (22:29 +0200)]
reference: use ticks instead of quotes

7 years agoBetter underline for E0057,E0060,E0061
Andrea Corradi [Thu, 1 Sep 2016 08:34:30 +0000 (10:34 +0200)]
Better underline for E0057,E0060,E0061

7 years agoTurn on JSBackend in the makefiles
Brian Anderson [Thu, 6 Oct 2016 19:02:28 +0000 (19:02 +0000)]
Turn on JSBackend in the makefiles

7 years agoAuto merge of #37002 - jonathandturner:rollup, r=jonathandturner
bors [Thu, 6 Oct 2016 18:42:34 +0000 (11:42 -0700)]
Auto merge of #37002 - jonathandturner:rollup, r=jonathandturner

Rollup of 15 pull requests

- Successful merges: #36726, #36832, #36909, #36930, #36932, #36957, #36959, #36960, #36962, #36965, #36966, #36967, #36972, #36974, #36977
- Failed merges:

7 years agorustc: Rename rustc_macro to proc_macro
Alex Crichton [Mon, 3 Oct 2016 16:49:39 +0000 (09:49 -0700)]
rustc: Rename rustc_macro to proc_macro

This commit blanket renames the `rustc_macro` infrastructure to `proc_macro`,
which reflects the general consensus of #35900. A follow up PR to Cargo will be
required to purge the `rustc-macro` name as well.

7 years agoRemove underline when run button hovered
Guillaume Gomez [Thu, 6 Oct 2016 16:10:00 +0000 (18:10 +0200)]
Remove underline when run button hovered

7 years agostd: Minor cleanup to libtest
Alex Crichton [Wed, 5 Oct 2016 16:50:15 +0000 (09:50 -0700)]
std: Minor cleanup to libtest

* Don't spawn two threads for all tests, just one now that `catch_unwind` is
  stable.
* Remove usage of the unstable `box` keyword
* Remove usage of the unstable `FnBox` trait

7 years agoRollup merge of #36977 - Razican:bufreader_typo_fix, r=alexcrichton
Jonathan Turner [Thu, 6 Oct 2016 15:35:44 +0000 (08:35 -0700)]
Rollup merge of #36977 - Razican:bufreader_typo_fix, r=alexcrichton

Fixed small typo in `BufRead` comments

`BufRead` comments, in the `Seek` trait implementation, was talking about allocating 8 *ebibytes*. It was a typo, the correct unit is *exbibytes*, since *ebibytes* don't even exist. The calculation is correct, though.

7 years agoRollup merge of #36974 - MathieuBordere:mb/36812_ICHFunctionInterfaces, r=michaelwoer...
Jonathan Turner [Thu, 6 Oct 2016 15:35:43 +0000 (08:35 -0700)]
Rollup merge of #36974 - MathieuBordere:mb/36812_ICHFunctionInterfaces, r=michaelwoerister

Mb/36812 ich function interfaces

r? @michaelwoerister

This PR contains fixes for #36812 and #36914

7 years agoRollup merge of #36972 - nastevens:fix-rustbuild-per-target-musl-root, r=alexcrichton
Jonathan Turner [Thu, 6 Oct 2016 15:35:43 +0000 (08:35 -0700)]
Rollup merge of #36972 - nastevens:fix-rustbuild-per-target-musl-root, r=alexcrichton

Fix rustbuild per-target musl root

In #36292, support was added to target musl libc for ARM targets using rustbuild. Specifically, that change allowed the addition of per-target `musl-root` options in the rustbuild `config.toml` so that multiple targets depending on musl could be built. However, that implementation contained a couple of omissions: the `musl-root` option was added to the config, but was never added to the TOML parsing, and therefore was not actually being loaded from `config.toml`. This PR rectifies that.

Using these changes and a heavily modified version of the buildbot Docker container, I have been able to build rust targeting `armv7-unknown-linux-musleabihf` and have successfully run the binaries on a Raspberry Pi 3. I'm also planning to test `arm-unknown-linux-musleabi` and `arm-unknown-linux-musleabihf` systems, but have no reason to believe that this change would not simply work on those targets.

7 years agoRollup merge of #36967 - edre:master, r=alexcrichton
Jonathan Turner [Thu, 6 Oct 2016 15:35:43 +0000 (08:35 -0700)]
Rollup merge of #36967 - edre:master, r=alexcrichton

update sip.rs for new intrinsics and defaults

7 years agoRollup merge of #36966 - ollie27:rustdoc_mut_ptr_impl, r=alexcrichton
Jonathan Turner [Thu, 6 Oct 2016 15:35:43 +0000 (08:35 -0700)]
Rollup merge of #36966 - ollie27:rustdoc_mut_ptr_impl, r=alexcrichton

rustdoc: Fix missing *mut T impl

`impl<T> *mut T` is currently missing from
https://doc.rust-lang.org/nightly/std/primitive.pointer.html and this adds
it back.

7 years agoRollup merge of #36965 - kallisti5:master, r=alexcrichton
Jonathan Turner [Thu, 6 Oct 2016 15:35:43 +0000 (08:35 -0700)]
Rollup merge of #36965 - kallisti5:master, r=alexcrichton

Haiku: Fix IPv6 target_os check

7 years agoRollup merge of #36962 - arielb1:cast-assumptions, r=eddyb
Jonathan Turner [Thu, 6 Oct 2016 15:35:42 +0000 (08:35 -0700)]
Rollup merge of #36962 - arielb1:cast-assumptions, r=eddyb

Emit more assumptions in trans

Perf numbers pending.

7 years agoRollup merge of #36960 - michaelwoerister:linker-regression, r=eddyb
Jonathan Turner [Thu, 6 Oct 2016 15:35:42 +0000 (08:35 -0700)]
Rollup merge of #36960 - michaelwoerister:linker-regression, r=eddyb

Linker regression

This should fix the symbol conflicts reported in #36852.
The PR also makes some debug output a bit more informative.

r? @eddyb

7 years agoRollup merge of #36959 - arielb1:simplify-cfg-fixes, r=eddyb
Jonathan Turner [Thu, 6 Oct 2016 15:35:42 +0000 (08:35 -0700)]
Rollup merge of #36959 - arielb1:simplify-cfg-fixes, r=eddyb

fix pred_count accounting in SimplifyCfg

r? @eddyb

7 years agoRollup merge of #36957 - cynicaldevil:docs, r=frewsxcv
Jonathan Turner [Thu, 6 Oct 2016 15:35:42 +0000 (08:35 -0700)]
Rollup merge of #36957 - cynicaldevil:docs, r=frewsxcv

Minor modifications in concurrency section of the Rust book

Fixes #36939
r? @steveklabnik

7 years agoRollup merge of #36932 - michaelwoerister:type-alias-dep-graph-test, r=nikomatsakis
Jonathan Turner [Thu, 6 Oct 2016 15:35:42 +0000 (08:35 -0700)]
Rollup merge of #36932 - michaelwoerister:type-alias-dep-graph-test, r=nikomatsakis

incr.comp.: Add test case for dependency graph of type aliases.

r? @nikomatsakis

7 years agoRollup merge of #36930 - angelsl:issue-36202, r=frewsxcv
Jonathan Turner [Thu, 6 Oct 2016 15:35:41 +0000 (08:35 -0700)]
Rollup merge of #36930 - angelsl:issue-36202, r=frewsxcv

Clarify last element in str.{r,}splitn documentation

An attempt at #36202.

I'm not sure if my wording is actually clearer, to be honest...

7 years agoRollup merge of #36909 - GuillaumeGomez:merge_e0002_e0004, r=arielb1
Jonathan Turner [Thu, 6 Oct 2016 15:35:41 +0000 (08:35 -0700)]
Rollup merge of #36909 - GuillaumeGomez:merge_e0002_e0004, r=arielb1

Merge E0002 into E0004

Fixes #36724.

r? @jonathandturner

7 years agoRollup merge of #36832 - ParkHanbum:master, r=michaelwoerister
Jonathan Turner [Thu, 6 Oct 2016 15:35:41 +0000 (08:35 -0700)]
Rollup merge of #36832 - ParkHanbum:master, r=michaelwoerister

Add testcase for issue-32948

issue-32948 is similar to issue-32554.

issue-32948 : Symbol names for monomorphized trait impls are not stable across crates
issue-32554 : Symbol names for generics are not stable across crates

so, I append issue-32948's testcase to issue-32554's testcase.
thanks!

7 years agoRollup merge of #36726 - cbreeden:patch-1, r=GuillaumeGomez
Jonathan Turner [Thu, 6 Oct 2016 15:35:41 +0000 (08:35 -0700)]
Rollup merge of #36726 - cbreeden:patch-1, r=GuillaumeGomez

Touch up formatting for variance README.md

There were a few places that needed extra indentation to register as a code block.

7 years agoChanged some names
Andrea Pretto [Thu, 6 Oct 2016 08:05:48 +0000 (10:05 +0200)]
Changed some names

7 years agoAdd testcase for issue-32948
ParkHanbum [Thu, 29 Sep 2016 07:24:14 +0000 (16:24 +0900)]
Add testcase for issue-32948
ref : https://github.com/rust-lang/rust/issue/32948

7 years agoICH: Remove obsolete binding in saw_ty
Mathieu Borderé [Thu, 6 Oct 2016 06:10:52 +0000 (08:10 +0200)]
ICH: Remove obsolete binding in saw_ty

7 years agoAdd support for docdir, libdir and mandir.
Ahmed Charles [Thu, 6 Oct 2016 05:42:19 +0000 (22:42 -0700)]
Add support for docdir, libdir and mandir.

7 years agoInstall docs, std and rustc using results from dist.
Ahmed Charles [Thu, 6 Oct 2016 04:19:01 +0000 (21:19 -0700)]
Install docs, std and rustc using results from dist.

7 years agorustbuild: Add install target. #34675
Ahmed Charles [Sat, 13 Aug 2016 06:38:17 +0000 (23:38 -0700)]
rustbuild: Add install target. #34675

It just prints to the screen currently.

7 years agoAuto merge of #36893 - apasel422:issue-32114, r=alexcrichton
bors [Thu, 6 Oct 2016 01:10:34 +0000 (18:10 -0700)]
Auto merge of #36893 - apasel422:issue-32114, r=alexcrichton

Restore `DISCONNECTED` state in `oneshot::Packet::send`

Closes #32114

I'm not sure if this is the best approach, but the current action of swapping `DISCONNECTED` with `DATA` seems wrong. Additionally, it is strange that the `send` method (and others in the `oneshot` module) takes `&mut self` despite performing atomic operations, as this requires extra discipline to avoid data races and lets us use methods like `AtomicUsize::get_mut` instead of methods that require a memory ordering.

7 years agoMerge branch 'master' into mb/36812_ICHFunctionInterfaces
Mathieu Borderé [Wed, 5 Oct 2016 21:30:55 +0000 (23:30 +0200)]
Merge branch 'master' into mb/36812_ICHFunctionInterfaces

7 years agoICH: update saw_ty for TyBareFn; Update tests for functioninterfaces
Mathieu Borderé [Wed, 5 Oct 2016 21:17:58 +0000 (23:17 +0200)]
ICH: update saw_ty for TyBareFn; Update tests for functioninterfaces

7 years agoRestore `DISCONNECTED` state in `oneshot::Packet::send`
Andrew Paseltiner [Sat, 1 Oct 2016 12:39:11 +0000 (08:39 -0400)]
Restore `DISCONNECTED` state in `oneshot::Packet::send`

Closes #32114

7 years agoAdded the third parameter to the "add second lifetime bound to method type parameter"
Andrea Pretto [Wed, 5 Oct 2016 21:02:01 +0000 (23:02 +0200)]
Added the third parameter to the "add second lifetime bound to method type parameter"

7 years agoFixes requested by @michaelwoerister
Andrea Pretto [Wed, 5 Oct 2016 20:05:54 +0000 (22:05 +0200)]
Fixes requested by @michaelwoerister

7 years agoFixes run button appearing when it shouldn't
Guillaume Gomez [Wed, 21 Sep 2016 21:43:03 +0000 (23:43 +0200)]
Fixes run button appearing when it shouldn't

7 years agoClarify last element in str.{r,}splitn documentation
angelsl [Mon, 3 Oct 2016 15:37:30 +0000 (23:37 +0800)]
Clarify last element in str.{r,}splitn documentation

7 years agoAuto merge of #36944 - brson:modos, r=alexcrichton
bors [Wed, 5 Oct 2016 16:14:02 +0000 (09:14 -0700)]
Auto merge of #36944 - brson:modos, r=alexcrichton

Fix mod declarations on untested platforms

r? @alexcrichton

7 years agoAuto merge of #36736 - srinivasreddy:method, r=nrc
bors [Wed, 5 Oct 2016 12:53:01 +0000 (05:53 -0700)]
Auto merge of #36736 - srinivasreddy:method, r=nrc

run rustfmt on librustc_typeck/check/method  folder

7 years agoFixed small typo in `BufRead` comments
Razican [Wed, 5 Oct 2016 11:18:45 +0000 (13:18 +0200)]
Fixed small typo in `BufRead` comments

`BufRead` comments, in the `Seek` trait implementation, was talking
about allocating 8 *ebibytes*. It was a typo, the correct unit is
*exbibytes*, since *ebibytes* don't even exist. The calculation is
correct, though.

7 years agoemit an assume that cast-from enums are in range
Ariel Ben-Yehuda [Tue, 4 Oct 2016 16:24:49 +0000 (19:24 +0300)]
emit an assume that cast-from enums are in range

Fixes #36955.

7 years agoclean up misc. uses of get_dataptr/get_meta
Ariel Ben-Yehuda [Tue, 4 Oct 2016 15:34:03 +0000 (18:34 +0300)]
clean up misc. uses of get_dataptr/get_meta

7 years agoemit !nonnull metadata on loaded fat pointers when possible
Ariel Ben-Yehuda [Tue, 4 Oct 2016 14:44:31 +0000 (17:44 +0300)]
emit !nonnull metadata on loaded fat pointers when possible

cc #36920 (in addition to LLVM PR30597, should fix the &&[i32] case)

7 years agoAuto merge of #36971 - brson:docdir, r=alexcrichton
bors [Wed, 5 Oct 2016 09:34:06 +0000 (02:34 -0700)]
Auto merge of #36971 - brson:docdir, r=alexcrichton

Update rust-installer. Fixes #36451

Via https://github.com/rust-lang/rust-installer/pull/54. Untested...

r? @alexcrichton

7 years agoAuto merge of #36958 - nikomatsakis:issue-36856, r=eddyb
bors [Wed, 5 Oct 2016 06:13:08 +0000 (23:13 -0700)]
Auto merge of #36958 - nikomatsakis:issue-36856, r=eddyb

force `i1` booleans to `i8` when comparing

Work around LLVM bug.

cc #36856

r? @eddyb

7 years agoAdjustments due to naming changes in Ty_ and PatKind structs
Mathieu Borderé [Wed, 5 Oct 2016 05:11:04 +0000 (07:11 +0200)]
Adjustments due to naming changes in Ty_ and PatKind structs

7 years agoICH - Include omitted elements in inc. comp. hash #36914
Mathieu Borderé [Tue, 4 Oct 2016 21:25:00 +0000 (23:25 +0200)]
ICH - Include omitted elements in inc. comp. hash #36914

7 years agoICH - Add test cases for function interfaces
Mathieu Borderé [Mon, 3 Oct 2016 18:28:44 +0000 (20:28 +0200)]
ICH - Add test cases for function interfaces

7 years agorun rustfmt on librustc_typeck/check/method folder
Srinivas Reddy Thatiparthy [Tue, 4 Oct 2016 03:36:07 +0000 (09:06 +0530)]
run rustfmt on librustc_typeck/check/method folder

7 years agoAuto merge of #36942 - arielb1:cast-lifetimes, r=eddyb
bors [Wed, 5 Oct 2016 02:51:08 +0000 (19:51 -0700)]
Auto merge of #36942 - arielb1:cast-lifetimes, r=eddyb

stop having identity casts be lexprs

that made no sense (see test), and was incompatible with borrowck.

Fixes #36936.

beta-nominated since (bad) regression.

r? @eddyb

7 years agorustbuild: Fix panic message when musl-root not set
Nick Stevens [Wed, 5 Oct 2016 01:22:51 +0000 (20:22 -0500)]
rustbuild: Fix panic message when musl-root not set

The previous panic message delivered when a musl target was specified
but musl-root was not specified incorrectly instructed the user to add
the musl-root key to the "build" section of config.toml. The key
actually needs to be added to the "rust" section.

7 years agorustbuild: Fix bug preventing per-target musl-root
Nick Stevens [Wed, 5 Oct 2016 01:17:53 +0000 (20:17 -0500)]
rustbuild: Fix bug preventing per-target musl-root

In #36292, support was added to target musl libc for ARM targets using
rustbuild. Specifically, that change allowed the addition of per-target
"musl-root" options in the rustbuild config.toml so that multiple
targets depending on musl could be built. However, that implementation
contained a couple of omissions: the musl-root option was added to the
config, but was never added to the TOML parsing, and therefore was not
actually being loaded from config.toml. This commit rectifies that and
allows successful building of musl-based ARM targets.

7 years agoUpdate rust-installer. Fixes #36451
Brian Anderson [Wed, 5 Oct 2016 00:17:30 +0000 (00:17 +0000)]
Update rust-installer. Fixes #36451

7 years agoAuto merge of #36814 - petrochenkov:def, r=eddyb
bors [Tue, 4 Oct 2016 23:30:30 +0000 (16:30 -0700)]
Auto merge of #36814 - petrochenkov:def, r=eddyb

Refactoring/bugfixing around definitions for struct/variant constructors

 https://github.com/rust-lang/rust/commit/d917c364ad0edfa441e5c219da1b00511b976789 separates definitions for struct/variant constructors living in value namespace from struct/variant type definitions.

https://github.com/rust-lang/rust/commit/adfb37827b3a52a83dd11d5781e5b492714a5d4c fixes cross-crate resolution of reexports reexporting half-items, like struct constructors without struct type or types without constructor. Such reexports can appear due to glob shadowing.
Resolution now is not affected by the order in which items and reexports are decoded from metadata (cc https://github.com/rust-lang/rust/issues/31337#issuecomment-183996263). `try_define` is not used during building reduced graph anymore.
500 lines of this PR are tests for this exotic situation, the remaining line diff count is actually negative! :)

https://github.com/rust-lang/rust/commit/c695d0c8756a87c0708b97b7e277b6a3f4712b97 (and partially https://github.com/rust-lang/rust/commit/aabf132de04643602ec17b6abab9e276366d9c6d) moves most of pattern resolution checks from typeck to resolve (except those checking for associated items), uses the same wording for pattern resolution error messages from both typeck and resolve and makes the messages more precise.

https://github.com/rust-lang/rust/commit/11e3524e5afa4ac1b04aece67fb683f078e63f37 fixes seemingly incorrectly set `NON_ZERO_SIZED` attributes for struct/variant ctors in const eval.

https://github.com/rust-lang/rust/commit/4586fea2531054d9b25f8663f1ba4b32b07c11c2 eliminates `ty::VariantKind` in favor of `def::CtorKind`. The logic is that variant kinds are irrelevant for types, they make sense only when we deal with constructor functions/constants. Despite that `VariantDefData` still keeps a copy of `CtorKind`, but it's used only for various kinds of pretty-printing (and for storing in metadata).

https://github.com/rust-lang/rust/commit/aabf132de04643602ec17b6abab9e276366d9c6d is mostly a cleanup of various impossible or improperly used definitions, and other small definition cleanups.

cc @jseyfried
r? @eddyb

7 years agoMinor modifications in concurrency section of the Rust book
Nikhil Shagrithaya [Tue, 4 Oct 2016 17:30:22 +0000 (17:30 +0000)]
Minor modifications in concurrency section of the Rust book

7 years agoupdate sip.rs for new intrinsics and defaults
Eric Roshan-Eisner [Tue, 4 Oct 2016 21:33:16 +0000 (14:33 -0700)]
update sip.rs for new intrinsics and defaults

7 years agoRemove some unused methods from metadata
Vadim Petrochenkov [Wed, 14 Sep 2016 21:51:46 +0000 (00:51 +0300)]
Remove some unused methods from metadata

Address comments + Fix rebase

7 years agoHaiku: Fix IPv6 target_os check
Alexander von Gluck IV [Tue, 4 Oct 2016 20:41:26 +0000 (15:41 -0500)]
Haiku: Fix IPv6 target_os check

7 years agoAuto merge of #36933 - alexcrichton:less-neon-again, r=eddyb
bors [Tue, 4 Oct 2016 20:23:09 +0000 (13:23 -0700)]
Auto merge of #36933 - alexcrichton:less-neon-again, r=eddyb

rustc: Try again to disable NEON on armv7 linux

This is a follow-up to #35814 which apparently didn't disable it hard enough. It
looks like LLVM's default armv7 target enables NEON so we'd otherwise have to
pass `-neon`, but we're already enabling armv7 with `+v7` supposedly, so let's
try just telling LLVM that the armv7 target is arm and then enable features
selectively.

Closes #36913

7 years agotrans: Make sure that each FnOnce shim is only translated once.
Michael Woerister [Tue, 4 Oct 2016 20:15:37 +0000 (16:15 -0400)]
trans: Make sure that each FnOnce shim is only translated once.

7 years agoTurn some impossible definitions into ICEs
Vadim Petrochenkov [Wed, 14 Sep 2016 21:51:46 +0000 (00:51 +0300)]
Turn some impossible definitions into ICEs

7 years agoEliminate ty::VariantKind in favor of def::CtorKind
Vadim Petrochenkov [Wed, 14 Sep 2016 21:51:46 +0000 (00:51 +0300)]
Eliminate ty::VariantKind in favor of def::CtorKind

7 years agoSet `NON_ZERO_SIZED` flag correctly for struct/union ctors
Vadim Petrochenkov [Wed, 14 Sep 2016 21:51:46 +0000 (00:51 +0300)]
Set `NON_ZERO_SIZED` flag correctly for struct/union ctors

And for methods/functions as well, they are zero-sized now