]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoincr.comp.: Hide concrete hash algorithm used for ICH
Michael Woerister [Thu, 29 Sep 2016 15:00:11 +0000 (11:00 -0400)]
incr.comp.: Hide concrete hash algorithm used for ICH

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 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 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 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 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

7 years agoMove pattern resolution checks from typeck to resolve
Vadim Petrochenkov [Wed, 14 Sep 2016 21:51:46 +0000 (00:51 +0300)]
Move pattern resolution checks from typeck to resolve

Make error messages more precise

7 years agoFurther cleanup in resolve
Vadim Petrochenkov [Wed, 14 Sep 2016 21:51:46 +0000 (00:51 +0300)]
Further cleanup in resolve

`try_define` is not used in build_reduced_graph anymore
Collection of field names for error reporting is optimized
Some comments added

7 years agoFix cross-crate resolution of half-items created by export shadowing
Vadim Petrochenkov [Wed, 14 Sep 2016 21:51:46 +0000 (00:51 +0300)]
Fix cross-crate resolution of half-items created by export shadowing

7 years agoSeparate Def::StructCtor/Def::VariantCtor from Def::Struct/Def::Variant
Vadim Petrochenkov [Wed, 14 Sep 2016 21:51:46 +0000 (00:51 +0300)]
Separate Def::StructCtor/Def::VariantCtor from Def::Struct/Def::Variant

7 years agoupdate tests
Ariel Ben-Yehuda [Tue, 4 Oct 2016 17:43:43 +0000 (20:43 +0300)]
update tests

7 years agorustdoc: Fix missing *mut T impl
Oliver Middleton [Tue, 4 Oct 2016 17:39:28 +0000 (18:39 +0100)]
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 agorustc: Try again to disable NEON on armv7 linux
Alex Crichton [Mon, 3 Oct 2016 17:09:28 +0000 (10:09 -0700)]
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 agoAdd symbol hash to trans::partitioning debug output.
Michael Woerister [Tue, 4 Oct 2016 16:02:19 +0000 (12:02 -0400)]
Add symbol hash to trans::partitioning debug output.

7 years agoAssign internal linkage to autogenerated FnOnce::call_once() instances.
Michael Woerister [Tue, 4 Oct 2016 16:00:15 +0000 (12:00 -0400)]
Assign internal linkage to autogenerated FnOnce::call_once() instances.

7 years agoAuto merge of #36874 - japaric:thumbs, r=alexcrichton
bors [Tue, 4 Oct 2016 15:29:41 +0000 (08:29 -0700)]
Auto merge of #36874 - japaric:thumbs, r=alexcrichton

add Thumbs to the compiler

this commit adds 4 new target definitions to the compiler for easier
cross compilation to ARM Cortex-M devices.

- `thumbv6m-none-eabi`
  - For the Cortex-M0, Cortex-M0+ and Cortex-M1
  - This architecture doesn't have hardware support (instructions) for
    atomics. Hence, the `Atomic*` structs are not available for this
    target.
- `thumbv7m-none-eabi`
  - For the Cortex-M3
- `thumbv7em-none-eabi`
  - For the FPU-less variants of the Cortex-M4 and Cortex-M7
  - On this target, all the floating point operations will be lowered
    software routines (intrinsics)
- `thumbv7em-none-eabihf`
  - For the variants of the Cortex-M4 and Cortex-M7 that do have a FPU.
  - On this target, all the floating point operations will be lowered
    to hardware instructions

No binary releases of standard crates, like `core`, are planned for
these targets because Cargo, in the future, will compile e.g. the `core`
crate on the fly as part of the `cargo build` process. In the meantime,
you'll have to compile the `core` crate yourself. [Xargo] is the easiest
way to do that as in handles the compilation of `core` automatically and
can be used just like Cargo: `xargo build --target thumbv6m-none-eabi`
is all that's needed.

[Xargo]: https://crates.io/crates/xargo

---

cc @brson @alexcrichton

7 years agoSimplifyCfg: don't incref target when collapsing a goto with 1 pred
Ariel Ben-Yehuda [Tue, 4 Oct 2016 13:27:27 +0000 (16:27 +0300)]
SimplifyCfg: don't incref target when collapsing a goto with 1 pred

7 years agoSimplifyCfg: simplify the start block
Ariel Ben-Yehuda [Tue, 4 Oct 2016 13:23:01 +0000 (16:23 +0300)]
SimplifyCfg: simplify the start block

7 years agoAuto merge of #36953 - Manishearth:rollup, r=Manishearth
bors [Tue, 4 Oct 2016 11:15:20 +0000 (04:15 -0700)]
Auto merge of #36953 - Manishearth:rollup, r=Manishearth

Rollup of 12 pull requests

