]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoFix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs`
Jethro Beekman [Fri, 1 Feb 2019 08:28:49 +0000 (13:58 +0530)]
Fix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs`

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

5 years agoAuto merge of #57514 - michaelwoerister:xlto-tests, r=alexcrichton
bors [Thu, 31 Jan 2019 11:07:41 +0000 (11:07 +0000)]
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

5 years agoAuto merge of #58016 - Centril:rollup, r=Centril
bors [Thu, 31 Jan 2019 03:47:17 +0000 (03:47 +0000)]
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

5 years agoRollup merge of #58008 - matthewjasper:places-conflict-args, r=oli-obk
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:53 +0000 (02:10 +0100)]
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

5 years agoRollup merge of #58007 - estebank:issue-58006, r=petrochenkov
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:52 +0000 (02:10 +0100)]
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

5 years agoRollup merge of #58005 - vitiral:docs_trim_start_matches, r=Manishearth
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:51 +0000 (02:10 +0100)]
Rollup merge of #58005 - vitiral:docs_trim_start_matches, r=Manishearth

update docs for fix_start/end_matches

fixes #57686:

5 years agoRollup merge of #58000 - oli-obk:fixes_and_cleanups, r=RalfJung
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:50 +0000 (02:10 +0100)]
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

5 years agoRollup merge of #57999 - jethrogb:jb/movbe-feature, r=alexcrichton
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:49 +0000 (02:10 +0100)]
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

5 years agoRollup merge of #57984 - phansch:improve_check_ty_error, r=zackmdavis
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:47 +0000 (02:10 +0100)]
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`.

5 years agoRollup merge of #57980 - siddharthasahu:patch-1, r=QuietMisdreavus
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:46 +0000 (02:10 +0100)]
Rollup merge of #57980 - siddharthasahu:patch-1, r=QuietMisdreavus

Add the edition guide to the bookshelf

5 years agoRollup merge of #57971 - jethrogb:jb/sgx-panic, r=alexcrichton
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:45 +0000 (02:10 +0100)]
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

5 years agoRollup merge of #57934 - dwijnand:from-Arc/Rc-to-NonNull, r=alexcrichton
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:44 +0000 (02:10 +0100)]
Rollup merge of #57934 - dwijnand:from-Arc/Rc-to-NonNull, r=alexcrichton

Introduce into_raw_non_null on Rc and Arc

None

5 years agoRollup merge of #57920 - euclio:source-date-epoch, r=Mark-Simulacrum
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:42 +0000 (02:10 +0100)]
Rollup merge of #57920 - euclio:source-date-epoch, r=Mark-Simulacrum

use `SOURCE_DATE_EPOCH` for man page time if set

Fixes #57776.

5 years agoRollup merge of #57106 - matthiaskrgr:trim_must_use, r=sfackler
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:41 +0000 (02:10 +0100)]
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].

5 years agoRollup merge of #57008 - Knium:misleading-try-adding-parentheses-in-match-with-comma...
Mazdak Farrokhzad [Thu, 31 Jan 2019 01:10:40 +0000 (02:10 +0100)]
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...

5 years agoAuto merge of #57974 - llogiq:vec-deque-try-fold, r=alexcrichton
bors [Wed, 30 Jan 2019 21:04:06 +0000 (21:04 +0000)]
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.

5 years agoPass correct arguments to places_conflict
Matthew Jasper [Wed, 30 Jan 2019 19:49:31 +0000 (19:49 +0000)]
Pass correct arguments to places_conflict

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

5 years agoDon't panic when accessing enum variant ctor using `Self` in match
Esteban Küber [Wed, 30 Jan 2019 19:39:56 +0000 (11:39 -0800)]
Don't panic when accessing enum variant ctor using `Self` in match

5 years agoFailure resistent trait implementing
Oliver Scherer [Wed, 30 Jan 2019 18:29:10 +0000 (19:29 +0100)]
Failure resistent trait implementing

5 years agoImprove bug message in check_ty
Philipp Hansch [Wed, 30 Jan 2019 06:30:39 +0000 (07:30 +0100)]
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`.

