Commit Graph

68542 Commits

Author SHA1 Message Date
Felix S. Klock II
a995b56a5e Move E0508 diagnostic into mod borrowck_errors shared between ast- and mir-borrowck. 2017-10-04 12:47:46 +02:00
Felix S. Klock II
a12cefb497 Move E0507 diagnostic into mod borrowck_errors shared between ast- and mir-borrowck.
(Had to modify signature of `report_cannot_move_out_of` slightly to
satisfy requirements of newly added `fn cannot_move_out_of` method.)
2017-10-04 12:47:40 +02:00
Michael Woerister
0454a41bec incr.comp.: Address review comments. 2017-10-04 12:35:56 +02:00
Mikhail Modin
c68b10f5ee add notes to report_conflicting_borrow MIR borrowck 2017-10-04 10:35:42 +03:00
bors
eabef0608b Auto merge of #44905 - Pirh:process_abort_docs, r=steveklabnik
Update docs for process::abort

Remove a typo and explain the relationship to `panic!`.

Part of #29370

r? @steveklabnik
2017-10-04 05:43:00 +00:00
bors
f1938cf13b Auto merge of #44999 - pnkfelix:mir-borrowck-fix-assert-left-right, r=nikomatsakis
Overlapping borrows can point to different lvalues.

Overlapping borrows can point to different lvalues.

There's always a basis for the overlap, so instead of removing the assert entirely, I instead pass in the prefix that we found and check that it actually is a prefix of both lvalues.

Fix #44829
2017-10-04 03:28:24 +00:00
bors
2db48d7fcb Auto merge of #44979 - hinaria:master, r=dtolnay
make `backtrace = false` compile for windows targets.

when building for windows with `backtrace = false`, `libstd` fails to compile because some modules that use items from `sys_common::backtrace::*` are still included, even though those modules aren't used or referenced by anything.

`sys_common::backtrace` doesn't exist when the backtrace feature is turned off.

--

i've also added `#[cfg(feature = "backtrace")]` to various items that exist exclusively to support `mod backtrace` since the compilation would fail since they would be unused in a configuration with backtraces turned off.
2017-10-04 00:57:30 +00:00
Alexis Beingessner
36471293e6 Add -Zmutable-noalias flag 2017-10-03 19:49:45 -04:00
bors
bd90aa6daa Auto merge of #44895 - stephaneyfx:master, r=dtolnay
Made `fs::copy` return the length of the main stream

On Windows with the NTFS filesystem, `fs::copy` would return the sum of the
lengths of all streams, which can be different from the length reported by
`metadata` and thus confusing for users unaware of this NTFS peculiarity.

This makes `fs::copy` return the same length `metadata` reports which is the
value it used to return before PR #26751. Note that alternate streams are still
copied; their length is just not included in the returned value.

This change relies on the assumption that the stream with index 1 is always the
main stream in the `CopyFileEx` callback. I could not find any official
document confirming this but empirical testing has shown this to be true,
regardless of whether the alternate stream is created before or after the main
stream.

Resolves #44532
2017-10-03 22:19:40 +00:00
bors
4502e2aa9c Auto merge of #44949 - QuietMisdreavus:rustdoctest-dirs, r=nikomatsakis
let htmldocck.py check for directories

Since i messed this up during https://github.com/rust-lang/rust/pull/44613, i wanted to codify this into the rustdoc tests to make sure that doesn't happen again.
2017-10-03 19:38:33 +00:00
Matt
3264c836bb Optimize comparison functions of Iterator
Replaced matching on tuples which led to less performant code generation.
2017-10-04 01:04:15 +08:00
Garrett Berg
c5c3614c18 related to #44924: update incr compilation for struct_defs.rs 2017-10-03 11:03:57 -06:00
Maik Klein
b3d85fc2dd Typo in librustc/README.md 2017-10-03 18:57:52 +02:00
bors
835e3e5078 Auto merge of #44922 - zilbuz:issue-44596/E0594, r=pnkfelix
MIR borrowck: move span_label to `borrowck_errors.rs`

