86555 Commits

Author SHA1 Message Date
ljedrz
1d1dc48407 codegen_llvm_back: whitespace & formatting fixes 2018-11-10 19:22:37 +01:00
Guillaume Gomez
3030cbea95 Remove short doc where it starts with a codeblock 2018-11-10 19:03:58 +01:00
Santiago Pastorino
3b3b60ce6e
Avoid converting bytes to UTF-8 strings to print, just pass bytes to stdout/err 2018-11-10 14:16:04 -03:00
Nikita Popov
48aa602548 Set BINARYEN_TRAP_MODE=clamp
This avoids trapping in the -Zsaturating-float-casts implementation.
2018-11-10 14:09:49 +01:00
Bruce Mitchener
9b4d68e53b Fix documentation typos. 2018-11-10 19:31:49 +07:00
bors
42959a24a1 Auto merge of #55830 - alexcrichton:update-cargo, r=alexcrichton
Update Cargo submodule

Hopefully a relatively routine update!
2018-11-10 12:21:58 +00:00
Axary
852ff1fc7d add FromIterator<A> to Box<[A]> 2018-11-10 11:43:39 +01:00
bors
4cd3294a1d Auto merge of #55637 - pnkfelix:issue-55552-dont-attempt-to-ascribe-projections-out-of-a-ty-var, r=nikomatsakis
Do not attempt to ascribe projections out of a ty var

If we encounter `_` ascribed to structural pattern like `(a, b)`, just skip relate_types.

Fix #55552
2018-11-10 09:38:10 +00:00
bors
0366ccafa6 Auto merge of #55717 - oli-obk:rustdoc_overflow, r=pnkfelix
Bubble up an overflow error so that rustdoc can ignore it

fixes #54524

Idk how to write a test for this, other than trying to minimize the entire diesel crate. If desirable I will do that.

Note that there are many other such overflow errors hiding out there. Should we try to proactively eliminate them or do we just whack-a-mole them?

cc @GuillaumeGomez

r? @nikomatsakis
2018-11-10 07:03:04 +00:00
Daniel Alley
38d2f9b470 Fix docstring spelling mistakes 2018-11-09 23:14:46 -05:00
Daniel Alley
999c2e2433 Fix #[cfg] for step impl on ranges 2018-11-09 23:00:44 -05:00
Wesley Wiser
3cce5c7977 Don't inline virtual calls (take 2)
When I fixed the previous mis-optimizations, I didn't realize there were
actually two different places where we mutate `callsites` and both of
them should have the same behavior.

As a result, if a function was inlined and that function contained
virtual function calls, they were incorrectly being inlined. I also
added a test case which covers this.
2018-11-09 22:11:40 -05:00
Mazdak Farrokhzad
5e7b7f2ae6 make PhantomData #[structural_match]. 2018-11-10 03:39:42 +01:00
Mazdak Farrokhzad
ac1c6b0378 adjust ui/../mod-static-with-const-fn.rs 2018-11-10 02:36:19 +01:00
Mazdak Farrokhzad
ea73edbc0f revert spurious edits. 2018-11-10 02:33:21 +01:00
bors
06118eac4c Auto merge of #55626 - nikic:update-emscripten, r=alexcrichton
Update emscripten

This updates emscripten to 1.38.15, which is based on LLVM 6.0.1 and would allow us to drop code for handling LLVM 4.

The main issue I ran into is that exporting statics through `EXPORTED_FUNCTIONS` no longer works. As far as I understand exporting non-functions doesn't really make sense under emscripten anyway, so I've modified the symbol export code to not even try.