5 years agofix #57686: update docs for fix_start/end_matches
Rett Berg [Wed, 30 Jan 2019 17:14:28 +0000 (09:14 -0800)]
fix #57686: update docs for fix_start/end_matches

5 years agoSwap the names of `LocalValue` and `LocalState`
Oliver Scherer [Wed, 30 Jan 2019 16:51:59 +0000 (17:51 +0100)]
Swap the names of `LocalValue` and `LocalState`

5 years agoPrefer macro over manual implementation
Oliver Scherer [Wed, 30 Jan 2019 16:50:46 +0000 (17:50 +0100)]
Prefer macro over manual implementation

5 years agoAuto merge of #57495 - jamesmunns:mdbook-compat, r=steveklabnik
bors [Wed, 30 Jan 2019 16:20:15 +0000 (16:20 +0000)]
Auto merge of #57495 - jamesmunns:mdbook-compat, r=steveklabnik

Support multiple versions of MdBook for docs

Only the compatibility items from the embedded book PR. PR with embedded book components: https://github.com/rust-lang/rust/pull/56291

CC @steveklabnik, @ehuss, and https://github.com/rust-lang-nursery/edition-guide/pull/134

5 years agoAdd MOVBE feature
Jethro Beekman [Wed, 30 Jan 2019 13:27:55 +0000 (18:57 +0530)]
Add MOVBE feature

5 years agoCI: Use lld for linking LLVM in the x86_64-gnu-debug image.
Michael Woerister [Wed, 30 Jan 2019 12:28:46 +0000 (13:28 +0100)]
CI: Use lld for linking LLVM in the x86_64-gnu-debug image.

5 years agobootstrap: Expose LLVM_USE_LINKER cmake option to config.toml.
Michael Woerister [Wed, 30 Jan 2019 12:27:12 +0000 (13:27 +0100)]
bootstrap: Expose LLVM_USE_LINKER cmake option to config.toml.

5 years agoci: Use clang as the C++ compiler for x86_64-gnu-debug.
Michael Woerister [Mon, 28 Jan 2019 14:16:29 +0000 (15:16 +0100)]
ci: Use clang as the C++ compiler for x86_64-gnu-debug.

5 years agobootstrap: Make LLD available to run-make tests.
Michael Woerister [Fri, 25 Jan 2019 11:34:59 +0000 (12:34 +0100)]
bootstrap: Make LLD available to run-make tests.

5 years agoAdd missing packages.
Michael Woerister [Thu, 24 Jan 2019 13:08:39 +0000 (14:08 +0100)]
Add missing packages.

5 years agoEliminate an unwrap
Oliver Scherer [Wed, 30 Jan 2019 14:51:20 +0000 (15:51 +0100)]
Eliminate an unwrap

5 years agoMonomorphize types when not going through `layout_of_local`
Oliver Scherer [Wed, 30 Jan 2019 14:42:00 +0000 (15:42 +0100)]
Monomorphize types when not going through `layout_of_local`

5 years agoAdd exception for new dependency in license checker
James Munns [Sat, 19 Jan 2019 04:15:25 +0000 (05:15 +0100)]
Add exception for new dependency in license checker

5 years agoUpdate to newer version of mdbook(2)
James Munns [Sat, 19 Jan 2019 02:39:37 +0000 (03:39 +0100)]
Update to newer version of mdbook(2)

5 years agoIndent fixup
Oliver Scherer [Wed, 30 Jan 2019 14:24:41 +0000 (15:24 +0100)]
Indent fixup

5 years agoRemove stable feature
James Munns [Thu, 10 Jan 2019 20:22:33 +0000 (21:22 +0100)]
Remove stable feature

5 years agoNo consumers of MdBook2 yet
James Munns [Thu, 10 Jan 2019 20:18:13 +0000 (21:18 +0100)]
No consumers of MdBook2 yet

5 years agoOnly the compatibility items from the embedded book PR
James Munns [Thu, 10 Jan 2019 19:37:51 +0000 (20:37 +0100)]
Only the compatibility items from the embedded book PR

