Commit graph

74380 commits

Author SHA1 Message Date
kennytm
dcb15269f6
Rollup merge of #48154 - estebank:issue-31481, r=nikomatsakis
Continue parsing function after finding `...` arg

When encountering a variadic argument in a function definition that
doesn't accept it, if immediately after there's a closing paren,
continue parsing as normal. Otherwise keep current behavior of emitting
error and stopping.

Fix #31481.
2018-02-14 18:25:21 +08:00
kennytm
c4b211bdba
Rollup merge of #48151 - echochamber:update_range_example, r=estebank
Update ops range example to avoid confusion between indexes and values.

Makes clearer the numbers in the range refer to indexes, not the values at those indexes.
2018-02-14 18:25:19 +08:00
kennytm
5a193668db
Rollup merge of #48133 - matthiaskrgr:endianess_to_endianness, r=oli-obk
typo: correct endianess to endianness (this also changes function names!)
2018-02-14 18:25:18 +08:00
kennytm
3bcaaf47a1
Rollup merge of #48130 - ollie27:stab, r=Mark-Simulacrum
Correct a few stability attributes

* `core_float_bits`, `duration_core`, `path_component_asref`, and `repr_align` were stabalized in 1.25.0 not 1.24.0.
* Impls for `NonNull` involving unstable things should remain unstable.
* `Duration` should remain stable since 1.3.0 so it appears correctly in the `std` docs.
* `cursor_mut_vec` is an impl on only stable things so should be marked stable.
2018-02-14 18:25:16 +08:00
kennytm
83bed7d3a7
Rollup merge of #48126 - newpavlov:patch-1, r=alexcrichton
Whitelist pclmulqdq x86 feature flag