The calls to `span_label` are moved and factorized for:
* E0503 (`cannot_use_when_mutably_borrowed()`)
* E0506 (`cannot_assign_to_borrowed()`)

Additionnally, the error E0594 (`cannot_assign_static()`) has been factorized between `check_loan.rs` and `borrowc_check.rs`.

Part of #44596
2017-10-03 16:42:26 +00:00
bgermann
80fe86f8c7 Add build environment for Solaris
This can be used to build rust-std.

The dilos illumos distribution was chosen, because illumos is free software
as opposed to Oracle Solaris and dilos is the only illumos distribution that
supports x86_64 and sparcv9 at the same level.
2017-10-03 14:48:39 +02:00
bors
8891044e89 Auto merge of #44896 - qmx:move-resolve-to-librustc, r=arielb1
Move monomorphize::resolve() to librustc

this moves `monomorphize::resolve(..)` to librustc, and re-enables inlining for some trait methods, fixing #44389

@nikomatsakis I've kept the calls to the new `ty::Instance::resolve(....)` always `.unwrap()`-ing for the moment, how/do you want to add more debugging info via `.unwrap_or()` or something like this?

we still have some related `resolve_*` functions on monomorphize, but I wasn't sure moving them was into the scope for this PR too.

@eddyb mind to take a look too?
2017-10-03 12:18:13 +00:00
Felix S. Klock II
aac64c4756 Overlapping borrows can point to different lvalues.
There's always a basis for the overlap, so instead of removing the
assert entirely, I instead pass in the prefix that we found and check
that it actually is a prefix of both lvalues.

Fix #44829
2017-10-03 14:02:25 +02:00
Michael Woerister
c96d0bff94 incr.comp.: Fix some merge fallout. 2017-10-03 13:50:55 +02:00
Philip Craig
9bbd7a3b3f Add fixme regarding remapping paths for doctests 2017-10-03 20:36:53 +10:00
Suriyaa ✌️️
2d108ec00b Use HTTPS protocol for chat.mibbit.com 2017-10-03 12:36:16 +02:00
Philip Craig
3a225c77bb Rename FileMap::path and change to an Option 2017-10-03 19:47:33 +10:00
bors
61bad301f1 Auto merge of #44920 - vi:rustdoc_implementors_src_link, r=GuillaumeGomez
rustdoc: Render [src] links for trait implementors

Should close #43893.

<s>No tests [yet].</s>

r? @QuietMisdreavus
2017-10-03 08:04:33 +00:00
bors
67ed4891db Auto merge of #44966 - zackmdavis:no_mangle_no_snake, r=aturon
make non_snake_case lint allow extern no-mangle functions

Resolves #31924.

r? @sfackler
2017-10-03 02:26:27 +00:00
leonardo.yvens
bb74c20a5d Inline eq_slice into str::eq
It's the only use of the function.
2017-10-02 22:04:23 -03:00
bors
bdcb7fbbca Auto merge of #44977 - steveklabnik:update-mdbook, r=alexcrichton
update mdbook

Fixes #44704
2017-10-02 22:39:51 +00:00
Felix S. Klock II
17f6b6810b Remove assertion that the argument to every EndRegion correspond to
some dataflow-tracked borrow-data entry.

Fix #44828

(The comment thread on the aforementioned issue discusses why its best
to just remove this assertion.)
2017-10-02 22:40:51 +02:00
Pirh
28ef0d1085 Document that process::abort will not call the panic hook 2017-10-02 19:59:50 +01:00
bors
185cc5f26d Auto merge of #44885 - lu-zero:master, r=alexcrichton
More Altivec Intrinsics