PR: https://github.com/rust-lang/rust/pull/56291

5 years agoThe return place's layout is only used once per frame, so caching doesn't help
Oliver Scherer [Wed, 30 Jan 2019 14:08:59 +0000 (15:08 +0100)]
The return place's layout is only used once per frame, so caching doesn't help

5 years agoCan't use `layout_of_local` for the frame currently being created
Oliver Scherer [Wed, 30 Jan 2019 14:05:50 +0000 (15:05 +0100)]
Can't use `layout_of_local` for the frame currently being created

5 years agoMake priroda happy again
Oliver Scherer [Wed, 30 Jan 2019 14:01:42 +0000 (15:01 +0100)]
Make priroda happy again

5 years agoAllow `layout_of_local` to also use cached layouts
Oliver Scherer [Wed, 30 Jan 2019 13:55:31 +0000 (14:55 +0100)]
Allow `layout_of_local` to also use cached layouts

5 years agoAuto merge of #57988 - RalfJung:miri, r=oli-obk
bors [Wed, 30 Jan 2019 13:20:32 +0000 (13:20 +0000)]
Auto merge of #57988 - RalfJung:miri, r=oli-obk

update miri

r? @oli-obk

5 years agoMerge `locals` and `local_layouts` fields
Oliver Scherer [Wed, 30 Jan 2019 13:16:18 +0000 (14:16 +0100)]
Merge `locals` and `local_layouts` fields

5 years agoupdate miri
Ralf Jung [Wed, 30 Jan 2019 08:25:19 +0000 (09:25 +0100)]
update miri

5 years agoAuto merge of #57932 - matthiaskrgr:clippy_submodule_upd, r=oli-obk
bors [Wed, 30 Jan 2019 09:30:30 +0000 (09:30 +0000)]
Auto merge of #57932 - matthiaskrgr:clippy_submodule_upd, r=oli-obk

submodules: update clippy from f1753522 to 6ce78d12

Should fix clippy toolstate

