Commit Graph

68613 Commits

Author SHA1 Message Date
Garrett Berg
ad9b1ed9c2 groundwork for #45009: rustc_dirty/clean enhancements 2017-10-04 07:20:59 -06:00
Malo Jaffré
7428806bf9 Fix some E-needstest issues.
Also ignore `attr-on-trait` test on stage-1 to keep `./x.py test --stage 1` successful.

Fixes #30355.
Fixes #33241.
Fixes #36400.
Fixes #37887.
Fixes #44578.
2017-10-04 15:12:01 +02:00
Niv Kaminer
51542a9192 seperate and move miscellaneous benchmarks to librustc 2017-10-04 12:21:15 +00:00
Guillaume Gomez
e1df72fdab Add missing urls for Mutex 2017-10-04 14:03:23 +02:00
Aidan Hobson Sayers
4a6ede78ee Don't unwrap work item results as the panic trace is useless
Fixes #43402 now there's no multithreaded panic printouts

Also update a comment
2017-10-04 12:46:43 +01:00
Felix S. Klock II
86ca5cf942 Unit tests for gathering and reporting move-errors from mir-borrowck.
This commit tests *just* the subset of the tests that were previously
ICE'ing and where now AST- and MIR-borrowck both match in terms of the
errors they report.

In other words: there remain *other* tests that previously ICE'd, and
now no longer ICE, but their remains a divergence between the errors
reported by AST-borrowck and by MIR-borrowck.
2017-10-04 13:29:55 +02:00
bors
fd8099f0ec Auto merge of #44882 - mikhail-m1:master, r=pnkfelix
add notes to report_conflicting_borrow MIR borrowck

part of #44596
2017-10-04 11:26:12 +00:00
Felix S. Klock II
5a16ef4936 Made move_paths::MoveError take span param in cannot_move_out_of ctor.
Implicitly threaded `Location` through MoveData construction via a
`Gatherer` struct (so that we could look up the span corresponding to
the location when we need to signal an error).
2017-10-04 12:48:36 +02:00
Felix S. Klock II
117586e6e9 Add method to Mir that maps a Location to its SourceInfo. 2017-10-04 12:48:28 +02:00
Felix S. Klock II
43fb82d2fa mir-borrowck: Gather move errors during MoveData construction and report them.
Currently is using DUMMY_SP as the associated span; a follow-up commit
will pass in appropriate spans when constructing the errors.
2017-10-04 12:48:20 +02:00
Felix S. Klock II
fdd7d13c24 Move E0509 diagnostic into mod borrowck_errors shared between ast- and mir-borrowck. 2017-10-04 12:47:53 +02:00
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
Federico Mena Quintero
d989cd02b5 Fix broken links in documentation 2017-10-02 15:46:10 -05: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
Federico Mena Quintero
50505aadbd Clarify the ffi module's toplevel docs, per @clarcharr's comments 2017-10-02 14:16:37 -05:00
Pirh
28ef0d1085 Document that process::abort will not call the panic hook 2017-10-02 19:59:50 +01:00
Federico Mena Quintero
9854e836a3 Remove the implication that CString contains UTF-8 data. 2017-10-02 13:53:50 -05: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