Commit Graph

91908 Commits

Author SHA1 Message Date
bors
314a79cd80 Auto merge of #59672 - o01eg:fix-59661, r=oli-obk
Revert rust-lld place changes

Fixes #59661.

Instead of https://github.com/rust-lang/rust/pull/59668 it reverts only failed part.
2019-04-03 23:42:23 +00:00
Josh Stone
c2e0d7f1eb Never return uninhabited values at all
Functions with uninhabited return values are already marked `noreturn`,
but we were still generating return instructions for this. When running
with `-C passes=lint`, LLVM prints:

    Unusual: Return statement in function with noreturn attribute

The LLVM manual makes a stronger statement about `noreturn` though:

> This produces undefined behavior at runtime if the function ever does
dynamically return.

We now emit an `abort` anywhere that would have tried to return an
uninhabited value.
2019-04-03 15:44:49 -07:00
Mazdak Farrokhzad
fba110c805 reduce repetition in librustc(_lint) wrt. impl LintPass 2019-04-03 23:37:31 +02:00
David Tolnay
5c1cd6cc73
Update cargo 2019-04-03 14:10:58 -07:00
Guillaume Gomez
c966c45897 Add test from #59033 2019-04-03 22:18:41 +02:00
Guillaume Gomez
f6eb09bf63 Fix explicit_predicates_of 2019-04-03 22:13:12 +02:00
Philipp Hansch
da99f46711
rustfix coverage: Skip UI tests with non-json error-format
When using the `rustfix-coverage` flag, some tests currently fail
because they define a different error-format than `json`.

The current implementation crashes when encountering those tests. Since
we don't care about non-json test output when collecting the coverage
data, we handle those tests by returning an empty `Vec` instead.
2019-04-03 21:37:45 +02:00
Petr Hosek
86d1678403 Support using LLVM's libunwind as the unwinder implementation
This avoids the dependency on host libraries such as libgcc_s which
may be undesirable in some deployment environments where these aren't
available.
2019-04-03 11:21:40 -07:00
flip1995
c81ce069b4
Compare Tys directly instead of their TyKinds 2019-04-03 19:18:07 +02:00
flip1995
076abfa0f3
Deny internal lints on two more crates
- libfmt_macros
- librustdoc
2019-04-03 19:18:07 +02:00
flip1995
51a792d01b
Add trait_object_dummy_self to CommonTypes 2019-04-03 19:18:07 +02:00
flip1995
dd7483c750
Remove TyKind arg from report_bin_hex_error function 2019-04-03 19:18:07 +02:00
flip1995
4d2a3bb13b
Deny internal lints on librustc_typeck 2019-04-03 19:18:07 +02:00
flip1995
e4b87f5edb
Deny internal lints on librustc_mir 2019-04-03 19:18:07 +02:00
flip1995
d2bc99135f
Deny internal lints on librustc_lint 2019-04-03 18:24:22 +02:00
flip1995
818d300451
Deny internal lints on librustc_interface 2019-04-03 18:24:21 +02:00
flip1995
d3f0cb9b62
Deny internal lints on non conflicting crates
- libarena
- librustc_allocator
- librustc_borrowck
- librustc_codegen_ssa
- librustc_codegen_utils
- librustc_driver
- librustc_errors
- librustc_incremental
- librustc_metadata
- librustc_passes
- librustc_privacy
- librustc_resolve
- librustc_save_analysis
- librustc_target
- librustc_traits
- libsyntax
- libsyntax_ext
- libsyntax_pos
2019-04-03 18:24:21 +02:00
flip1995
69f74df429
Deny internal lints in librustc 2019-04-03 18:24:21 +02:00
flip1995
dfcd1ef102
Add unstable-options flag to stage!=0 2019-04-03 18:22:19 +02:00
flip1995
2045dfed24
Update tests 2019-04-03 18:22:19 +02:00
flip1995
28a5c414c3
Check for unstable-options flag before register internals 2019-04-03 18:22:19 +02:00
flip1995
e536037af3
Deduplicate code in TyKind lint 2019-04-03 18:22:19 +02:00
flip1995
5a788f0ff7
Fix bug in TyKind lint 2019-04-03 18:22:19 +02:00
flip1995
9b2bf70851
Make internal lints allow-by-default 2019-04-03 18:22:19 +02:00
flip1995
16acf7d618
use check_path instead of check_expr 2019-04-03 18:22:19 +02:00
flip1995
157e7974af
Fix rebase fallout 2019-04-03 18:22:18 +02:00
flip1995
a2a8c44106
Add register_internals function to rustc_lint 2019-04-03 18:22:18 +02:00
flip1995
4c9fb9361a
Uplift match_def_path from Clippy 2019-04-03 18:22:18 +02:00
flip1995
5c0656789d
Add internal lints default_hash_types and usage_of_ty_tykind 2019-04-03 18:22:18 +02:00
flip1995
c796b1f46a
Add tests for internal lints 2019-04-03 18:22:18 +02:00
O01eg
5b292ecdb1
Revert rust-lld place changes. 2019-04-03 18:55:37 +03:00
Aleksey Kladov
1763aea7ba make StringReader methods private 2019-04-03 18:33:54 +03:00
Aleksey Kladov
555309d933 make StringReader fields private 2019-04-03 18:20:50 +03:00
Alex Crichton
61b487ca8b wasi: Fill out std::fs module for WASI
This commit fills out the `std::fs` module and implementation for WASI.
Not all APIs are implemented, such as permissions-related ones and
`canonicalize`, but all others APIs have been implemented and very
lightly tested so far. We'll eventually want to run a more exhaustive
test suite!