Changes:
````
wildcard_match_arm: Update lint count.
wildcard_match_arm: add nesting issue to known.
wildcard_match_arm: lint only enum matches.
wildcard_match_arm: update ui test stderr
wildcard_match_arm: format test.
wilcard_match_arm: run rustfmt.
wildcard_match_arm: add lint properly.
wildcard_match_arm: rename function.
wildcard_match_arm: add simple ui test.
wildcard_match_arm: expand lint scope.
Change match_wild lint name to WILDCARD_MATCH_ARM.
Add match_wild lint (#3649).
fetch_prs_between: add .sh file ending
cargo fmt
Update various docs
Use built-in entry_fn detection over self-built
cargo fmt
Reorganize conditionals: Run faster checks first
Maybe fix ICE?
Add initial version of const_fn lint
Fix `unit_arg` false positive
Rustfmt
Check hypothetically failing conversion
Remove tests for deprecated items
Update more changed iterator paths
Atomics constants are now handled by the deprecation lint
Update changed iterator paths
Update const slice processing
update test stderr
run cargo fmt
rustup https://github.com/rust-lang/rust/pull/57907/
Fix documentation for `slow_vector_initialization`
rustup https://github.com/rust-lang/rust/pull/57726
Remove unsafe_vector_initialization from added lints
Prevent incorrect cast_lossless suggestion in const_fn
Incorporate review suggestions
Fix dogfood tests on Appveyor
test(versioncheck): Use .no_deps()
test(versioncheck): Fix version equality check
chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1
dependencies: update itertools from 0.7 to 0.8
Add script to fetch GitHub PRs between two commits
gitattributes: Treat .fixed files as rust files
Update changelog with all changes since 0.0.212
Fix `expect_fun_call` lint suggestions
````

r? @oli-obk

5 years agooverride `VecDeque`'s `Iter::try_fold`
Andre Bogus [Tue, 29 Jan 2019 15:15:02 +0000 (16:15 +0100)]
override `VecDeque`'s `Iter::try_fold`

5 years agoSuggest to add each of `|` and `()` when unexpected `,` is found in pattern
Knium_ [Wed, 30 Jan 2019 04:50:44 +0000 (13:50 +0900)]
Suggest to add each of `|` and `()` when unexpected `,` is found in pattern

5 years agoAuto merge of #57975 - alexcrichton:debug-exit-appveyor, r=pietroalbini
bors [Wed, 30 Jan 2019 03:44:11 +0000 (03:44 +0000)]
Auto merge of #57975 - alexcrichton:debug-exit-appveyor, r=pietroalbini

Attempt to debug 259 exit code on AppVeyor

Let's try to dig in a bit more and see where this is coming from, it
looks like AppVeyor is also unsure where this is coming from!

5 years agosubmodules: update clippy from f1753522 to 6ce78d12
Matthias Krüger [Wed, 30 Jan 2019 00:24:37 +0000 (01:24 +0100)]
submodules: update clippy from f1753522 to 6ce78d12

Changes:
````
wildcard_match_arm: Update lint count.
wildcard_match_arm: add nesting issue to known.
wildcard_match_arm: lint only enum matches.
wildcard_match_arm: update ui test stderr
wildcard_match_arm: format test.
wilcard_match_arm: run rustfmt.
wildcard_match_arm: add lint properly.
wildcard_match_arm: rename function.
wildcard_match_arm: add simple ui test.
wildcard_match_arm: expand lint scope.
Change match_wild lint name to WILDCARD_MATCH_ARM.
Add match_wild lint (#3649).
fetch_prs_between: add .sh file ending
cargo fmt
Update various docs
Use built-in entry_fn detection over self-built
cargo fmt
Reorganize conditionals: Run faster checks first
Maybe fix ICE?
Add initial version of const_fn lint
Fix `unit_arg` false positive
Rustfmt
Check hypothetically failing conversion
Remove tests for deprecated items
Update more changed iterator paths
Atomics constants are now handled by the deprecation lint
Update changed iterator paths
Update const slice processing
update test stderr
run cargo fmt
rustup https://github.com/rust-lang/rust/pull/57907/
Fix documentation for `slow_vector_initialization`
rustup https://github.com/rust-lang/rust/pull/57726
Remove unsafe_vector_initialization from added lints
Prevent incorrect cast_lossless suggestion in const_fn
Incorporate review suggestions
Fix dogfood tests on Appveyor
test(versioncheck): Use .no_deps()
test(versioncheck): Fix version equality check
chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1
dependencies: update itertools from 0.7 to 0.8
Add script to fetch GitHub PRs between two commits
gitattributes: Treat .fixed files as rust files
Update changelog with all changes since 0.0.212
Fix `expect_fun_call` lint suggestions
````

5 years agoAuto merge of #57953 - mati865:cc-fix, r=alexcrichton
bors [Tue, 29 Jan 2019 22:34:19 +0000 (22:34 +0000)]
Auto merge of #57953 - mati865:cc-fix, r=alexcrichton

Do not set CC, CFLAGS, CXX, CXXFLAGS, AR, RANLIB in bootstrap, it breaks cross compilation

Fixes https://github.com/rust-lang/rust/issues/57812

I tested it in AArch64 Ubuntu container with several days old tree to have all the tools buildable.

I did **not** test native builds (amd64 -> amd64), leaving it to CI.

r? @alexcrichton

5 years agoAdd link to the edition guide.
Siddhartha Sahu [Tue, 29 Jan 2019 22:30:49 +0000 (17:30 -0500)]
Add link to the edition guide.

5 years agoAuto merge of #57808 - gnzlbg:ustdsimd, r=gnzlbg
bors [Tue, 29 Jan 2019 19:40:51 +0000 (19:40 +0000)]
Auto merge of #57808 - gnzlbg:ustdsimd, r=gnzlbg

Update stdsimd

This is the companion PR to https://github.com/rust-lang-nursery/stdsimd/pull/640

r? @alexcrichton

5 years agoAuto merge of #57901 - lqd:issue_57362, r=nikomatsakis
bors [Tue, 29 Jan 2019 16:58:15 +0000 (16:58 +0000)]
Auto merge of #57901 - lqd:issue_57362, r=nikomatsakis

Add information to higher-ranked lifetimes conflicts error messages

Make these errors go through the new "placeholder error" code path, to have self tys displayed and make them hopefully less confusing.

Should fix #57362.

r? @nikomatsakis — so we can iterate on the specific wording you wanted.

5 years agoAttempt to debug 259 exit code on AppVeyor
Alex Crichton [Tue, 29 Jan 2019 15:45:54 +0000 (07:45 -0800)]
Attempt to debug 259 exit code on AppVeyor

Let's try to dig in a bit more and see where this is coming from, it
looks like AppVeyor is also unsure where this is coming from!

5 years agoAuto merge of #57948 - Zoxc:parallel, r=michaelwoerister
bors [Tue, 29 Jan 2019 13:32:13 +0000 (13:32 +0000)]
Auto merge of #57948 - Zoxc:parallel, r=michaelwoerister

Use multiple threads by default. Limits tests to one thread. Do some renaming.

r? @michaelwoerister

5 years agoSGX target: improve panic & exit handling
Jethro Beekman [Tue, 29 Jan 2019 11:40:22 +0000 (17:10 +0530)]
SGX target: improve panic & exit handling

5 years agoUpdate stdsimd
gnzlbg [Mon, 21 Jan 2019 17:42:04 +0000 (18:42 +0100)]
Update stdsimd

5 years agoAuto merge of #57862 - hsivonen:buildneon, r=alexcrichton
bors [Tue, 29 Jan 2019 09:42:13 +0000 (09:42 +0000)]
Auto merge of #57862 - hsivonen:buildneon, r=alexcrichton

Build the standard library for thumbv7neon-unknown-linux-gnueabihf in CI

Using the `dist-armv7-linux` image instead of `dist-various-1` in order to use the ARMv7 toolchain available in `dist-armv7-linux`.

Closes #57030.

5 years agoAuto merge of #57957 - Centril:rollup, r=Centril
bors [Tue, 29 Jan 2019 05:22:51 +0000 (05:22 +0000)]
Auto merge of #57957 - Centril:rollup, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #57045 (Kill remaining uses of mem::uninitialized in libcore, liballoc)
 - #57674 (Avoid erase_regions_ty queries if there are no regions to erase)
 - #57833 (Print a slightly clearer message when failing to launch a thread)
 - #57859 (Fix invalid background color)
 - #57904 (add typo suggestion to unknown attribute error)
 - #57915 (Pretty print `$crate` as `crate` or `crate_name` in more cases)
 - #57950 (Extend E0106, E0261)

Failed merges:

r? @ghost

5 years agoIntroduce into_raw_non_null on Rc and Arc
Dale Wijnand [Sun, 27 Jan 2019 17:03:03 +0000 (17:03 +0000)]
Introduce into_raw_non_null on Rc and Arc

5 years agoRefer to synthetically named lifetimes as "some specific lifetime" rather than "the...
Rémy Rakic [Mon, 28 Jan 2019 22:12:13 +0000 (23:12 +0100)]
Refer to synthetically named lifetimes as "some specific lifetime" rather than "the specific lifetime"

5 years agoRollup merge of #57950 - QuietMisdreavus:lifetime-err-desc, r=estebank
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:49 +0000 (22:25 +0100)]
Rollup merge of #57950 - QuietMisdreavus:lifetime-err-desc, r=estebank

Extend E0106, E0261

This is a reopening of https://github.com/rust-lang/rust/pull/57310 with review comments addressed because the original author has since deleted their fork.

From the author (@purple-ice):

> Added an example that points out hardly obvious mistake one could make when writing impl for a new type.

r? @rust-lang/docs

5 years agoRollup merge of #57915 - petrochenkov:notto-disu, r=zackmdavis
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:48 +0000 (22:25 +0100)]
Rollup merge of #57915 - petrochenkov:notto-disu, r=zackmdavis