Closes #52323.
2018-11-10 01:16:02 +00:00
Oliver Scherer
c8e23d8c4c Tidy ♪ all ♪ the ♪ way ♪♪♪♪ with ♪ a ♪ newline ♪ missing ♪ cry ♪♪ 2018-11-10 01:11:06 +01:00
Oliver Scherer
56768235e1 Add a few tests around raw pointers and interior mutability 2018-11-10 01:11:06 +01:00
Mazdak Farrokhzad
38a90406d3 revert some more constification. 2018-11-10 01:11:06 +01:00
Mazdak Farrokhzad
e15c62d61f revert making internal APIs const fn. 2018-11-10 01:10:07 +01:00
Mazdak Farrokhzad
d1d2aa22c0 reduce list to functions callable in const ctx. 2018-11-10 01:10:07 +01:00
Mazdak Farrokhzad
53fe629417 fix mod-static-with-const-fn.rs. 2018-11-10 01:10:07 +01:00
Mazdak Farrokhzad
88da279e45 --bless mod-static-with-const-fn.stderr 2018-11-10 01:10:07 +01:00
Mazdak Farrokhzad
f65b630d33 constify parts of libstd. 2018-11-10 01:10:07 +01:00
Mazdak Farrokhzad
061d345c16 constify parts of liballoc. 2018-11-10 01:07:32 +01:00
Mazdak Farrokhzad
5b89877dda constify parts of libcore. 2018-11-10 01:07:32 +01:00
Mazdak Farrokhzad
b4c046b342 constify libcore/time.rs 2018-11-10 01:06:09 +01:00
Alex Crichton
62d78010a9 Update Cargo submodule
Hopefully a relatively routine update!
2018-11-09 12:59:05 -08:00
Esteban Küber
a90240d279 Simplify logic 2018-11-09 10:16:07 -08:00
Oliver Scherer
f4c9dd55d6 Add missing rustc_promotable attribute to unsigned min_value and max_value 2018-11-09 17:55:24 +01:00
Nikita Popov
82574e9ec8 Pull in fix for dist-i686-linux build 2018-11-09 16:59:45 +01:00
QuietMisdreavus
401cb6bb53 don't inline pub use some_crate unless directly asked to 2018-11-09 09:07:57 -06:00
David Wood
e6a466e60c
Fix ICE and find correct return span.
This commit fixes an ICE and determines the correct return span in cases
with a method implemented on a struct with an an elided lifetime.
2018-11-09 15:39:32 +01:00
Aaron Power
efad877c44 Updated RELEASES.md for 1.31.0 2018-11-09 12:12:31 +00:00
Felix S. Klock II
5f91373c77 Typecheck patterns of all match arms first, so we get types for bindings. 2018-11-09 12:06:12 +01:00
Oliver Scherer
1206549d1b Fix tidy 2018-11-09 10:11:20 +01:00
Nicholas Nethercote
a66d7b2001 Use SmallVec to avoid allocations in from_decimal_string.
This reduces the number of allocations in a "check clean" build of
`tuple-stress` by 14%, reducing instruction counts by 0.6%.
2018-11-09 18:57:18 +11:00
bors
36a50c29f6 Auto merge of #55803 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 17 pull requests

Successful merges:

 - #55576 (Clarify error message for -C opt-level)
 - #55633 (Support memcpy/memmove with differing src/dst alignment)
 - #55638 (Fix ICE in msg_span_from_free_region on ReEmpty)
 - #55659 (rustc: Delete grouping logic from the musl target)
 - #55719 (Sidestep link error from rustfix'ed code by using a *defined* static.)
 - #55736 (Elide anon lifetimes in conflicting impl note)
 - #55739 (Consume optimization fuel from the MIR inliner)
 - #55742 (Avoid panic when matching function call)
 - #55753 (borrow_set: remove a helper function and a clone it uses)
 - #55755 (Improve creation of 3 IndexVecs)
 - #55758 ([regression - rust2018]: unused_mut lint false positives on nightly)
 - #55760 (Remove intermediate font specs)
 - #55761 (mir: remove a hacky recursive helper function)
 - #55774 (wasm32-unknown-emscripten expects the rust_eh_personality symbol)
 - #55777 (Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.)
 - #55783 (Deprecate mpsc channel selection)
 - #55788 (rustc: Request ansi colors if stderr isn't a tty)

Failed merges:

r? @ghost
2018-11-09 06:56:25 +00:00
Mark Rousskov
d293d1eea0
Rollup merge of #55788 - alexcrichton:wincolors, r=petrochenkov
rustc: Request ansi colors if stderr isn't a tty

Currently Cargo will always capture the output of rustc meaning that
rustc is never hooked up to a tty. To retain colors Cargo uses the
`fwdansi` crate to ensure that ansi color codes are translated to
windows terminal methods (and ansi codes otherwise just go their natural
route on Unix).

Cargo passes `--color always` to rustc to ensure that using a pipe
doesn't trick it into not emitting colors at all. It turns out, however,
that `--color always` ends up still accidentally using the native shell
api on native windows shells.

The fix here is to instead pass `AlwaysAnsi` to `termcolor` instead of
`Always`, ensuring that when `--color always` is passed to rustc and its
output isn't a terminal, we're always generating ansi colors regardless
of the platform.