For now the highlights of this commit are:

* The `std::fs::File` type is now backed by `WasiFd`, a raw WASI file
  descriptor.
* All APIs in `std::fs` (except permissions/canonicalize) have
  implementations for the WASI target.
* A suite of unstable extension traits were added to
  `std::os::wasi::fs`. These traits expose the raw filesystem
  functionality of WASI, namely `*at` syscalls (opening a file relative
  to an already opened one, for example). Additionally metadata only
  available on wasi is exposed through these traits.

Perhaps one of the most notable parts is the implementation of
path-taking APIs. WASI actually has no fundamental API that just takes a
path, but rather everything is relative to a previously opened file
descriptor. To allow existing APIs to work (that only take a path) WASI
has a few syscalls to learn about "pre opened" file descriptors by the
runtime. We use these to build a map of existing directory names to file
descriptors, and then when using a path we try to anchor it at an
already-opened file.

This support is very rudimentary though and is intended to be shared
with C since it's likely to be so tricky. For now though the C library
doesn't expose quite an API for us to use, so we implement it for now
and will swap it out as soon as one is available.
2019-04-03 08:05:46 -07:00
bors
f8673e0ad8 Auto merge of #59182 - hug-dev:armv8m-base-hf, r=alexcrichton
Add dist builder for Armv8-M Baseline and HF

This commit adds the Armv8-M Baseline and Armv8-M Mainline with
FPU targets in the list of targets that
get their dist components built. It also update the build-manifest
so that this target gets also its dist components uploaded.

Made possible with the recent change merged in `compiler-builtins`:
rust-lang-nursery/compiler-builtins#276

A new `compiler-builtins` might be necessary for successfull compilation of the artefacts of those targets.
2019-04-03 14:23:13 +00:00
Hugues de Valon
e83349975b Add dist builder for Armv8-M Baseline and HF
This commit adds the Armv8-M Baseline and Armv8-M Mainline with
FPU targets in the list of targets that
get their dist components built. It also update the build-manifest
so that this target gets also its dist components uploaded.
2019-04-03 15:02:13 +01:00
Christian
7e37b46d20 Updated the environment description in rustc. 2019-04-03 15:50:20 +02:00
Christian
becee90cfd Updated the reference in core::hint::spin_loop to the correct relative path. 2019-04-03 15:47:38 +02:00
Ralf Jung
c75a5a214b update miri 2019-04-03 14:05:45 +01:00
Ralf Jung
087999ef58 try to fix rand feature flags 2019-04-03 14:02:57 +01:00
Ralf Jung
5e3b1fceb0 update miri 2019-04-03 14:02:25 +01:00
bors
0ba7d41b83 Auto merge of #58458 - nnethercote:tweak-Span-encoding, r=petrochenkov
Tweak `Span` encoding.

Failing to fit `base` is more common than failing to fit `len`.
2019-04-03 11:27:38 +00:00
Stein Somers
5b8bfe0471 improve worst-case performance of HashSet.is_subset 2019-04-03 13:01:01 +02:00
Christian
ab3b657373 Updated the documentation of core::hints::spin_loop and core::sync::spin_loop_hint 2019-04-03 10:54:07 +02:00
Aleksey Kladov
1cfed0d452 be more direct about borrow requirenments 2019-04-03 11:41:24 +03:00
bors
546cb21f58 Auto merge of #59657 - Centril:rollup-w5p98mc, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #55448 (Add 'partition_at_index/_by/_by_key' for slices.)
 - #59186 (improve worst-case performance of BTreeSet intersection v3)
 - #59514 (Remove adt_def from projections and downcasts in MIR)
 - #59630 (Shrink `mir::Statement`.)

Failed merges:

r? @ghost
2019-04-03 05:30:20 +00:00
Mazdak Farrokhzad
d31d80b7d4
Rollup merge of #59630 - nnethercote:shrink-mir-Statement, r=pnkfelix
Shrink `mir::Statement`.

The `InlineAsm` variant is extremely rare, and `mir::Statement` often
contributes significantly to peak memory usage.
2019-04-03 04:36:14 +02:00
Mazdak Farrokhzad
a96e3883c1
Rollup merge of #59514 - tmandry:remove-adt-def-from-projection-elem, r=eddyb
Remove adt_def from projections and downcasts in MIR

As part of optimizing generator layouts in MIR, we'd like to allow downcasting generators to variants which do not have a corresponding `def_id`, since they are created by the compiler.

This refactor hopes to allow that, without regressing perf.

r? @eddyb
2019-04-03 04:36:12 +02:00
Mazdak Farrokhzad
9898182b47
Rollup merge of #59186 - ssomers:btreeset_intersection_revisited_again, r=KodrAus
improve worst-case performance of BTreeSet intersection v3

Variation of [#59078](https://github.com/rust-lang/rust/pull/59078) with `Intersection` remaining a struct

r? @scottmcm
2019-04-03 04:36:11 +02:00
Mazdak Farrokhzad
2f37c5a358
Rollup merge of #55448 - Mokosha:SortAtIndex, r=bluss
Add 'partition_at_index/_by/_by_key' for slices.

This is an analog to C++'s std::nth_element (a.k.a. quickselect).

Corresponds to tracking bug #55300.
2019-04-03 04:36:09 +02:00