- Successful merges: #36798, #36878, #36902, #36903, #36908, #36916, #36917, #36921, #36928, #36938, #36941, #36951
- Failed merges:

7 years agoforce `i1` booleans to `i8` when comparing
Niko Matsakis [Tue, 4 Oct 2016 09:55:45 +0000 (05:55 -0400)]
force `i1` booleans to `i8` when comparing

Work around LLVM bug.

cc #36856

7 years agoRollup merge of #36951 - nnethercote:fix-ICE, r=eddyb
Manish Goregaokar [Tue, 4 Oct 2016 09:54:04 +0000 (15:24 +0530)]
Rollup merge of #36951 - nnethercote:fix-ICE, r=eddyb

Fix an ICE in BuildReducedGraphVisitor::visit_trait_item.

This ICE occurs in the futures-rs-test-all benchmark in rustc-benchmarks (fixes #36950).

7 years agoRollup merge of #36941 - martinhath:issue-21837, r=alexcrichton
Manish Goregaokar [Tue, 4 Oct 2016 09:54:04 +0000 (15:24 +0530)]
Rollup merge of #36941 - martinhath:issue-21837, r=alexcrichton

Add regression test for Issue #21837

This PR adds a regression test for Issue #21837, as explained in the comments of the issue.

7 years agoRollup merge of #36938 - tmiasko:cursor-seek-overflow, r=alexcrichton
Manish Goregaokar [Tue, 4 Oct 2016 09:54:04 +0000 (15:24 +0530)]
Rollup merge of #36938 - tmiasko:cursor-seek-overflow, r=alexcrichton

Check for overflow in Cursor<Vec<u8>>::write.

Ensure that cursor position fits into usize, before proceeding with
write. Fixes issue #36884.

7 years agoRollup merge of #36928 - GuillaumeGomez:error_urls, r=steveklabnik
Manish Goregaokar [Tue, 4 Oct 2016 09:54:04 +0000 (15:24 +0530)]
Rollup merge of #36928 - GuillaumeGomez:error_urls, r=steveklabnik

Add missing urls for error module

r? @steveklabnik

7 years agoRollup merge of #36921 - nnethercote:two-lexer-tweaks, r=nrc
Manish Goregaokar [Tue, 4 Oct 2016 09:54:03 +0000 (15:24 +0530)]
Rollup merge of #36921 - nnethercote:two-lexer-tweaks, r=nrc

Two lexer tweaks

19 days later, I haven't received a review of my commits in #36470. In an attempt to make some progress, I'm going to split up the changes. Here are the ones that don't relate to renaming things.

7 years agoRollup merge of #36917 - nnethercote:speed-up-plug_leaks, r=eddyb
Manish Goregaokar [Tue, 4 Oct 2016 09:54:03 +0000 (15:24 +0530)]
Rollup merge of #36917 - nnethercote:speed-up-plug_leaks, r=eddyb

Speed up `plug_leaks`

Profiling shows that `plug_leaks` and the functions it calls are hot on some benchmarks. It's very common that `skol_map` is empty in this function, and we can specialize `plug_leaks` in that case for some big speed-ups.

The PR has two commits. I'm fairly confident that the first one is correct -- I traced through the code to confirm that the `fold_regions` and `pop_skolemized` calls are no-ops when `skol_map` is empty, and I also temporarily added an assertion to check that `result` ends up having the same value as `value` in that case. This commit is responsible for most of the improvement.

I'm less confident about the second commit. The call to `resolve_type_vars_is_possible` can change `value` when `skol_map` is empty... but testing suggests that it doesn't matter if the call is
omitted.

So, please check both patches carefully, especially the second one!

Here are the speed-ups for the first commit alone.

stage1 compiler (built with old rustc, using glibc malloc), doing debug builds:
```
futures-rs-test  4.710s vs  4.538s --> 1.038x faster (variance: 1.009x, 1.005x)
issue-32062-equ  0.415s vs  0.368s --> 1.129x faster (variance: 1.009x, 1.010x)
issue-32278-big  1.884s vs  1.808s --> 1.042x faster (variance: 1.020x, 1.017x)
jld-day15-parse  1.907s vs  1.668s --> 1.143x faster (variance: 1.011x, 1.007x)
piston-image-0. 13.024s vs 12.421s --> 1.049x faster (variance: 1.004x, 1.012x)
rust-encoding-0  3.335s vs  3.276s --> 1.018x faster (variance: 1.021x, 1.028x)
```
stage2 compiler (built with new rustc, using jemalloc), doing debug builds:
```
futures-rs-test  4.167s vs  4.065s --> 1.025x faster (variance: 1.006x, 1.018x)
issue-32062-equ  0.383s vs  0.343s --> 1.118x faster (variance: 1.012x, 1.016x)
issue-32278-big  1.680s vs  1.621s --> 1.036x faster (variance: 1.007x, 1.007x)
jld-day15-parse  1.671s vs  1.478s --> 1.131x faster (variance: 1.016x, 1.004x)
piston-image-0. 11.336s vs 10.852s --> 1.045x faster (variance: 1.003x, 1.006x)
rust-encoding-0  3.036s vs  2.971s --> 1.022x faster (variance: 1.030x, 1.032x)
```
I've omitted the benchmarks for which the change was negligible.

And here are the speed-ups for the first and second commit in combination.

stage1 compiler (built with old rustc, using glibc malloc), doing debug
builds:
```
futures-rs-test  4.684s vs  4.498s --> 1.041x faster (variance: 1.012x, 1.012x)
issue-32062-equ  0.413s vs  0.355s --> 1.162x faster (variance: 1.019x, 1.006x)
issue-32278-big  1.869s vs  1.763s --> 1.060x faster (variance: 1.013x, 1.018x)
jld-day15-parse  1.900s vs  1.602s --> 1.186x faster (variance: 1.010x, 1.003x)
piston-image-0. 12.907s vs 12.352s --> 1.045x faster (variance: 1.005x, 1.006x)
rust-encoding-0  3.254s vs  3.248s --> 1.002x faster (variance: 1.063x, 1.045x)
```
stage2 compiler (built with new rustc, using jemalloc), doing debug builds:
```
futures-rs-test  4.183s vs  4.046s --> 1.034x faster (variance: 1.007x, 1.004x)
issue-32062-equ  0.380s vs  0.340s --> 1.117x faster (variance: 1.020x, 1.003x)
issue-32278-big  1.671s vs  1.616s --> 1.034x faster (variance: 1.031x, 1.012x)
jld-day15-parse  1.661s vs  1.417s --> 1.172x faster (variance: 1.013x, 1.005x)
piston-image-0. 11.347s vs 10.841s --> 1.047x faster (variance: 1.007x, 1.010x)
rust-encoding-0  3.050s vs  3.000s --> 1.017x faster (variance: 1.016x, 1.012x)
```
@eddyb: `git blame` suggests that you should review this. Thanks!

7 years agoRollup merge of #36916 - frewsxcv:patch-1, r=alexcrichton
Manish Goregaokar [Tue, 4 Oct 2016 09:54:03 +0000 (15:24 +0530)]
Rollup merge of #36916 - frewsxcv:patch-1, r=alexcrichton

Update unstable attr to reference tracking issue.

7 years agoRollup merge of #36908 - GuillaumeGomez:default_doc, r=apasel422
Manish Goregaokar [Tue, 4 Oct 2016 09:54:03 +0000 (15:24 +0530)]
Rollup merge of #36908 - GuillaumeGomez:default_doc, r=apasel422

fix typos

r? @steveklabnik

7 years agoRollup merge of #36903 - frewsxcv:typekind, r=jseyfried
Manish Goregaokar [Tue, 4 Oct 2016 09:54:02 +0000 (15:24 +0530)]
Rollup merge of #36903 - frewsxcv:typekind, r=jseyfried

Minor librustdoc cleanup and refactoring.

7 years agoRollup merge of #36902 - ollie27:stab_impls, r=alexcrichton
Manish Goregaokar [Tue, 4 Oct 2016 09:54:02 +0000 (15:24 +0530)]
Rollup merge of #36902 - ollie27:stab_impls, r=alexcrichton

std: Correct stability attributes for some implementations

These are displayed by rustdoc so should be correct.

7 years agoRollup merge of #36878 - BlueSpaceCanary:book-dedup-cargo-run-intro, r=GuillaumeGomez
Manish Goregaokar [Tue, 4 Oct 2016 09:54:02 +0000 (15:24 +0530)]
Rollup merge of #36878 - BlueSpaceCanary:book-dedup-cargo-run-intro, r=GuillaumeGomez

Avoid introducing `run` twice in the Rust book

As it stands, getting-started.md and guessing-game.md both introduce `run` as a new command. I switched it so that the 2nd refers back to the first introduction, rather than re-introducing the command.

(First ever FOSS PR, sorry if I screwed up anything obvious :) )

