Commit Graph

55623 Commits

Author SHA1 Message Date
Stefan Schindler
91f9704299 Update rustdoc version 2016-08-04 12:12:10 +02:00
Stefan Schindler
c622a427bf Update the man page rustc.1 2016-08-04 12:06:49 +02:00
bors
e804a3cf25 Auto merge of #35168 - scottcarr:deaggregation, r=nikomatsakis
[MIR] Deaggregate structs to enable further optimizations

Currently, we generate MIR like:

```
tmp0 = ...;
tmp1 = ...;
tmp3 = Foo { a: ..., b: ... };
```

This PR implements "deaggregation," i.e.:

```
tmp3.0 = ...
tmp3.1 = ...
```

Currently, the code only deaggregates structs, not enums.  My understanding is that we do not have MIR to set the discriminant of an enum.
2016-08-04 03:01:37 -07:00
bors
271d048523 Auto merge of #35015 - petrochenkov:forearg, r=nikomatsakis
Properly enforce the "patterns aren't allowed in foreign functions" rule

Cases like `arg @ PATTERN` or `mut arg` were missing.
Apply the same rule to function pointer types.

Closes https://github.com/rust-lang/rust/issues/35203
[breaking-change], no breakage in sane code is expected though
r? @nikomatsakis

This is somewhat related to https://github.com/rust-lang/rfcs/pull/1685 (cc @matklad).
The goal is to eventually support full pattern syntax where it makes sense (function body may present) and to support *only* the following forms - `TYPE`, `ident: TYPE`, `_: TYPE` - where patterns don't make sense (function body doesn't present), i.e. in foreign functions and function pointer types.
2016-08-03 22:56:33 -07:00
William Lee
61318156f8 Fixes for issues #35215 and #35216 2016-08-04 00:32:49 -04:00
Shantanu Raj
e5e4cccd3b Update wording on E0080
Change "attempted" to "attempt"
2016-08-04 07:31:06 +05:30
bors
40f3ee2a01 Auto merge of #34520 - Manishearth:fix-unsafecell-docs, r=steveklabnik
Clarify UnsafeCell docs; fix #34496

None
2016-08-03 18:59:47 -07:00
Niko Matsakis
bfbfe639b1 skip assert-dep-graph unless unit testing
this can actually be expensive!
2016-08-03 19:33:51 -04:00
Chris Stankus
c89e27824f Update error message for E0109 2016-08-03 18:00:52 -05:00
Guillaume Gomez
1607d5b437 Add note test for E0132 2016-08-03 23:13:48 +02:00
Stefan Schindler
20721a4923 Add link to replacement function 2016-08-03 23:12:25 +02:00
Stefan Schindler
4fc6f5ac26 Add an example to std:🧵:park_timeout 2016-08-03 23:12:25 +02:00
Guillaume Gomez
9b690c94f0 Update E0132 to new format 2016-08-03 22:39:51 +02:00
Guillaume Gomez
d603892ea7 Add span method for hir::Generics struct 2016-08-03 22:39:47 +02:00
bors
0a3180baab Auto merge of #35261 - eddyb:llvm-autoupgrade, r=nikomatsakis
Support removed LLVM intrinsics by invoking its AutoUpgrade mechanism.

Turns out that LLVM sometimes renames platform intrinsics or replaces them with first-class instructions.
For example, signed minimum became `select (icmp SLT, a, b), a, b` where `a` and `b` are vectors.