Float-specific intrinsics
2017-10-02 17:18:20 +00:00
steveklabnik
851b6d4762 update books for next release
Also fixes some stdlib links to the reference which have changed.
2017-10-02 12:07:28 -04:00
hinaria
a5296a5fb2 windows: make backtrace = false compile 2017-10-03 02:48:17 +11:00
James Munns
1e26094bdd Allow atomic operations up to 32 bits
The ARMv5te platform does not have instruction-level support for atomics, however the kernel provides [user space helpers](https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt) which can be used to perform atomic operations. When linked with `libc`, the atomic symbols needed by Rust will be provided, rather than CPU level intrinsics.

As this target is specifically `linux` and `gnueabi`, it is reasonable to assume the Linux Kernel and libc will be available for the target. There is a large performance penalty, as we are not using CPU level intrinsics, however this penalty is likely preferable to not having the target at all.

I have used this change in a custom target (along with `xargo`) to build `std`, as well as a number of higher level crates.
2017-10-02 16:53:43 +02:00
steveklabnik
1bbf41da6f update mdbook
Fixes #44704
2017-10-02 10:16:32 -04:00
Michael Woerister
dbab705f04 incr.comp.: Do some cleanup. 2017-10-02 16:09:23 +02:00
Michael Woerister
df06a7e532 incr.comp.: Remove legacy dep-graph runtime. 2017-10-02 16:09:19 +02:00
Vitaly _Vi Shukela
acef039de8
rustdoc: Remove cruft from the test
per @GuillaumeGomez's sample, but with one change.
2017-10-02 16:54:35 +03:00
Michael Woerister
171c020857 incr.comp.: Remove saving and loading of legacy dep-graph. 2017-10-02 15:47:11 +02:00
Michael Woerister
272c324b25 incr.comp.: Build DepGraphQuery from new dep-graph impl. 2017-10-02 15:45:46 +02:00
Michael Woerister
e6badfd449 incr.comp.: Use red/green tracking for CGU re-use. 2017-10-02 15:45:46 +02:00
Michael Woerister
c9a17ef174 incr.comp.: Add some logging to DepGraph::try_mark_green(). 2017-10-02 15:38:57 +02:00
Michael Woerister
e1994bd27b incr.comp.: Make some DepNodes non-anonymous. 2017-10-02 15:38:57 +02:00
Michael Woerister
f0bbf4e1f2 incr.comp.: Re-execute queries during red/green marking in order to find out their color. 2017-10-02 15:38:57 +02:00
Michael Woerister
6db27d9f90 incr.comp.: Add minimal version of try_mark_green procedure. 2017-10-02 15:36:47 +02:00
Michael Woerister
a948be81cd incr.comp.: Determine red/green state of every new node. 2017-10-02 15:36:47 +02:00
Alex Burka
fc5e8dc1b5 fix comment on DefaultImpl 2017-10-02 07:30:09 -04:00
bors
0f0f5db465 Auto merge of #44959 - arielb1:generic-errors, r=eddyb
handle nested generics in Generics::type_param/region_param

Fixes #44952.

r? @eddyb
2017-10-02 10:06:32 +00:00
Alex Burka
5517a1ce79 fix ItemKind::DefaultImpl doc comment
Upgrade comment to doc comment.
2017-10-02 05:59:56 -04:00
Ariel Ben-Yehuda
706e52e2cc fix handling of Self 2017-10-02 10:43:36 +02:00
bors
9ae6ed78ac Auto merge of #44942 - zackmdavis:lint_suggestions, r=estebank
code suggestions for unused-mut, while-true, deprecated-attribute, and unused-parens lints

![lint_suggestions](https://user-images.githubusercontent.com/1076988/31044068-b2074de8-a57c-11e7-9319-6668508b6d1f.png)

r? @estebank
2017-10-02 07:03:26 +00:00
Zack M. Davis
8a14022c5d correct unused-parens lint suggestion to strip exact pair 2017-10-01 20:15:24 -07:00
QuietMisdreavus
23f5fbee45 document trait impls when the type appears in the trait's generics 2017-10-01 21:25:48 -05:00