Guillaume Gomez [Fri, 5 Aug 2016 14:12:59 +0000 (16:12 +0200)]
Rollup merge of #35328 - trixnz:update-error-62, r=jonathandturner
Update error format for E0062
Fixes #35217 as part of #35233
There seems to be an issue with the old format ignoring the labels which results in the incorrect line being rendered in the old format. I spoke with @jonathandturner about this and it seems to be a bug. Pertinent information [here](https://gist.github.com/trixnz/ad11e68687529e164427df8f8eb63116).
Guillaume Gomez [Fri, 5 Aug 2016 14:12:55 +0000 (16:12 +0200)]
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.
Guillaume Gomez [Fri, 5 Aug 2016 14:12:54 +0000 (16:12 +0200)]
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.
Guillaume Gomez [Fri, 5 Aug 2016 14:12:53 +0000 (16:12 +0200)]
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.
bors [Thu, 4 Aug 2016 18:51:27 +0000 (11:51 -0700)]
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.
bors [Thu, 4 Aug 2016 05:56:33 +0000 (22:56 -0700)]
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.
bors [Wed, 3 Aug 2016 20:24:53 +0000 (13:24 -0700)]
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.
bors [Wed, 3 Aug 2016 09:23:29 +0000 (02:23 -0700)]
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 :cry:)
* 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.
bors [Wed, 3 Aug 2016 06:32:31 +0000 (23:32 -0700)]
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.
mLuby [Tue, 2 Aug 2016 21:08:19 +0000 (14:08 -0700)]
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.