Commit Graph

55370 Commits

Author SHA1 Message Date
Guillaume Gomez
527e326756 Rollup merge of #35291 - yossi-k:master, r=jonathandturner
Update E0079 to new format

Fixes #35222. Part of #35233.
r? @GuillaumeGomez
2016-08-05 16:12:56 +02:00
Guillaume Gomez
7cb933ed82 Rollup merge of #35289 - birryree:E0060_E0061_format_update, r=jonathandturner
E0060 e0061 format update

This fixes #35215 and fixes #35216 as part of #35233

A separate issue will be opened to track the bonus portion of the tickets as @jaredwy will be handling that part.

?r @jonathandturner
2016-08-05 16:12:56 +02:00
Guillaume Gomez
da981cf94d Rollup merge of #35285 - razielgn:updated-e0071-to-new-format, r=jonathandturner
Updated E0071 to new format.

Bonus: the span underlines only the name of the thing that's not a struct rather than the whole expression.

Part of #35233.
Fixes #35220.

r? @jonathandturner
2016-08-05 16:12:56 +02:00
Guillaume Gomez
9186db86fd Rollup merge of #35266 - circuitfox:35247-E0109-update-error-format, r=jonathandturner
E0109 Update error format

Fixes #35247 as part of #35233.

r? @jonathandturner
2016-08-05 16:12:56 +02:00
Guillaume Gomez
158597fcd5 Rollup merge of #35264 - GuillaumeGomez:E0132_update, r=jonathandturner
E0132 update

Fixes #35258.

r? @jonathandturner
2016-08-05 16:12:55 +02:00
Guillaume Gomez
5780595e27 Rollup merge of #35239 - dns2utf8:doc_park_timeout, r=steveklabnik
Doc `std:🧵:park_timeout`

r? @steveklabnik
2016-08-05 16:12:55 +02:00
Guillaume Gomez
6e5e7e2ea0 Rollup merge of #35189 - mLuby:patch-1, r=steveklabnik
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-05 16:12:55 +02:00
Guillaume Gomez
8a923d48e2 Rollup merge of #35182 - frewsxcv:nulerror, r=steveklabnik
Add doc example for `std::ffi::NulError::nul_position`.

None
2016-08-05 16:12:55 +02:00
Guillaume Gomez
3ca18f725a Rollup merge of #35181 - GuillaumeGomez:vec_doc, r=steveklabnik
Add doc example for Vec

Fixes #29380.

r? @steveklabnik
2016-08-05 16:12:54 +02:00
Guillaume Gomez
e377049262 Rollup merge of #35175 - frewsxcv:tcp, r=GuillaumeGomez
A couple `std::net` doc improvements.

None
2016-08-05 16:12:54 +02:00
Guillaume Gomez
7971a93698 Rollup merge of #35137 - jongiddy:explicit-wildcard, r=steveklabnik
Provide more explicit example of wildcard version in guessing game doc.

Beginners may try to adapt the tutorial to develop their own code.
When using different dependencies, they may use the wildcard for
versioning.  Since they are new to the language, they will not know
that the wildcard asterisk is a string, not a token.  Make the correct
format more explicit, to remove one potential source of frustration.
2016-08-05 16:12:54 +02:00
Guillaume Gomez
4cf6c00322 Rollup merge of #35109 - GuillaumeGomez:io_docs, r=steveklabnik
Add io::Error doc examples

Fixes #29359.

r? @steveklabnik
2016-08-05 16:12:54 +02:00
Guillaume Gomez
56a89f5314 Rollup merge of #35076 - GuillaumeGomez:file_type_docs, r=steveklabnik
Add doc examples for FileType struct

Part of #29356.

r? @steveklabnik
2016-08-05 16:12:53 +02:00
Guillaume Gomez
494495267c Rollup merge of #35042 - Havvy:copy_error_doc, r=GuillaumeGomez
Add Derive not possible question to Copy

This adds a question and answer to the Q&A section of the Copy
docs. Specifically, it asks the question I asked while reading
the docs, and gives its answer.

cc @steveklabnik
2016-08-05 16:12:53 +02:00
Guillaume Gomez
5afe7bbeea Rollup merge of #35041 - frewsxcv:range-rangeargument, r=GuillaumeGomez
Add doc examples for `range::RangeArgument::{start,end}`.

None
2016-08-05 16:12:53 +02:00
Guillaume Gomez
1bb555257f Rollup merge of #34319 - zackmdavis:explain_slice_pattern_errors, r=GuillaumeGomez
extended information for slice pattern errors (E0527 through E0529)

r? @GuillaumeGomez
2016-08-05 16:12:53 +02:00
bors
41fe4b7195 Auto merge of #35283 - shantanuraj:master, r=jonathandturner
Update wording on E0080

Part of #35223

Update wording on error E0080. Change "attempted" to "attempt"

r? @GuillaumeGomez
2016-08-05 00:17:18 -07:00
bors
802d0811a5 Auto merge of #35274 - GuillaumeGomez:err_codes, r=jonathandturner
Add new error code tests

r? @jonathandturner
2016-08-04 17:52:24 -07:00
bors
545a3a94fc Auto merge of #35300 - eddyb:mir-neg-overflow, r=arielb1
rustc_trans: don't Assert(Overflow(Neg)) when overflow checks are off.

Generic functions using `Neg` on primitive types would panic even in release mode, with MIR trans.
The solution is a bit hacky, as I'm checking the message, since there's no dedicated `CheckedUnOp`.

Blocks Servo rustup ([failure #1](http://build.servo.org/builders/linux-rel/builds/2477/steps/test_3/logs/stdio), [failure #2](http://build.servo.org/builders/mac-rel-css/builds/2364/steps/test/logs/stdio)) - this should be the last hurdle, it affects only one test.
2016-08-04 11:51:27 -07:00
Eduard Burtescu
fbabe61641 rustc_trans: don't Assert(Overflow(Neg)) when overflow checks are off. 2016-08-04 19:57:57 +03:00
Federico Ravasio
7c58b26f70 Updated E0071 to new format.
The span underlines only the name of the thing that's not a struct rather
than the whole expression.
2016-08-04 17:26:25 +02:00
Yossi Konstantinovsky
7fc0b2f3e2 Update E0079 to new format 2016-08-04 16:23:24 +03:00
William Lee
ded0d512dc Removing trailing whitespace leftover from last re-formatting commit 2016-08-04 08:28:48 -04:00
William Lee
0e756840f0 Tidying up some of the line spacing / code formatting for NOTE/ERROR annotation to match other files. 2016-08-04 08:07:14 -04:00
Guillaume Gomez
8502c6cb7c Add new error code tests 2016-08-04 13:58:16 +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
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
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