Pretty print `$crate` as `crate` or `crate_name` in more cases

So, people do parse output of `--pretty=expanded` (sigh), so covering only the legacy proc-macro case (like it was done in https://github.com/rust-lang/rust/pull/57155) is not enough.

This PRs resolves all `$crate`s produced by macros, so they are all printed in the parseable form `$crate::foo` -> `crate::foo` or `crate_name::foo`.

Fixes https://github.com/rust-lang/rust/issues/38016#issuecomment-455851334
Fixes https://github.com/rust-lang/rust/pull/57155#issuecomment-455807195

5 years agoRollup merge of #57904 - euclio:attribute-typos, r=davidtwco
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:47 +0000 (22:25 +0100)]
Rollup merge of #57904 - euclio:attribute-typos, r=davidtwco

add typo suggestion to unknown attribute error

Provides a suggestion using Levenshtein distance to suggest built-in attributes and attribute macros.

Fixes #49270.

5 years agoRollup merge of #57859 - GuillaumeGomez:fix-background, r=QuietMisdreavus
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:45 +0000 (22:25 +0100)]
Rollup merge of #57859 - GuillaumeGomez:fix-background, r=QuietMisdreavus

Fix invalid background color

As discussed in #57814.

r? @QuietMisdreavus

5 years agoRollup merge of #57833 - jethrogb:jb/thread-spawn-unwrap, r=alexcrichton
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:44 +0000 (22:25 +0100)]
Rollup merge of #57833 - jethrogb:jb/thread-spawn-unwrap, r=alexcrichton