Relevant `stdsimd` [issue](https://github.com/rust-lang-nursery/stdsimd/issues/318).
2018-02-14 18:25:14 +08:00
kennytm
c02c5f4b60
Rollup merge of #48114 - kennytm:xcode9, r=alexcrichton
Upgrade the Travis CI macOS images for testing from Xcode 8.3 to 9.2.

Retry of #47749, since LLVM 6 has been merged.
2018-02-14 18:25:12 +08:00
kennytm
bd3674e4de
Rollup merge of #48087 - scottmcm:range_is_empty, r=kennytm,alexcrichton
Add Range[Inclusive]::is_empty

During https://github.com/rust-lang/rfcs/pull/1980, it was discussed that figuring out whether a range is empty was subtle, and thus there should be a clear and obvious way to do it.  It can't just be ExactSizeIterator::is_empty (also unstable) because not all ranges are ExactSize -- such as `Range<i64>` and `RangeInclusive<usize>`.

Things to ponder:
- Unless this is stabilized first, this makes stabilizing ExactSizeIterator::is_empty more icky, since this hides that.
- This is only on `Range` and `RangeInclusive`, as those are the only ones where it's interesting.  But one could argue that it should be on more for consistency, or on RangeArgument instead.
- The bound on this is PartialOrd, since that works ok (see tests for float examples) and is consistent with `contains`.  But ranges like `NAN..=NAN`_are_ kinda weird.
- [x] ~~There's not a real issue number on this yet~~
2018-02-14 16:14:33 +08:00
kennytm
3715f1e490
Rollup merge of #48065 - Xaeroxe:patch-1, r=alexcrichton
Apply optimization from #44355 to retain

As discussed in #44355 this PR applies a similar optimization to `Vec::retain`.  For `drain_filter`, a very similar function, this improved performance by up to 20%.
2018-02-14 16:14:32 +08:00
kennytm
a5c3209374
Rollup merge of #48033 - GuillaumeGomez:better-char-cast-message, r=estebank
Show better warning for trying to cast non-u8 scalar to char

Fixes #44201.
2018-02-14 16:14:31 +08:00
kennytm
c88a6fe569
Rollup merge of #48005 - panicbit:env_unimpl_send_sync, r=alexcrichton
Unimplement Send/Sync for ::env::{Args,ArgsOs,Vars,VarsOs}

Fixes #48004
2018-02-14 16:14:30 +08:00
kennytm
2be44ceaa2
Rollup merge of #47846 - roblabla:bugfix-ocaml, r=kennytm
Work around LLVM OCAML binding installation failure

Hello,

I have OCaml installed on my machine, and compiling rust systematically fails when LLVM attempts installing the OCaml bindings in `/usr/lib/ocaml`, which is write-protected. Here are the logs: https://gist.github.com/roblabla/3f147914c5df627c9d97ab311ba133ad

Some digging around the issue reveals:

- The code that finds if OCaml is installed, and sets the bindings to be compiled/installed: b24a45d2e9/cmake/config-ix.cmake (L612)
- b24a45d2e9/bindings/ocaml/llvm/CMakeLists.txt Some code that does the installation.

The problem seems to be that `LLVM_OCAML_INSTALL_PATH` is set to `OCAML_STDLIB_PATH` by default, which is in `/usr/lib/ocaml`, instead of the prefix.

This PR "fixes" the issue by setting `LLVM_OCAML_INSTALL_PATH` to `usr/lib/ocaml`. I haven't found a way to make LLVM not build OCaml, which would probably be a superior fix.
2018-02-14 16:14:29 +08:00
kennytm
c89976e556
Rollup merge of #47806 - PramodBisht:feature/47801, r=steveklabnik
Changed color of struct link from #ff794d to #2dbfb8 for Rust docs

This is in reference to https://github.com/rust-lang/rust/issues/47801

here I have changed the default color of struct link for `#ff794d` to `#2dbfb8`

cc: @nagisa  @timClicks
2018-02-14 16:14:28 +08:00
kennytm
8671f6931f
Rollup merge of #47784 - alexcrichton:less-dsymutil, r=michaelwoerister
rustc: Add the ability to not run dsymutil

This commit adds the ability for rustc to not run `dsymutil` by default
on OSX. A new codegen option, `-Z run-dsymutil=no`, was added to specify
that `dsymutil` should *not* run and instead the compiler should
unconditionally keep the object files around in a compilation if
necessary for debug information.

cc #47240
2018-02-14 16:14:27 +08:00
Jacob Kiesel
fbad3b2468
Switch to retain calling drain_filter. 2018-02-13 08:48:25 -07:00
bors
4d2d3fc5da Auto merge of #47804 - retep007:recursive-requirements, r=pnkfelix
Optimized error reporting for recursive requirements #47720

Fixes #47720
2018-02-13 00:14:11 +00:00
Alex Crichton
0f16eee013 rustc: Add the ability to not run dsymutil
This commit adds the ability for rustc to not run `dsymutil` by default
on OSX. A new codegen option, `-Z run-dsymutil=no`, was added to specify
that `dsymutil` should *not* run and instead the compiler should
unconditionally keep the object files around in a compilation if
necessary for debug information.

cc #47240
2018-02-12 07:44:40 -08:00
bors
16362c737f Auto merge of #47843 - estebank:teach, r=nikomatsakis
Add `-Zteach` documentation

Add extra inline documentation to E0019, E0016, E0013, E0396, E0017,
E0018, E0010, E0022, E0030, E0029, E0033, E0026 and E0027.

Follow up to #47652.
2018-02-12 09:38:40 +00:00
bors
b54f27ba36 Auto merge of #48144 - kennytm:reduce-musl-test-size, r=Mark-Simulacrum
Compiletest: delete the compiled program once its test is done.

Reduces CI disk usage which prevents #48118 from succeeding.
2018-02-12 06:43:24 +00:00
Esteban Küber
f7cabc6550 Continue parsing function after finding ... arg
When encountering a variadic argument in a function definition that
doesn't accept it, if immediately after there's a closing paren,
continue parsing as normal. Otherwise keep current behavior of emitting
error and stopping.
2018-02-11 22:10:35 -08:00
Jason Schein
bd426f1d69 Update ops range example to avoid confusion between indexes and values. 2018-02-11 17:54:44 -08:00
Mark Simulacrum
00bce71144 Delete executables if the test ran successfully.
This isn't a perfect heuristic, but since the amount of run-fail tests
is far lower than run-pass tests for now, it should be sufficient to
ensure that we don't run into CI limits. This makes it possible to run
the test binary manually (e.g., under gdb/lldb) if it failed to attempt
to find out why.
2018-02-11 16:27:33 -07:00
kennytm
66ee33a437
compiletest: Delete the executable immediately after running.
This should save a lot of space on musl test cases (whose standard library
are linked statically).
2018-02-12 03:13:25 +08:00
bors
b8398d947d Auto merge of #47752 - mark-i-m:at-most-once-rep, r=nikomatsakis
Implement `?` macro repetition

See rust-lang/rfcs#2298 (with disposition merge)
2018-02-11 18:11:01 +00:00
bors
0196b20f69 Auto merge of #47614 - dotdash:x86_64_sysv_ffi, r=eddyb
Fix oversized loads on x86_64 SysV FFI calls

The x86_64 SysV ABI should use exact sizes for small structs passed in
registers, i.e. a struct that occupies 3 bytes should use an i24,
instead of the i32 it currently uses.

Refs #45543
2018-02-11 15:10:46 +00:00
Artyom Pavlov
c2a31dee83
Dangling pointer fix 2018-02-11 15:57:07 +03:00
kennytm
bf69b0feed
Upgrade the Travis CI macOS images for testing from Xcode 8.3 to 9.2. 2018-02-11 14:28:28 +08:00
bors
0bb8935136 Auto merge of #47657 - algesten:save-analysis-impls, r=nrc
Emit data::Impl in save-analysis

As discussed on [internals.rust-lang](https://internals.rust-lang.org/t/rustdoc2-rls-analysis-and-the-compiler-help-wanted/6592/5), this PR emits `rls-data::Impl` in the save-analysis.

A number of questions are outstanding:

- [x] A few `???` around row 356. We need to discuss what goes here, if anything.
- [ ] ~~Deriving `id` for impl using hashing. Is this going to clash with rustc defids?~~
- [ ] ~~Deriving `id` for impl using hashing. Is the conversion from 64 bit -> 32 bit problematic?~~
- [x] Need a new rls-data with an `id` field in `Impl` struct.
- [ ] ~~Need a new rls-data which `derive` `Hash` for `ImplKind` enum.~~
2018-02-11 05:29:20 +00:00
bors
7f2baba121 Auto merge of #48092 - eddyb:discriminate-the-void, r=nikomatsakis
rustc_mir: insert a dummy access to places being matched on, when building MIR.

Fixes #47412 by adding a `_dummy = Discriminant(place)` before each `match place {...}`.

r? @nikomatsakis
2018-02-11 02:42:19 +00:00
Scott McMurray
22b0489f80 Add the emptiness condition to the docs; add a PartialOrd example with NAN 2018-02-10 16:32:05 -08:00
Артём Павлов [Artyom Pavlov]
7c6adb475a
fixed errors 2018-02-11 03:27:04 +03:00
Matthias Krüger
161e8ffda7 typo: correct endianess to endianness (this also changes function names!) 2018-02-11 00:56:24 +01:00
bors
d0f1f42816 Auto merge of #47286 - Aaronepower:master, r=Mark-Simulacrum
Update RELEASES.md for 1.24.0

[rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md)
2018-02-10 23:50:18 +00:00
Артём Павлов [Artyom Pavlov]
c97aa09117
iterator instead loop 2018-02-11 02:36:22 +03:00
Артём Павлов [Artyom Pavlov]
8be306840f
added conversion from Rust feature to LLVM feature 2018-02-11 02:27:21 +03:00
Aaron Power
28b39f5d7a Update release notes for 1.24.0 2018-02-10 15:12:39 -07:00
Oliver Middleton
45d5a420ad Correct a few stability attributes 2018-02-10 21:20:42 +00:00
roblabla
3c01dea03e Add comment about the problem, and use provided path if available 2018-02-10 21:29:10 +01:00
bors
45fba43b3d Auto merge of #48113 - kennytm:rollup, r=kennytm
Rollup of 20 pull requests

- Successful merges: #47790, #47835, #47854, #48015, #48047, #48051, #48058, #48059, #48064, #48078, #48080, #48086, #48098, #48101, #48107, #48100, #48085, #48120, #48124, #47547
- Failed merges:
2018-02-10 19:48:20 +00:00
kennytm
4a827188cc
Rollup merge of #47547 - varkor:infinite-iterators-warning-doc, r=frewsxcv
Document the behaviour of infinite iterators on potentially-computable methods

It’s not entirely clear from the current documentation what behaviour
calling a method such as `min` on an infinite iterator like `RangeFrom`
is. One might expect this to terminate, but in fact, for infinite
iterators, `min` is always nonterminating (at least in the standard
library). This adds a quick note about this behaviour for clarification.
2018-02-11 03:39:53 +08:00
Artyom Pavlov
877272ba06
typo fix 2018-02-10 20:07:37 +03:00
kennytm
b37c60276a
Rollup merge of #48124 - alexcrichton:clean-up-debugging, r=kennytm
Explain unusual debugging code in librustc

Introduced in #47828 to help track down some bugs, it landed a bit hastily so
this is intended on cleaning it up a bit.
2018-02-11 00:53:47 +08:00
kennytm
18d7be3381
Rollup merge of #48120 - matthiaskrgr:typos_src_1, r=alexcrichton
fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}}

