Commit Graph

89359 Commits

Author SHA1 Message Date
Aaron Hill
45486cce2c
Tidy fixes 2019-02-01 09:43:57 -05:00
Aaron Hill
fe15f7177f
Move --extern-public behind -Z unstable-options 2019-02-01 09:43:57 -05:00
Aaron Hill
173f5cf116
Remove feature gate 2019-02-01 09:43:56 -05:00
Aaron Hill
3fa36471e8
Rename external_private_dependency to exported_private_dependencies 2019-02-01 09:43:56 -05:00
Aaron Hill
dfd2669667
Delete dead code 2019-02-01 09:43:56 -05:00
Aaron Hill
d8fc630052
Track extern_public command-line argument 2019-02-01 09:43:56 -05:00
Aaron Hill
bc2221f7b6
Add test for 'std' crate being public 2019-02-01 09:43:56 -05:00
Aaron Hill
d60214cdf7
Clippy fixes, rename stuff to match RFC 2019-02-01 09:43:56 -05:00
Aaron Hill
12f9b796ff
Improve UI tests 2019-02-01 09:43:56 -05:00
Aaron Hill
08c901f015
Always treat 'std' and 'core' as public 2019-02-01 09:43:56 -05:00
Aaron Hill
93d872dbc8
Add UI test 2019-02-01 09:43:56 -05:00
Aaron Hill
23014b4036
Properly register lint 2019-02-01 09:43:55 -05:00
Aaron Hill
afb1921c79
Fixup code 2019-02-01 09:43:55 -05:00
Aaron Hill
09ff0bacef
Fix emitting lint 2019-02-01 09:43:55 -05:00
Aaron Hill
8b6f3ddf23
Initial implementation work 2019-02-01 09:43:55 -05:00
bors
c9a8687951 Auto merge of #57916 - Zoxc:incr-passes4, r=michaelwoerister
Misc performance tweaks

r? @michaelwoerister
2019-02-01 12:52:54 +00:00
king6cong
3dbf7d4a0e Fix typo 2019-02-01 18:44:26 +08:00
Simon Sapin
cc1e05f0ca Stabilize std::error::Error::type_id
This should have been part of https://github.com/rust-lang/rust/pull/57834

FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749
2019-02-01 11:29:02 +01:00
Guillaume Gomez
5cf20ca3c5 Fix image link in the settings menu 2019-02-01 11:27:59 +01:00
Simon Sapin
6a01f8aecd Stabilize split_ascii_whitespace
Tracking issue FCP to merge: https://github.com/rust-lang/rust/issues/48656#issuecomment-442372750
2019-02-01 11:24:12 +01:00
Jethro Beekman
a90b23fd30 Fix std::os::fortanix_sgx::usercalls::raw::UsercallNrs
Fixes https://github.com/fortanix/rust-sgx/issues/88
2019-02-01 13:58:49 +05:30
bors
1aa250635e Auto merge of #58040 - vors:fix-E0283-explanation, r=cramertj
Fix grammar in E0283 explanation

Author probably meant not "Maybe anything else?", but "Maybe something else?"
2019-02-01 06:34:45 +00:00
Sergei Vorobev
e8d028140e Fix grammar in E0283 explanation 2019-01-31 22:26:19 -08:00
bors
741a3d42cb Auto merge of #58002 - oli-obk:deprecated_sugg, r=zackmdavis
Add suggestions to deprecation lints

Clippy used to do this suggestion, but the clippy lints happen after the deprecation lints so we ended up never seeing the structured suggestions.
2019-02-01 01:06:15 +00:00
Niklas Fiekas
20b55b7e2c Clarify semantics of #[repr(align(x))] on enums 2019-01-31 21:24:23 +01:00
Andy Russell
ea2b1b035b
rustdoc: wrap stability tags in colored spans 2019-01-31 15:15:59 -05:00
bors
f29b4fbd74 Auto merge of #56696 - jonas-schievink:weak-counts, r=alexcrichton
Implement Weak::{strong_count, weak_count}

The counters are also useful on `Weak`, not just on strong references (`Rc` or `Arc`).