r? @steveklabnik

7 years agoRollup merge of #36798 - gavinb:fix/36164, r=GuillaumeGomez
Manish Goregaokar [Tue, 4 Oct 2016 09:54:01 +0000 (15:24 +0530)]
Rollup merge of #36798 - gavinb:fix/36164, r=GuillaumeGomez

Improve error message and snippet for "did you mean `x`"

- Fixes #36164
- Part of #35233

Based on the standalone example https://is.gd/8STXMd posted by @nikomatsakis and using the third formatting option mentioned in #36164 and agreed by @jonathandturner.

Note however this does not address the question of [how to handle an empty or unknown suggestion](https://github.com/rust-lang/rust/issues/36164#issuecomment-244460024). @nikomatsakis any suggestions on how best to address that part?

7 years agoFix an ICE in BuildReducedGraphVisitor::visit_trait_item.
Nicholas Nethercote [Tue, 4 Oct 2016 05:36:14 +0000 (16:36 +1100)]
Fix an ICE in BuildReducedGraphVisitor::visit_trait_item.

This ICE occurs in the futures-rs-test-all benchmark in
rustc-benchmarks.

7 years agochange max_atomic_width type from u64 to Option<u64>
Jorge Aparicio [Tue, 4 Oct 2016 04:45:40 +0000 (23:45 -0500)]
change max_atomic_width type from u64 to Option<u64>

to better express the idea that omitting this field defaults this value
to target_pointer_width

7 years agofix: "abort" -> PanicStrategy
Jorge Aparicio [Tue, 4 Oct 2016 03:54:59 +0000 (22:54 -0500)]
fix: "abort" -> PanicStrategy

7 years agoadd a reference about the stated FP facts
Jorge Aparicio [Tue, 4 Oct 2016 03:34:33 +0000 (22:34 -0500)]
add a reference about the stated FP facts

7 years agoadd +d16 and +fp-only-sp to thumbv7em-none-eabihf and documentation
Jorge Aparicio [Tue, 4 Oct 2016 03:28:40 +0000 (22:28 -0500)]
add +d16 and +fp-only-sp to thumbv7em-none-eabihf and documentation

7 years agoAuto merge of #36876 - nikomatsakis:issue-36381, r=pnkfelix
bors [Tue, 4 Oct 2016 02:36:27 +0000 (19:36 -0700)]
Auto merge of #36876 - nikomatsakis:issue-36381, r=pnkfelix

loosen assertion against proj in collector

The collector was asserting a total absence of projections, but some projections are expected, even in trans: in particular, projections containing higher-ranked regions, which we don't currently normalize.

r? @pnkfelix

Fixes #36381

7 years agoFix mod declarations on untested platforms
Brian Anderson [Mon, 3 Oct 2016 22:29:03 +0000 (22:29 +0000)]
Fix mod declarations on untested platforms

7 years agostop having identity casts be lexprs
Ariel Ben-Yehuda [Mon, 3 Oct 2016 22:13:36 +0000 (01:13 +0300)]
stop having identity casts be lexprs

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

Fixes #36936.

7 years agoAuto merge of #36821 - pweaver:master, r=michaelwoerister
bors [Mon, 3 Oct 2016 22:04:41 +0000 (15:04 -0700)]
Auto merge of #36821 - pweaver:master, r=michaelwoerister

 #36821

I am just starting to learn rust. Feedback would be appreciated.

7 years agoFixed lines longer than 100.
Andrea Pretto [Mon, 3 Oct 2016 21:51:22 +0000 (23:51 +0200)]
Fixed lines longer than 100.

7 years agoAdd test for Issue #21837
Martin Thoresen [Mon, 3 Oct 2016 12:46:21 +0000 (14:46 +0200)]
Add test for Issue #21837

7 years agoTest Case for Incr. Comp. Hash for traits #36681.
Andrea Pretto [Mon, 3 Oct 2016 20:59:16 +0000 (22:59 +0200)]
Test Case for Incr. Comp. Hash for traits #36681.

7 years agoCheck for overflow in Cursor<Vec<u8>>::write.
Tomasz Miąsko [Fri, 30 Sep 2016 22:00:00 +0000 (00:00 +0200)]
Check for overflow in Cursor<Vec<u8>>::write.

Ensure that cursor position fits into usize, before proceeding with
write. Fixes issue #36884.

7 years agofixes multi-line string whitespace in librustc_incremental/persist/fs.rs
Pweaver (Paul Weaver) [Mon, 3 Oct 2016 19:18:27 +0000 (15:18 -0400)]
fixes multi-line string whitespace in librustc_incremental/persist/fs.rs

7 years agoAuto merge of #36815 - alexcrichton:stabilize-1.13, r=aturon
bors [Mon, 3 Oct 2016 18:00:03 +0000 (11:00 -0700)]
Auto merge of #36815 - alexcrichton:stabilize-1.13, r=aturon

std: Stabilize and deprecate APIs for 1.13

This commit is intended to be backported to the 1.13 branch, and works with the
following APIs:

Stabilized

* `i32::checked_abs`
* `i32::wrapping_abs`
* `i32::overflowing_abs`
* `RefCell::try_borrow`
* `RefCell::try_borrow_mut`

Deprecated

* `BinaryHeap::push_pop`
* `BinaryHeap::replace`
* `SipHash13`
* `SipHash24`
* `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map`
  module

Closes #28147
Closes #34767
Closes #35057
Closes #35070