Commit Graph

57587 Commits

Author SHA1 Message Date
Jonathan Turner
a19e22e2e9 Rollup merge of #36967 - edre:master, r=alexcrichton
update sip.rs for new intrinsics and defaults
2016-10-06 08:35:43 -07:00
Jonathan Turner
4c100260e0 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.
2016-10-06 08:35:43 -07:00
Jonathan Turner
0698929563 Rollup merge of #36965 - kallisti5:master, r=alexcrichton
Haiku: Fix IPv6 target_os check
2016-10-06 08:35:43 -07:00
Jonathan Turner
ed5a3c01a0 Rollup merge of #36962 - arielb1:cast-assumptions, r=eddyb
Emit more assumptions in trans

Perf numbers pending.
2016-10-06 08:35:42 -07:00
Jonathan Turner
1a7aa75332 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
2016-10-06 08:35:42 -07:00
Jonathan Turner
9f1089b56f Rollup merge of #36959 - arielb1:simplify-cfg-fixes, r=eddyb
fix pred_count accounting in SimplifyCfg

r? @eddyb
2016-10-06 08:35:42 -07:00
Jonathan Turner
534a2b5b3b Rollup merge of #36957 - cynicaldevil:docs, r=frewsxcv
Minor modifications in concurrency section of the Rust book

Fixes #36939
r? @steveklabnik
2016-10-06 08:35:42 -07:00
Jonathan Turner
5dcd71f8ab 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
2016-10-06 08:35:42 -07:00
Jonathan Turner
91106f7cc3 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...
2016-10-06 08:35:41 -07:00
Jonathan Turner
5a199bf3fc Rollup merge of #36909 - GuillaumeGomez:merge_e0002_e0004, r=arielb1
Merge E0002 into E0004

Fixes #36724.

r? @jonathandturner
2016-10-06 08:35:41 -07:00
Jonathan Turner
09712d7ac3 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!
2016-10-06 08:35:41 -07:00
Jonathan Turner
d3bb56860d 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.
2016-10-06 08:35:41 -07:00
ParkHanbum
cb700e78ed Add testcase for issue-32948
ref : https://github.com/rust-lang/rust/issue/32948
2016-10-06 15:52:09 +09:00
bors
46957f0577 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.
2016-10-05 18:10:34 -07:00
Andrew Paseltiner
fb90e4c7b6
Restore DISCONNECTED state in oneshot::Packet::send
Closes #32114
2016-10-05 17:14:06 -04:00
angelsl
a4e9c39209 Clarify last element in str.{r,}splitn documentation 2016-10-06 00:21:14 +08:00
bors
3210fd5c20 Auto merge of #36944 - brson:modos, r=alexcrichton
Fix mod declarations on untested platforms

r? @alexcrichton
2016-10-05 09:14:02 -07:00
bors
fd1ea1330e Auto merge of #36736 - srinivasreddy:method, r=nrc
run rustfmt on librustc_typeck/check/method  folder
2016-10-05 05:53:01 -07:00
Ariel Ben-Yehuda
45fe3a1a2a emit an assume that cast-from enums are in range
Fixes #36955.
2016-10-05 14:12:30 +03:00
Ariel Ben-Yehuda
9233366271 clean up misc. uses of get_dataptr/get_meta 2016-10-05 14:12:30 +03:00
Ariel Ben-Yehuda
6d54e0eb6b emit !nonnull metadata on loaded fat pointers when possible
cc #36920 (in addition to LLVM PR30597, should fix the &&[i32] case)
2016-10-05 13:58:04 +03:00
bors
26d8b6f762 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
2016-10-05 02:34:06 -07:00
bors
506f80730f Auto merge of #36958 - nikomatsakis:issue-36856, r=eddyb
force `i1` booleans to `i8` when comparing

Work around LLVM bug.

cc #36856