In situations where there are still strong references around, you can also get these counts by temporarily upgrading and adjusting the values accordingly. Using the methods introduced here is simpler to do, less error-prone (since you can't forget to adjust the counts), can also be used when no strong references are around anymore, and might be more efficient due to not having to temporarily create an `Rc`.

This is mainly useful in assertions or tests of complex data structures. Data structures might have internal invariants that make them the sole owner of a `Weak` pointer, and an assertion on the weak count could be used to ensure that this indeed happens as expected. Due to the presence of `Weak::upgrade`, the `strong_count` becomes less useful, but it still seems worthwhile to mirror the API of `Rc`.

TODO:
* [X] Tracking issue - https://github.com/rust-lang/rust/issues/57977

Closes https://github.com/rust-lang/rust/issues/50158
2019-01-31 19:20:14 +00:00
John Kåre Alsaker
ee229f7fd0 Use ensure for mir_borrowck 2019-01-31 17:47:33 +01:00
bors
63505b84a6 Auto merge of #57914 - jethrogb:jb/sgx-unwind-version, r=alexcrichton
SGX target: clean up dist builder, update libunwind

This incorporates https://github.com/fortanix/llvm-project/pull/4

Fixes https://github.com/fortanix/rust-sgx/issues/65

r? @alexcrichton
2019-01-31 16:21:39 +00:00
bors
8a0e5faec7 Auto merge of #58003 - nikic:saturating-add, r=nagisa
Use LLVM intrinsics for saturating add/sub

Use the `[su](add|sub).sat` LLVM intrinsics, if we're compiling against LLVM 8, as they should optimize and codegen better than IR based on `[su](add|sub).with.overlow`.

For the fallback for LLVM < 8 I'm using the same expansion that target lowering in LLVM uses, which is not the same as Rust currently uses (in particular due to the use of selects rather than branches).

Fixes #55286.
Fixes #52203.
Fixes #44500.

r? @nagisa
2019-01-31 13:40:11 +00:00
Niklas Fiekas
73bf0703a7 Add more tests for #[repr(align(x))] on enums 2019-01-31 14:18:51 +01:00
Oliver Scherer
d0129a613c Add a forever unstable opt-out of const qualification checks 2019-01-31 14:03:01 +01:00
Vardhan Thigle
b025557e97 Updated commit id for building libunwind. 2019-01-31 17:42:08 +05:30
bors
d30b99f9c2 Auto merge of #57514 - michaelwoerister:xlto-tests, r=alexcrichton
compiletest: Support opt-in Clang-based run-make tests and use them for testing xLTO.

Some cross-language run-make tests need a Clang compiler that matches the LLVM version of `rustc`. Since such a compiler usually isn't available these tests (marked with the `needs-matching-clang`
directive) are ignored by default.

For some CI jobs we do need these tests to run unconditionally though. In order to support this a `--force-clang-based-tests` flag is added to compiletest. If this flag is specified, `compiletest` will fail if it can't detect an appropriate version of Clang.

@rust-lang/infra The PR doesn't yet enable the tests yet. Do you have any recommendation for which jobs to enable them?

cc #57438

r? @alexcrichton
2019-01-31 11:07:41 +00:00
David Wood
1595163356
Add suggestion for duplicated import.
This commit adds a suggestion when a import is duplicated (ie. the same name
is used twice trying to import the same thing) to remove the second
import.
2019-01-31 12:01:28 +01:00
bors
f40aaa6827 Auto merge of #58016 - Centril:rollup, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #57008 (suggest `|` when `,` founds in invalid match value)
 - #57106 (Mark str::trim.* functions as #[must_use].)
 - #57920 (use `SOURCE_DATE_EPOCH` for man page time if set)
 - #57934 (Introduce into_raw_non_null on Rc and Arc)
 - #57971 (SGX target: improve panic & exit handling)
 - #57980 (Add the edition guide to the bookshelf)
 - #57984 (Improve bug message in check_ty)
 - #57999 (Add MOVBE x86 CPU feature)
 - #58000 (Fixes and cleanups)
 - #58005 (update docs for fix_start/end_matches)
 - #58007 (Don't panic when accessing enum variant ctor using `Self` in match)
 - #58008 (Pass correct arguments to places_conflict)

Failed merges:

r? @ghost
2019-01-31 03:47:17 +00:00
Mazdak Farrokhzad
877dee7c67
Rollup merge of #58008 - matthewjasper:places-conflict-args, r=oli-obk
Pass correct arguments to places_conflict