Closes #55769
2018-11-08 18:15:24 -07:00
Mark Rousskov
667904f049
Rollup merge of #55783 - stjepang:deprecate-select, r=SimonSapin
Deprecate mpsc channel selection

Rationale: https://github.com/rust-lang/rust/issues/27800#issuecomment-421760863

r? @SimonSapin
2018-11-08 18:15:21 -07:00
Mark Rousskov
686de87d2f
Rollup merge of #55777 - nnethercote:less-P-in-ast, r=petrochenkov
Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.

Because it results in fewer allocations and small speedups on some
benchmarks.
2018-11-08 18:15:19 -07:00
Mark Rousskov
7125b8fa07
Rollup merge of #55774 - CryZe:patch-5, r=alexcrichton
wasm32-unknown-emscripten expects the rust_eh_personality symbol

The `wasm32-unknown-emscripten` expects the `rust_eh_personality` symbol to be there, but a cfg checking for `target_arch = "wasm32"` which was meant to remove the symbol from the `wasm32-unknown-unknown` target, didn't check for whether `emscripten` is targeted or not, so the symbol accidentally got filtered out there as well.

Fixes #55276
2018-11-08 18:15:17 -07:00
Mark Rousskov
6117195bac
Rollup merge of #55761 - ljedrz:fix_promote_candidate_hack, r=estebank
mir: remove a hacky recursive helper function

It can be replaced with a `while let` loop.
2018-11-08 18:15:14 -07:00
Mark Rousskov
2d0a697852
Rollup merge of #55760 - jonhoo:no-intermediate-fonts, r=GuillaumeGomez
Remove intermediate font specs

This is a (much) more constrained version of #54772 that also aims at improving the situation in #34681. It removes any font specifications that are not the "official" rustdoc font, and instead relies on the browser to provide the fallback font if the official on is not available. On Linux systems, this is particularly important, as fonts like Helvetica, Arial, and Times often look pretty bad since they're pulled from extracted MS fonts. A specification like `serif` or `sans-serif` lets the browser instead choose a good font.
2018-11-08 18:15:12 -07:00
Mark Rousskov
7944075e0b
Rollup merge of #55758 - davidtwco:issue-55344, r=pnkfelix
[regression - rust2018]: unused_mut lint false positives on nightly

Fixes #55344.

This commit filters out locals that have never been initialized for
consideration in the `unused_mut` lint.

This is intended to detect when the statement that would have
initialized the local was removed as unreachable code. In these cases,
we would not want to lint. This is the same behaviour as the AST borrow
checker.

This is achieved by taking advantage of an existing pass over the MIR
for the `unused_mut` lint and creating a set of those locals that were
never initialized.

r? @pnkfelix
2018-11-08 18:15:10 -07:00
Mark Rousskov
660340e4aa
Rollup merge of #55755 - ljedrz:a_few_indexvec_tweaks, r=varkor
Improve creation of 3 IndexVecs

- preallocate when the minimal size is known
- use `from_elem_n` instead of `new`+`resize`
2018-11-08 18:15:08 -07:00
Mark Rousskov
7864780f9e
Rollup merge of #55753 - ljedrz:borrow_set_insert_clone, r=oli-obk
borrow_set: remove a helper function and a clone it uses

This clone doesn't seem necessary.

r? @oli-obk
2018-11-08 18:15:05 -07:00
Mark Rousskov
792476516f
Rollup merge of #55742 - F001:fix-55718, r=petrochenkov
Avoid panic when matching function call

Fix #55718

This bug is introduced by #53751. The original code checked `Def::AssociatedConst(..) | Def::Method(..)` before `pat_ty.no_bound_vars().expect("expected fn type")`. But somehow I exchanged the sequence carelessly. Sorry about that.

r? @petrochenkov
2018-11-08 18:15:03 -07:00
Mark Rousskov
96ee13a56d
Rollup merge of #55739 - wesleywiser:mir_inline_fuel, r=nikomatsakis
Consume optimization fuel from the MIR inliner

This makes it easier to debug mis-optimizations that occur during
inlining. Thanks to @nikomatsakis for the suggestion!
2018-11-08 18:15:01 -07:00
Mark Rousskov
e873984fa8
Rollup merge of #55736 - estebank:elide-anon-lt, r=petrochenkov
Elide anon lifetimes in conflicting impl note

Fix #54690.
2018-11-08 18:14:58 -07:00