Commit Graph

83817 Commits

Author SHA1 Message Date
kennytm
1681b154ee
Rollup merge of #53967 - froydnj:cmake-python-executable, r=alexcrichton
propagate build.python into cmake

If a suitable value of Python is not on `PATH`, one can still invoke x.py
manually, which propagates `BOOTSTRAP_PYTHON` into the bootstrap
environment.  But building LLVM will abort with error messages about not
being able to find Python, and instructions to set `PYTHON_EXECUTABLE`,
because nothing is done with `BOOTSTRAP_PYTHON` when invoking cmake.
Setting `build.python` in config.toml had no effect in this scenario,
either

To fix this, let's provide `PYTHON_EXECUTABLE` when invoking cmake; for
the "normal" case of Python in `PATH`, this doesn't alter any behavior.
For more unusual cases, however, this ensures cmake finds Python
properly.  (This change also ensures there are no differences between
what bootstrap is using, and what cmake uses, which may be useful for
consistency's sake.)
2018-09-07 18:13:55 +08:00
kennytm
776b90cee2
Rollup merge of #53966 - ljedrz:mir_dataflow_cleanups, r=estebank
A few cleanups and minor improvements to mir/dataflow

- simplify `dot::GraphWalk::edges` and optimize its vector's allocation
- turn a `kill` loop into `kill_all`
- remove the `prepost` parameter from `dataflow_path` (it doesn't seem to do anything)
- a couple of other minor improvements
2018-09-07 18:13:52 +08:00
kennytm
7e9fb78962
Rollup merge of #53959 - tlively:fix-submodules, r=alexcrichton
Add .git extension to submodule paths missing it

Fixes a problem where submodules could not be cloned under some git
configurations. Specifically, when url.git@github.com:.insteadOf =
https://github.com/ is set.
2018-09-07 18:13:50 +08:00
kennytm
d70e055b66
Rollup merge of #53948 - pnkfelix:issue-52934-minimize-clippy-test, r=wesleywiser
Minimized clippy test from when NLL disabled two-phase borrows

(Of course anyone even skimming the test will realize that this is an *expansion* of a previously posted [minimization](https://github.com/rust-lang/rust/issues/52934#issuecomment-418144787).)

Fix #52934.
2018-09-07 18:13:47 +08:00
kennytm
03de1c44d1
Rollup merge of #53946 - tbu-:pr_doc_manuallydrop, r=cramertj
Clarify `ManuallyDrop` docs

Mention that you can use `into_inner` to drop the contained value.
2018-09-07 18:13:42 +08:00
bors
7366752a61 Auto merge of #53830 - davidtwco:issue-53228, r=nikomatsakis
Add help message for missing IndexMut impl with NLL

Fixes #53228.

r? @nikomatsakis
2018-09-07 09:57:27 +00:00
kennytm
d2a0f98159
Rollup merge of #53895 - joshtriplett:tidy-tidy, r=nikomatsakis
tidy: Cleanups and clippy warning fixes

This eliminates various clippy warnings in the tidy tool, as well as
making some related cleanups. These changes should not introduce any
functional differences.
2018-09-07 15:26:51 +08:00
kennytm
3c77043677
Rollup merge of #53874 - withoutboats:pin-ptr-impls, r=RalfJung
Implement Unpin for Box, Rc, and Arc

Per the discussion in #49150, these should implement `Unpin` even if what they point to does not.
2018-09-07 15:26:49 +08:00
kennytm
3792dbd013
Rollup merge of #53860 - pnkfelix:issue-53764-migrate-run-pass-to-ui, r=nikomatsakis
Migrate (some) of run-pass/ to ui

This is a step towards addressing #53764. Much still remains.

I went through a large portion of the `*.rs` files that were directly stored into `src/test/run-pass/` and moved them into various subdirectories of a newly created `src/test/ui/run-pass/`.

(yes, it would have perhaps been nice to meld it more directly with directories already in `src/test/ui/`; but the sad truth is that opens up the reality of filename collisions, and one of my short term goals for resolving #53764 is to keep the *filenames* invariant, even as their parents directories and contents are mildly revised...)
2018-09-07 15:26:42 +08:00
kennytm
1805f3c2fb
Rollup merge of #53550 - brson:recurring, r=estebank
librustc_lint: In recursion warning, change 'recurring' to 'recursing'

The existing wording seems incorrect.

Aside: This warning, 'function cannot return without recursing' is not perfectly clear - it implies that the function _can_ return, it's just got to recurse. But really the fn cannot return period. Clearer wording: 'function recurses infinitely; it cannot return'; or 'function is infinitely self-recursive; it cannot return, and this is probably an error'. I like that.
2018-09-07 15:26:40 +08:00
kennytm
3f2de03daa
Rollup merge of #53455 - llogiq:num-byte-conversion-docs, r=steveklabnik
Individual docs for {from,to}_*_bytes
2018-09-07 15:26:37 +08:00
kennytm
654c5788aa
Rollup merge of #53376 - frewsxcv:frewsxcv-copy, r=GuillaumeGomez
Cross reference io::copy and fs::copy in docs.

Fixes https://github.com/rust-lang/rust/issues/52524.
2018-09-07 15:26:30 +08:00
kennytm
846a0bd1b9
Rollup merge of #53299 - MagnumOpus21:fix-macro-write, r=steveklabnik
Updated core/macros.rs to note it works in a no_std environment.

Fixes #45797
This PR updates the documentation of `write!` to note it works in a `no_std` environment, and adds an
example to showcase this. In a `no_std` environment, the author of the code is responsible for the
implementation of the `Write` trait. This example will work out of the box with `no_std`, but the
implementation of `Write` is expected to be provided by the user.

r? @steveklabnik
2018-09-07 15:26:26 +08:00
Matthias Krüger
10e7b76dfc update clippy submodule
updates to cafef7b576
2018-09-07 09:18:03 +02:00
bors
2ae11a9c22 Auto merge of #54018 - alexcrichton:omg-fix-again, r=Mark-Simulacrum
Ship libLLVM.dylib on OSX

Previously we just weren't shipping this at all as we were only looking for the
Linux version!
2018-09-07 04:18:07 +00:00
Wesley Wiser
b1211e8703 Fix tests 2018-09-06 22:57:05 -04:00
Alex Crichton
bd1fb60133 Ship libLLVM.dylib on OSX
Previously we just weren't shipping this at all as we were only looking for the
Linux version!
2018-09-06 19:06:09 -07:00
bors
9804689b58 Auto merge of #53969 - alexcrichton:update-compiler-builtins, r=nikomatsakis
Update the compiler-builtins submodule

Fixes a mistake in using C shims to...

Closes #53916
2018-09-07 01:52:24 +00:00
Niko Matsakis
5390cf32f7 resolve_lifetime: types are not late-bound regions =) 2018-09-06 19:58:23 -04:00
Niko Matsakis
81f64b7fa3 universal_regions.rs: rustfmt 2018-09-06 19:58:23 -04:00
Niko Matsakis
da12d02b37 useful debug in universal_regions 2018-09-06 19:58:23 -04:00
Niko Matsakis
bf6fe2a51e region_name: rustfmt 2018-09-06 19:58:23 -04:00
Niko Matsakis
2eb76fc8a1 add a useful debug to give_region_a_name 2018-09-06 19:58:22 -04:00
Wesley Wiser
4e706f56bd [nll] teach SCC about 'static
Fixes #53178
2018-09-06 19:58:22 -04:00
Wesley Wiser
db01b6789d [nll] Refactor the Edges iterator to return OutlivesConstraints
Part of #53178
2018-09-06 19:58:22 -04:00
bors
ad7b22ef29 Auto merge of #54005 - eddyb:uniform-paths-self-resolve, r=petrochenkov
rustc_resolve: allow `use crate_name;` under `uniform_paths`.

Specifically, `use crate_name;` and `use crate_name::{self, ...};` are now allowed, whereas previously there would produce a (false positive) ambiguity error, as the ambiguity detection code was seeing the `crate_name` import as a locally-available definition to conflict with the crate.

r? @petrochenkov cc @aturon @joshtriplett @Centril
2018-09-06 23:29:56 +00:00
David Wood
0a8cf67e61
Added note referencing issue which added error. 2018-09-07 00:37:44 +02:00
Mikhail Modin
d0c1e5a99e rustfmt src/librustc_mir/build/expr 2018-09-06 22:34:56 +01:00
Guillaume Gomez
d5409141d6 Fix link 2018-09-06 23:32:30 +02:00
Guillaume Gomez
c1b1d6804b Don't show default docs 2018-09-06 23:32:30 +02:00
Guillaume Gomez
c1ad1b0338 Fix invalid urls 2018-09-06 23:32:30 +02:00
Guillaume Gomez
1b3382f2b9 Fix implementors generation as well 2018-09-06 23:32:30 +02:00
Guillaume Gomez
d65c8636d9 Fix hover on impls 2018-09-06 23:32:30 +02:00
Jakub Kozlowski
4b7f2eb947 Fixup whitespace 2018-09-06 22:18:39 +01:00
bors
a8c11d216b Auto merge of #53575 - matthewjasper:unsized-is-an-error, r=estebank
Don't reduce E0161 to a warning in NLL migrate mode

This error has been on stable for a while, and allowing such code cause the compile to later ICE (since we can't codegen it). Errors `box UNSIZED EXPR` with unsized locals because it's not compatible with the current evaluation order (create the box before evaluating the expressions).

cc #53469 (fixes the ICE in this case)
cc @qnighy
2018-09-06 21:02:35 +00:00
Jorge Aparicio
6c4f3f512e update UI test 2018-09-06 23:01:35 +02:00
Mikhail Modin
527a29a5c6 Skip a shared borrow of a immutable local variables
issue #53643
2018-09-06 21:46:52 +01:00
Without Boats
972cd8bb69
Fix typos. 2018-09-06 21:31:06 +02:00
Jorge Aparicio
9b764c3190 crates that provide a panic_handler are exempt from unused_extern_crates
fixes the *first* false positive reported in #53964
2018-09-06 21:24:33 +02:00
Eduard-Mihai Burtescu
31fce914b2 rustc_resolve: allow use crate_name; under uniform_paths. 2018-09-06 22:07:56 +03:00
Jakub Kozlowski
4088a385a7 Allow named lifetimes in async functions.
- Fixes #53174
2018-09-06 19:02:51 +01:00
Eduard-Mihai Burtescu
b9e7574bf2 rustc_codegen_llvm: don't assume offsets are always aligned. 2018-09-06 20:56:20 +03:00
ms2300
f4d4faaeed Fixing tests from anon -> opaque 2018-09-06 11:43:31 -06:00
bors
c318691407 Auto merge of #52626 - brunocodutra:issue-52475, r=oli-obk
Fix issue #52475: Make loop detector only consider reachable memory

As [suggested](https://github.com/rust-lang/rust/pull/51702#discussion_r197585664) by @oli-obk `alloc_id`s should be ignored by traversing all `Allocation`s in interpreter memory at a given moment in time, beginning by `ByRef` locals in the stack.

- [x] Generalize the implementation of `Hash` for `EvalSnapshot` to traverse `Allocation`s
- [x] Generalize the implementation of `PartialEq` for `EvalSnapshot` to traverse `Allocation`s
- [x] Commit regression tests

Fixes #52626
Fixes https://github.com/rust-lang/rust/issues/52849
2018-09-06 17:35:40 +00:00
Tim
43eb9259ec Use binary_op_val instead of doing the check manually. 2018-09-06 15:11:56 +02:00
Felix S. Klock II
4973094feb Allow illegal_floating_point_literal_pattern. These will need to be updated at some point.
Discussion can be found on rust-lang/rust#41620.
2018-09-06 14:55:24 +02:00
Felix S. Klock II
8e72955526 Allow unions_with_drop_fields for unions with members with destructors
(or generics that *might* have dtors)
2018-09-06 14:55:24 +02:00
Felix S. Klock II
84a02e17da Allow various name convention lints. 2018-09-06 14:55:21 +02:00
Felix S. Klock II
f3b766d7ad Add // run-pass to collection of tests. 2018-09-06 14:41:12 +02:00
Felix S. Klock II
76ceeddb2b Migrated remaining src/test/run-pass/ subdirectories to src/test/ui/run-pass/. 2018-09-06 14:36:26 +02:00