This is blocking the Servo rustup ([relevant failure](http://build.servo.org/builders/windows-dev/builds/226/steps/compile/logs/stdio)), as they're using a few such intrinsics.
The fix in this PR is to invoke LLVM's own `AutoUpgrade` mechanism to do the replacements.
2016-08-03 13:24:53 -07:00
Eduard Burtescu
63f0c4de67 Support removed LLVM intrinsics by invoking its AutoUpgrade mechanism. 2016-08-03 22:37:57 +03:00
Scott A Carr
06acf16cdb reduce rightward drift, add precondition comment 2016-08-03 11:10:38 -07:00
bors
a0b4e67648 Auto merge of #35174 - arielb1:llvm-type-audit, r=eddyb
Audit C++ types in rustllvm

cc @eddyb

Fixes #35131
2016-08-03 07:52:08 -07:00
Ariel Ben-Yehuda
3041a97b1a finish type-auditing rustllvm 2016-08-03 15:08:47 +03:00
Ariel Ben-Yehuda
24874170b4 split the FFI part of rustc_llvm to rustc_llvm::ffi 2016-08-03 15:08:47 +03:00
Ariel Ben-Yehuda
d091ef802f begin auditing the C++ types in RustWrapper 2016-08-03 15:08:47 +03:00
Ariel Ben-Yehuda
696691e3c4 audit LLVM C++ types in ArchiveWrapper and PassWrapper 2016-08-03 15:08:47 +03:00
Ariel Ben-Yehuda
81df89fc2d remove the ExecutionEngine binding
the code has no tests and will just bitrot by itself.

this is a [breaking-change]
2016-08-03 15:08:47 +03:00
Guillaume Gomez
3e46c9dfcc Add doc examples for FileType struct 2016-08-03 12:52:36 +02:00
bors
9cf189701e Auto merge of #35178 - m4b:fix-relx-musl, r=alexcrichton
Add -mrelax-relocations=no hacks to fix musl build

* this is just a start, dunno if it will work, but I'll just push it out to get feedback (my rust is still building 😢)
* I don't know much about rustbuild, so i just added that flag in there. it's a total hack, don't judge me
* I suspect the places in the musl .mk files are sufficient (but we may also need it present when building std), I'm not sure, needs more testing.
2016-08-03 02:23:29 -07:00
bors
ea07d52676 Auto merge of #35176 - japaric:no-atomics, r=alexcrichton
core: fix `cargo build` for targets with "max-atomic-width": 0

This crate was failing to compile due to dead_code/unused_imports
warnings. This commits disables these two lints for these targets.

---

r? @alexcrichton
cc @Amanieu is `cfg(target_has_atomic = "8")` the right `cfg` to use? I think that all targets that support some form of atomics will at a minimum support byte level atomics.

FWIW, the only thing that's left in `sync::atomic` for these targets is `Ordering` and the `fence` function.
2016-08-02 23:32:31 -07:00
bors
f495483f2d Auto merge of #35159 - michaelwoerister:incr-comp-implies-orbit, r=nikomatsakis
Automatically enable -Zorbit if -Zincremental is specified.

Fixes #34973

r? @nikomatsakis
2016-08-02 20:25:50 -07:00
Niko Matsakis
54595ecb60 use memoized pattern for SizedConstraint
I cannot figure out how to write a test for this, but I observed
incorrect edges as a result of not using memoized pattern here
(e.g., LateLintCheck -> SizedConstraint).
2016-08-02 19:31:25 -04:00
bors
379bfd0bc1 Auto merge of #35197 - eddyb:mir-cross-crate, r=nikomatsakis
rustc_trans: don't lose the cross-crate DefId, MIR trans needs it.

We might have been missing out on some issues because MIR trans was never being used cross-crate.

cc @rust-lang/compiler
2016-08-02 16:13:55 -07:00
Niko Matsakis
b13d5041f6 improve log when something no longer exists 2016-08-02 19:11:46 -04:00
Vadim Petrochenkov
5c88efc0da Properly enforce the "patterns aren't allowed in foreign functions" check
Apply the same check to function pointer types
2016-08-03 01:29:53 +03:00
Eduard Burtescu
ee977e715f rustc_trans: don't lose the cross-crate DefId, MIR trans needs it. 2016-08-03 01:25:34 +03:00
Scott A Carr
d5908a3250 run mir opt test with mir-opt-level=3 so they fire 2016-08-02 14:47:53 -07:00
Vadim Petrochenkov
e5cc046659 Move the E0130 check to AST validation pass 2016-08-03 00:44:10 +03:00
mLuby
d90c16625f Update the-stack-and-the-heap.md
Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
2016-08-02 14:08:19 -07:00
Michael Woerister
44dbc4907d Automatically enable -Zorbit if -Zincremental is specified. 2016-08-02 17:02:01 -04:00
Niko Matsakis
94acff1803 replace graph rewriting with detecting inlined ids
We now detect inlined id's earlier (in the HIR map) and rewrite a read
of them to be a read of the metadata for the associated item.
2016-08-02 16:36:09 -04:00
bors
a005b67859 Auto merge of #35187 - alexcrichton:only-orbit-off-stage1-and-two, r=eddyb
mk: Only pass -Zorbit=off in stage1/2

The stage0 compiler doesn't understand this option.
2016-08-02 13:10:27 -07:00
Alex Crichton
2fd8044cef mk: Only pass -Zorbit=off in stage1/2
The stage0 compiler doesn't understand this option.
2016-08-02 13:06:43 -07:00
Jorge Aparicio
5f80104431 core: fix cargo build for targets with "max-atomic-width": 0
This crate was failing to compile due to dead_code/unused_imports
warnings. This commits disables these two lints for these targets.
2016-08-02 14:34:40 -05:00
Scott A Carr
d918c990de add hashtag to emphasis its a gh issue 2016-08-02 12:30:57 -07:00
Guillaume Gomez
1fa9b8dc96 Add doc example for Vec 2016-08-02 20:45:31 +02:00
Scott A Carr
e8bfba7dc8 fix field type, add test 2016-08-02 11:24:55 -07:00
Scott A Carr
bda46c21fe reduce rightward drift, add fixme 2016-08-02 10:46:26 -07:00
m4b
5383cd7163 Fix style issues 2016-08-02 09:54:05 -07:00
bors
32e462ef99 Auto merge of #35145 - jseyfried:avoid_extra_resolve_error, r=arielb1
resolve: Avoid emitting an unhelpful cascading resolution error

Fixes #35142.
2016-08-02 06:12:23 -07:00
Corey Farwell
727d9293e4 Add doc examples for range::RangeArgument::{start,end}. 2016-08-02 09:01:46 -04:00
Corey Farwell
3081dd8637 Add doc example for std::ffi::NulError::nul_position. 2016-08-02 08:50:04 -04:00
Niko Matsakis
903142aee3 dump statistics about re-use w/ -Z time-passes
It's nice to get a rough idea of how much work we're
saving.
2016-08-02 05:31:25 -04:00
Niko Matsakis
2e7df80098 make metadata hashes determinstic
When we hash the inputs to a MetaData node, we have to hash them in a
consistent order. We achieve this by sorting the stringfied `DefPath`
entries. Also, micro-optimie by cache more results across the saving
process.
2016-08-02 05:31:25 -04:00