via codespell
2018-02-11 00:53:05 +08:00
kennytm
c888f72304
Rollup merge of #48085 - alexcrichton:update-dlmalloc, r=Mark-Simulacrum
Update the dlmalloc submodule

A bug was recently fixed in dlmalloc which meant that released memory to the
system accidentally wasn't getting reused, causing programs to be far slower
than they should be!
2018-02-11 00:51:56 +08:00
Artyom Pavlov
14f488ee7d
Whitelist pclmul x86 feature flag
Relevant `stdsimd` [issue](https://github.com/rust-lang-nursery/stdsimd/issues/318).
2018-02-10 19:22:04 +03:00
Alex Crichton
3a967676f8 Explain unusual debugging code in librustc
Introduced in #47828 to help track down some bugs, it landed a bit hastily so
this is intended on cleaning it up a bit.
2018-02-10 07:03:35 -08:00
Alex Crichton
49f7ccd35f Update the dlmalloc submodule
A bug was recently fixed in dlmalloc which meant that released memory to the
system accidentally wasn't getting reused, causing programs to be far slower
than they should be!
2018-02-10 07:01:27 -08:00
Guillaume Gomez
0cccd9aca5 Show better warning for trying to cast non-u8 scalar to char 2018-02-10 15:35:56 +01:00
Matthias Krüger
7ee3e39f64 fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
kennytm
8550ac8015
Rollup merge of #48100 - Mark-Simulacrum:fetch-nand, r=alexcrichton
Add fetch_nand to atomics

I think this is all fine but I have little familiarity with the atomic code (or libcore in general) so I may have accidentally done something wrong here...

cc #13226 (the tracking issue)
2018-02-10 14:26:57 +08:00
kennytm
6605d03549
Rollup merge of #48107 - matthiaskrgr:typo__substract_to_subtract, r=kennytm
fix typo: substract -> subtract
2018-02-10 14:24:10 +08:00