r? @eddyb
2016-10-04 23:13:08 -07:00
Srinivas Reddy Thatiparthy
dcb6b15061
run rustfmt on librustc_typeck/check/method folder 2016-10-05 10:04:04 +05:30
bors
165a03d983 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
2016-10-04 19:51:08 -07:00
Brian Anderson
ee0d833929 Update rust-installer. Fixes #36451 2016-10-05 00:17:30 +00:00
bors
fd065a8381 Auto merge of #36814 - petrochenkov:def, r=eddyb
Refactoring/bugfixing around definitions for struct/variant constructors

 d917c364ad separates definitions for struct/variant constructors living in value namespace from struct/variant type definitions.

adfb37827b 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! :)

c695d0c875 (and partially aabf132de0) 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.

11e3524e5a fixes seemingly incorrectly set `NON_ZERO_SIZED` attributes for struct/variant ctors in const eval.

4586fea253 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).

aabf132de0 is mostly a cleanup of various impossible or improperly used definitions, and other small definition cleanups.

cc @jseyfried
r? @eddyb
2016-10-04 16:30:30 -07:00
Nikhil Shagrithaya
335d393114 Minor modifications in concurrency section of the Rust book 2016-10-04 22:09:29 +00:00
Eric Roshan-Eisner
7bbfac60e3 update sip.rs for new intrinsics and defaults 2016-10-04 14:48:03 -07:00
Vadim Petrochenkov
bc0eabd7a7 Remove some unused methods from metadata
Address comments + Fix rebase
2016-10-04 23:53:51 +03:00
Alexander von Gluck IV
4922abfbd2 Haiku: Fix IPv6 target_os check 2016-10-04 15:41:26 -05:00
bors
1a41928045 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
2016-10-04 13:23:09 -07:00
Michael Woerister
2d34ad04ef trans: Make sure that each FnOnce shim is only translated once. 2016-10-04 16:15:37 -04:00
Vadim Petrochenkov
bd291ce21a Turn some impossible definitions into ICEs 2016-10-04 22:25:25 +03:00
Vadim Petrochenkov
75d6522b9a Eliminate ty::VariantKind in favor of def::CtorKind 2016-10-04 22:22:36 +03:00
Vadim Petrochenkov
64bdf1b74b Set NON_ZERO_SIZED flag correctly for struct/union ctors
And for methods/functions as well, they are zero-sized now
2016-10-04 22:20:38 +03:00
Vadim Petrochenkov
c95b280d72 Move pattern resolution checks from typeck to resolve
Make error messages more precise
2016-10-04 22:20:38 +03:00
Vadim Petrochenkov
e8ea38e42a 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
2016-10-04 22:20:37 +03:00
Vadim Petrochenkov
d19c16acfb Fix cross-crate resolution of half-items created by export shadowing 2016-10-04 22:20:37 +03:00
Vadim Petrochenkov
da7b1c984c Separate Def::StructCtor/Def::VariantCtor from Def::Struct/Def::Variant 2016-10-04 22:20:37 +03:00
Ariel Ben-Yehuda
bfdf437f37 update tests 2016-10-04 20:43:43 +03:00
Oliver Middleton
cd7a04cadc 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.
2016-10-04 18:39:28 +01:00
Alex Crichton
4625642211 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
2016-10-04 09:26:57 -07:00
Michael Woerister
457019967b Add symbol hash to trans::partitioning debug output. 2016-10-04 12:02:19 -04:00
Michael Woerister
29212ecdc9 Assign internal linkage to autogenerated FnOnce::call_once() instances. 2016-10-04 12:00:15 -04:00
bors
a5dac7a2af 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
2016-10-04 08:29:41 -07:00
Ariel Ben-Yehuda
44ac0160ce SimplifyCfg: don't incref target when collapsing a goto with 1 pred 2016-10-04 17:07:34 +03:00
Ariel Ben-Yehuda
ae51ccfa77 SimplifyCfg: simplify the start block 2016-10-04 16:23:01 +03:00
bors
4a9af010eb 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:
2016-10-04 04:15:20 -07:00
Niko Matsakis
3e1bd199b0 force i1 booleans to i8 when comparing
Work around LLVM bug.

cc #36856
2016-10-04 05:56:02 -04:00