Print a slightly clearer message when failing to launch a thread

As discussed in #46345, the `io::Error` you get when a thread fails to launch is of type `io::ErrorKind::WouldBlock`. This is super uninformative when an arbitrary `thread::spawn` fails somewhere in your code:

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11,
kind: WouldBlock, message: "operation would block" }', src/libcore/result.rs:997:5
```

This PR improves the situation a little bit by using `expect` instead of `unwrap`. I don't consider this a complete fix for #46345 though.

5 years agoRollup merge of #57674 - dotdash:erase_reg, r=varkor
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:42 +0000 (22:25 +0100)]
Rollup merge of #57674 - dotdash:erase_reg, r=varkor

Avoid erase_regions_ty queries if there are no regions to erase

It's overall faster to perform this extra check than to perform the
query, even if the result is already in the query cache.

5 years agoRollup merge of #57045 - RalfJung:kill-more-uninit, r=SimonSapin
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:41 +0000 (22:25 +0100)]
Rollup merge of #57045 - RalfJung:kill-more-uninit, r=SimonSapin

Kill remaining uses of mem::uninitialized in libcore, liballoc

Kill remaining uses of mem::uninitialized in libcore and liballoc, and enable a lint that will warn when uses are added again in the future.

To avoid casting raw pointers around (which is always very dangerous because it is not typechecked at all -- it doesn't even get the "same size" sanity check that `transmute` gets), I also added two new functions to `MaybeUninit`:

```rust
    /// Get a pointer to the first contained values.
    pub fn first_ptr(this: &[MaybeUninit<T>]) -> *const T {
        this as *const [MaybeUninit<T>] as *const T
    }

    /// Get a mutable pointer to the first contained values.
    pub fn first_mut_ptr(this: &mut [MaybeUninit<T>]) -> *mut T {
        this as *mut [MaybeUninit<T>] as *mut T
    }