The borrow place *must* be a place that we track borrows for, otherwise
we will likely ICE.

Closes #57989
2019-01-31 02:10:53 +01:00
Mazdak Farrokhzad
bc7be96cb9
Rollup merge of #58007 - estebank:issue-58006, r=petrochenkov
Don't panic when accessing enum variant ctor using `Self` in match

Fix #58006.

r? @petrochenkov
2019-01-31 02:10:52 +01:00
Mazdak Farrokhzad
c76456c253
Rollup merge of #58005 - vitiral:docs_trim_start_matches, r=Manishearth
update docs for fix_start/end_matches

fixes #57686:
2019-01-31 02:10:51 +01:00
Mazdak Farrokhzad
880f6334f7
Rollup merge of #58000 - oli-obk:fixes_and_cleanups, r=RalfJung
Fixes and cleanups

Address the points raised in https://github.com/rust-lang/rust/pull/57677/files by @eddyb and @RalfJung
2019-01-31 02:10:50 +01:00
Mazdak Farrokhzad
bb91a192c0
Rollup merge of #57999 - jethrogb:jb/movbe-feature, r=alexcrichton
Add MOVBE x86 CPU feature

I have no idea if this is correct. I basically copied the ADX feature. I verified the feature is also called `movbe` in LLVM.

I marked this to become stable immediately, as part of the RFC 2045.

r? @alexcrichton
2019-01-31 02:10:49 +01:00
Mazdak Farrokhzad
dfc8ff549f
Rollup merge of #57984 - phansch:improve_check_ty_error, r=zackmdavis
Improve bug message in check_ty

This branch was hit in Clippy and I think it would be nice to
show the thing that was unexpected in the bug message.

It's also in line with the other `bug!` messages in `check_ty`.
2019-01-31 02:10:47 +01:00
Mazdak Farrokhzad
9b3aedf5b0
Rollup merge of #57980 - siddharthasahu:patch-1, r=QuietMisdreavus
Add the edition guide to the bookshelf
2019-01-31 02:10:46 +01:00
Mazdak Farrokhzad
fb7721a594
Rollup merge of #57971 - jethrogb:jb/sgx-panic, r=alexcrichton
SGX target: improve panic & exit handling

Implement this part of the spec:

> The enclave must not rely on userspace to terminate other threads still running. Similarly, the enclave must not trust that it will no longer be entered by userspace, and it must safeguard against that in the entrypoints.

Also use `UserRef` to access panic buffer

r? @alexcrichton

cc @VardhanThigle
2019-01-31 02:10:45 +01:00
Mazdak Farrokhzad
e8173a654d
Rollup merge of #57934 - dwijnand:from-Arc/Rc-to-NonNull, r=alexcrichton
Introduce into_raw_non_null on Rc and Arc

None
2019-01-31 02:10:44 +01:00
Mazdak Farrokhzad
01346563c1
Rollup merge of #57920 - euclio:source-date-epoch, r=Mark-Simulacrum
use `SOURCE_DATE_EPOCH` for man page time if set

Fixes #57776.
2019-01-31 02:10:42 +01:00
Mazdak Farrokhzad
7ebb0a8c8e
Rollup merge of #57106 - matthiaskrgr:trim_must_use, r=sfackler
Mark str::trim.* functions as #[must_use].

The functions return a reference to a new object and do not modify in-place
as the following code shows:
````
let s = String::from("   hello   ");
s.trim();
assert_eq!(s, "   hello   ");
````

The new reference should be bound to a variable as now indicated by #[must_use].
2019-01-31 02:10:41 +01:00
Mazdak Farrokhzad
ab844daadb
Rollup merge of #57008 - Knium:misleading-try-adding-parentheses-in-match-with-comma, r=oli-obk
suggest `|` when `,` founds in invalid match value

Issue #54807
I get stuck on (what | how) I should implement...
2019-01-31 02:10:40 +01:00
bors
147311c5fc Auto merge of #57974 - llogiq:vec-deque-try-fold, r=alexcrichton
override `VecDeque`'s `Iter::try_fold`

This should improve performance (wherever it is used), but I haven't found the time to benchmark it yet.
2019-01-30 21:04:06 +00:00
John Kåre Alsaker
38bcd4b42a Move privacy checking later in the pipeline and make some passes run in parallel 2019-01-30 21:19:02 +01:00