```

I changed some of the existing code to use array-of-`MaybeUninit` instead of `MaybeUninit`-of-array, successfully removing raw pointer casts there as well.

5 years agobootstrap: set toolchain variables on per target basis
Mateusz Mikuła [Mon, 28 Jan 2019 17:40:47 +0000 (18:40 +0100)]
bootstrap: set toolchain variables on per target basis

Using CC, CFLAGS, CXX, CXXFLAGS, AR and RANLIB breaks cross compilation
because host is built first and has correct values. The same
values are incorrect for the target however.

5 years agoFix a comment
John Kåre Alsaker [Mon, 28 Jan 2019 18:24:07 +0000 (19:24 +0100)]
Fix a comment

5 years agoFix CI
John Kåre Alsaker [Mon, 28 Jan 2019 18:22:55 +0000 (19:22 +0100)]
Fix CI

5 years agofix gdb debug printing
Ralf Jung [Mon, 28 Jan 2019 16:33:29 +0000 (17:33 +0100)]
fix gdb debug printing

5 years agoreview comments
QuietMisdreavus [Mon, 28 Jan 2019 15:30:43 +0000 (09:30 -0600)]
review comments

5 years agoUse multiple threads by default. Limits tests to one thread. Do some renaming.
John Kåre Alsaker [Mon, 28 Jan 2019 14:51:47 +0000 (15:51 +0100)]
Use multiple threads by default. Limits tests to one thread. Do some renaming.

5 years agoAuto merge of #55704 - Nemo157:pinned-generators, r=Zoxc
bors [Mon, 28 Jan 2019 14:12:15 +0000 (14:12 +0000)]
Auto merge of #55704 - Nemo157:pinned-generators, r=Zoxc

Use pinning for generators to make trait safe

I'm unsure whether there needs to be any changes to the actual generator transform. Tests are passing so the fact that `Pin<&mut T>` is fundamentally the same as `&mut T` seems to allow it to still work, but maybe there's something subtle here that could go wrong.

This is specified in [RFC 2349 § Immovable generators](https://github.com/rust-lang/rfcs/blob/master/text/2349-pin.md#immovable-generators) (although, since that RFC it has become safe to create an immovable generator, and instead it's unsafe to resume any generator; with these changes both are now safe and instead the unsafety is moved to creating a `Pin<&mut [static generator]>` which there are safe APIs for).

CC #43122

5 years agorename first_mut_ptr -> first_ptr_mut
Ralf Jung [Mon, 28 Jan 2019 11:37:29 +0000 (12:37 +0100)]
rename first_mut_ptr -> first_ptr_mut

5 years agofix typos, improve docs
Ralf Jung [Mon, 28 Jan 2019 10:04:30 +0000 (11:04 +0100)]
fix typos, improve docs

5 years agoAuto merge of #57899 - davidtwco:issue-56685, r=estebank
bors [Mon, 28 Jan 2019 09:52:31 +0000 (09:52 +0000)]
Auto merge of #57899 - davidtwco:issue-56685, r=estebank

Unused variable suggestions apply on all patterns.

Fixes #56685.

This PR extends existing suggestions to prefix unused variable bindings in match arms with an underscore so that it applies to all patterns in a match arm.

r? @estebank
cc @alexcrichton (since you filed the issue)

5 years agoUse warn() for extra diagnostics; with -D warnings this leads to errors
Ralf Jung [Mon, 28 Jan 2019 09:49:11 +0000 (10:49 +0100)]
Use warn() for extra diagnostics; with -D warnings this leads to errors

This is needed to properly respect "deny_warnings = false" in config.toml

5 years agoadd macro for creating uninitialized array
Ralf Jung [Sat, 22 Dec 2018 10:02:06 +0000 (11:02 +0100)]
add macro for creating uninitialized array

5 years agoavoid some raw ptr casts in BTreeMap
Ralf Jung [Fri, 21 Dec 2018 14:10:19 +0000 (15:10 +0100)]
avoid some raw ptr casts in BTreeMap

5 years agoavoid mem::uninitialized in BTreeMap
Ralf Jung [Fri, 21 Dec 2018 10:22:18 +0000 (11:22 +0100)]
avoid mem::uninitialized in BTreeMap

5 years agoBuild the standard library for thumbv7neon-unknown-linux-gnueabihf in CI
Henri Sivonen [Mon, 28 Jan 2019 09:46:41 +0000 (11:46 +0200)]
Build the standard library for thumbv7neon-unknown-linux-gnueabihf in CI

Closes #57030.

5 years agoUnused variable suggestions on all patterns.
David Wood [Fri, 25 Jan 2019 15:56:27 +0000 (16:56 +0100)]
Unused variable suggestions on all patterns.

This commit extends existing suggestions to prefix unused variable
bindings in match arms with an underscore so that it applies to all
patterns in a match arm.

5 years agolibcore: avoid mem::uninitialized and raw ptr casts
Ralf Jung [Fri, 21 Dec 2018 10:08:26 +0000 (11:08 +0100)]
libcore: avoid mem::uninitialized and raw ptr casts

5 years agoliballoc: remove unneeded allow(deprecated)
Ralf Jung [Thu, 20 Dec 2018 21:51:08 +0000 (22:51 +0100)]
liballoc: remove unneeded allow(deprecated)

5 years agolibcore: remove unneeded allow(deprecated)
Ralf Jung [Thu, 20 Dec 2018 21:49:32 +0000 (22:49 +0100)]
libcore: remove unneeded allow(deprecated)

5 years agoAuto merge of #57691 - Zoxc:pass-skip, r=petrochenkov
bors [Mon, 28 Jan 2019 06:32:39 +0000 (06:32 +0000)]
Auto merge of #57691 - Zoxc:pass-skip, r=petrochenkov

Conditionally skip two passes if their related attributes were not found

5 years agoConditionally skip two passes if their related attributes were not found
John Kåre Alsaker [Thu, 17 Jan 2019 06:28:39 +0000 (07:28 +0100)]
Conditionally skip two passes if their related attributes were not found

5 years agoAuto merge of #57910 - Mark-Simulacrum:delete-test, r=petrochenkov
bors [Mon, 28 Jan 2019 03:46:25 +0000 (03:46 +0000)]
Auto merge of #57910 - Mark-Simulacrum:delete-test, r=petrochenkov

Delete long-ignored and useless test

cc @pnkfelix (https://github.com/rust-lang/rust/issues/13745#issuecomment-457599109)

r? @petrochenkov as you re-enabled this test in 21d67c45a3d032b3f0d421e6f882f11ea43d1f9c, https://github.com/rust-lang/rust/pull/55236

5 years agoadd typo suggestion to unknown attribute error
Andy Russell [Fri, 25 Jan 2019 19:29:47 +0000 (14:29 -0500)]
add typo suggestion to unknown attribute error

5 years agoAuto merge of #57442 - oli-obk:lazy_const, r=RalfJung
bors [Mon, 28 Jan 2019 00:46:07 +0000 (00:46 +0000)]
Auto merge of #57442 - oli-obk:lazy_const, r=RalfJung

Simplify `ConstValue::ScalarPair`

While looking at #57432 I realized that some of our types for representing constants are very big. This reduces `LazyConst` to 3/4th of its original size and simplifies some code around slices at the same time.

r? @RalfJung

5 years agoMark non-static generators as always Unpin
Wim Looman [Wed, 21 Nov 2018 14:32:51 +0000 (15:32 +0100)]
Mark non-static generators as always Unpin

5 years agoTemporary workaround for travis diagnostic difference
Wim Looman [Wed, 7 Nov 2018 18:01:35 +0000 (19:01 +0100)]
Temporary workaround for travis diagnostic difference

5 years agoUpdate generator upvar debug info
Wim Looman [Wed, 7 Nov 2018 09:33:35 +0000 (10:33 +0100)]
Update generator upvar debug info

5 years agoUpdate generator transform and generated function signature
Wim Looman [Tue, 6 Nov 2018 23:11:58 +0000 (00:11 +0100)]
Update generator transform and generated function signature

5 years agoimpl Generator for Pin<Box<Generator>>
Wim Looman [Tue, 6 Nov 2018 18:47:18 +0000 (19:47 +0100)]
impl Generator for Pin<Box<Generator>>

5 years agoMark static generators as !Unpin
Wim Looman [Sun, 4 Nov 2018 21:07:55 +0000 (22:07 +0100)]
Mark static generators as !Unpin

5 years agoChange generator trait to use pinning
Wim Looman [Thu, 4 Oct 2018 18:49:38 +0000 (20:49 +0200)]
Change generator trait to use pinning