]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agofix SGX build failures
Ralf Jung [Sun, 10 Feb 2019 18:08:49 +0000 (19:08 +0100)]
fix SGX build failures

5 years agoit is okay not to use into_inner
Ralf Jung [Sun, 10 Feb 2019 14:27:59 +0000 (15:27 +0100)]
it is okay not to use into_inner

5 years agofix doctests
Ralf Jung [Wed, 6 Feb 2019 10:14:12 +0000 (11:14 +0100)]
fix doctests

5 years agoextend box-maybe-uninit test
Ralf Jung [Tue, 5 Feb 2019 21:26:30 +0000 (22:26 +0100)]
extend box-maybe-uninit test

5 years agofix test case
Ralf Jung [Tue, 5 Feb 2019 20:22:11 +0000 (21:22 +0100)]
fix test case

5 years agofix doctest
Ralf Jung [Tue, 5 Feb 2019 16:22:46 +0000 (17:22 +0100)]
fix doctest

5 years agotypos
Ralf Jung [Mon, 4 Feb 2019 10:11:39 +0000 (11:11 +0100)]
typos

5 years agomake set return a mutable reference
Ralf Jung [Sun, 3 Feb 2019 21:14:14 +0000 (22:14 +0100)]
make set return a mutable reference

5 years agoexpand as_[mut_]ptr docs a bit
Ralf Jung [Sun, 3 Feb 2019 21:11:28 +0000 (22:11 +0100)]
expand as_[mut_]ptr docs a bit

5 years agosome type-level docs for MaybeUninit; rename into_inner -> into_initialized
Ralf Jung [Sun, 3 Feb 2019 21:10:39 +0000 (22:10 +0100)]
some type-level docs for MaybeUninit; rename into_inner -> into_initialized

5 years agoAuto merge of #58043 - jethrogb:jb/sgx-usercallnrs, r=joshtriplett
bors [Sun, 3 Feb 2019 04:57:30 +0000 (04:57 +0000)]
Auto merge of #58043 - jethrogb:jb/sgx-usercallnrs, r=joshtriplett

Fix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs`

It was 0-indexed but should be 1-indexed. This PR just removes the duplicate code and re-exports the internal enum.

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

r? @joshtriplett

5 years agoAuto merge of #58079 - ljedrz:HirIdification_phase_1, r=Zoxc
bors [Sun, 3 Feb 2019 00:24:25 +0000 (00:24 +0000)]
Auto merge of #58079 - ljedrz:HirIdification_phase_1, r=Zoxc

hir: add HirId to main Hir nodes

This is the 1st PR in a series dedicated to `HirId`-ification, i.e. deprecating `ast::NodeId`s after the AST > HIR lowering process. The bigger proof of concept can be seen in https://github.com/rust-lang/rust/pull/57578.

**Phase 1**: store `HirId` in all remaining (some already have it) main HIR nodes (excluding `*Id` objects).

- [x] `Field`
- [x] `FieldPat`
- [x] `ForeignItem`
- [x] `GenericParam`
- [x] `Lifetime`
- [x] `MacroDef`
- [x] `PathSegment`
- [x] `PatKind::Binding`
- [x] `Stmt`
- [x] `StructField`
- [x] `TypeBinding`
- [x] `VariantData`
- [x] `WhereClause`
- [x] `WhereEqPredicate`

r? @Zoxc
Cc @varkor

5 years agoAuto merge of #58071 - Centril:adjust-stabilization-order, r=varkor
bors [Sat, 2 Feb 2019 19:53:12 +0000 (19:53 +0000)]
Auto merge of #58071 - Centril:adjust-stabilization-order, r=varkor

Fix stabilization order of `uniform_paths`

The `accepted` list is not correctly sorted; this PR fixes that.

r? @alexreg

@bors rollup

5 years agohir: add HirId to main Hir nodes
ljedrz [Sat, 2 Feb 2019 14:40:08 +0000 (15:40 +0100)]
hir: add HirId to main Hir nodes

5 years agoAuto merge of #58047 - SimonSapin:split_ascii_whitespace, r=Centril
bors [Sat, 2 Feb 2019 09:12:39 +0000 (09:12 +0000)]
Auto merge of #58047 - SimonSapin:split_ascii_whitespace, r=Centril

Stabilize split_ascii_whitespace

Tracking issue FCP to merge: https://github.com/rust-lang/rust/issues/48656#issuecomment-442372750

Closes https://github.com/rust-lang/rust/issues/48656

5 years agofix stabilization order of uniform_paths.
Mazdak Farrokhzad [Sat, 2 Feb 2019 06:42:27 +0000 (07:42 +0100)]
fix stabilization order of uniform_paths.

5 years agoAuto merge of #58048 - SimonSapin:error_type_id, r=Centril
bors [Sat, 2 Feb 2019 06:42:20 +0000 (06:42 +0000)]
Auto merge of #58048 - SimonSapin:error_type_id, r=Centril

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

5 years agoAuto merge of #58060 - andre-richter:master, r=nagisa
bors [Sat, 2 Feb 2019 04:06:11 +0000 (04:06 +0000)]
Auto merge of #58060 - andre-richter:master, r=nagisa

targets: aarch64-unknown-none: Add +strict-align

On AArch64, an unaligned access causes a synchronous exception. In the current
state of the target, the compiler might generate unaligned accesses, see
https://github.com/rust-embedded/rust-raspi3-tutorial/issues/10.

Since this is a bare-metal target, it is possible that there is no exception
handling in place (yet) to recover from this case, causing a binary to just
silently fail.

Add `+strict-align` to avoid this case.

5 years agoAuto merge of #57937 - denzp:nvptx, r=nagisa
bors [Fri, 1 Feb 2019 23:43:34 +0000 (23:43 +0000)]
Auto merge of #57937 - denzp:nvptx, r=nagisa

NVPTX target specification

This change adds a built-in `nvptx64-nvidia-cuda` GPGPU no-std target specification and a basic PTX assembly smoke tests.

The approach is taken here and the target spec is based on `ptx-linker`, a project started about 1.5 years ago. Key feature: bitcode object files being linked with LTO into the final module on the linker's side.

Prior to this change, the linker used a `ld` linker-flavor, but I think, having the special CLI convention is a more reliable way.

Questions about further progress on reliable CUDA workflow with Rust:
1. Is it possible to create a test suite `codegen-asm` to verify end-to-end integration with LLVM backend?
1. How would it be better to organise no-std `compile-fail` tests: add `#![no_std]` where possible and mark others as `ignore-nvptx` directive, or alternatively, introduce `compile-fail-no-std` test suite?
1. Can we have the `ptx-linker` eventually be integrated as `rls` or `clippy`? Hopefully, this should allow to statically link against LLVM used in Rust and get rid of the [current hacky solution](https://github.com/denzp/rustc-llvm-proxy).
1. Am I missing some methods from `rustc_codegen_ssa::back::linker::Linker` that can be useful for bitcode-only linking?

Currently, there are no major public CUDA projects written in Rust I'm aware of, but I'm expecting to have a built-in target will create a solid foundation for further experiments and awesome crates.

Related to #38789
Fixes #38787
Fixes #38786

5 years agotargets: aarch64-unknown-none: Add +strict-align
Andre Richter [Fri, 1 Feb 2019 21:11:40 +0000 (22:11 +0100)]
targets: aarch64-unknown-none: Add +strict-align

On AArch64, an unaligned access causes a synchronous exception. In the current
state of the target, the compiler might generate unaligned accesses, see
https://github.com/rust-embedded/rust-raspi3-tutorial/issues/10.

Since this is a bare-metal target, it is possible that there is no exception
handling in place (yet) to recover from this case, causing a binary to just
silently fail.

Add `+strict-align` to avoid this case.

5 years agoAuto merge of #57978 - varkor:fix-irrefutable-integer-range-match, r=oli-obk
bors [Fri, 1 Feb 2019 20:57:36 +0000 (20:57 +0000)]
Auto merge of #57978 - varkor:fix-irrefutable-integer-range-match, r=oli-obk

Fix bug in integer range matching

Fixes #57894.

5 years agoFix bug in integer range matching
varkor [Fri, 1 Feb 2019 20:02:21 +0000 (20:02 +0000)]
Fix bug in integer range matching

5 years agoAuto merge of #58049 - king6cong:typo, r=oli-obk
bors [Fri, 1 Feb 2019 17:59:35 +0000 (17:59 +0000)]
Auto merge of #58049 - king6cong:typo, r=oli-obk

Fix typo

None

5 years agoAuto merge of #57586 - Aaron1011:feature/pub-priv-dep, r=petrochenkov
bors [Fri, 1 Feb 2019 15:24:26 +0000 (15:24 +0000)]
Auto merge of #57586 - Aaron1011:feature/pub-priv-dep, r=petrochenkov

Implement public/private dependency feature

Implements https://github.com/rust-lang/rust/issues/44663

The core implementation is done - however, there are a few issues that still need to be resolved:

- [x] The `EXTERNAL_PRIVATE_DEPENDENCY` lint currently does notthing when the `public_private_dependencies` is not enabled. Should mentioning the lint (in an `allow` or `deny` attribute) be an error if the feature is not enabled? (Resolved- the feature was removed)
- [x] Crates with the name `core` and `std` are always marked public, without the need to explcitily specify them on the command line. Is this what we want to do? Do we want to allow`no_std`/`no_core` crates to explicitly control this in some way? (Resolved - private crates are now explicitly specified)
- [x] Should I add additional UI tests? (Resolved - added more tests)
- [x] Does it make sense to be able to allow/deny the `EXTERNAL_PRIVATE_DEPENDENCY` on an individual item? (Resolved - this is implemented)

5 years agoCleanup unecessary code
Aaron Hill [Thu, 31 Jan 2019 19:36:26 +0000 (14:36 -0500)]
Cleanup unecessary code

5 years agoUpdate tests for future-compat warning removal
Aaron Hill [Wed, 30 Jan 2019 22:28:41 +0000 (17:28 -0500)]
Update tests for future-compat warning removal

5 years agoAdd future compat lint declaration
Aaron Hill [Wed, 30 Jan 2019 22:09:31 +0000 (17:09 -0500)]
Add future compat lint declaration

5 years agoRemove unnecessary is_local() check
Aaron Hill [Wed, 30 Jan 2019 21:00:40 +0000 (16:00 -0500)]
Remove unnecessary is_local() check

5 years agoTest allowing individual struct field
Aaron Hill [Wed, 30 Jan 2019 20:37:27 +0000 (15:37 -0500)]
Test allowing individual struct field

5 years agoReplace --extern-public with --extern-private
Aaron Hill [Wed, 30 Jan 2019 20:33:50 +0000 (15:33 -0500)]
Replace --extern-public with --extern-private

5 years agoRemove feature from test
Aaron Hill [Tue, 29 Jan 2019 22:03:28 +0000 (17:03 -0500)]
Remove feature from test

5 years agoTidy fixes
Aaron Hill [Tue, 29 Jan 2019 21:16:57 +0000 (16:16 -0500)]
Tidy fixes

5 years agoMove --extern-public behind -Z unstable-options
Aaron Hill [Tue, 29 Jan 2019 21:10:49 +0000 (16:10 -0500)]
Move --extern-public behind -Z unstable-options

5 years agoRemove feature gate
Aaron Hill [Tue, 22 Jan 2019 23:37:58 +0000 (18:37 -0500)]
Remove feature gate

5 years agoRename external_private_dependency to exported_private_dependencies
Aaron Hill [Mon, 21 Jan 2019 03:04:22 +0000 (22:04 -0500)]
Rename external_private_dependency to exported_private_dependencies

5 years agoDelete dead code
Aaron Hill [Mon, 14 Jan 2019 03:42:36 +0000 (22:42 -0500)]
Delete dead code

5 years agoTrack extern_public command-line argument
Aaron Hill [Mon, 14 Jan 2019 03:39:24 +0000 (22:39 -0500)]
Track extern_public command-line argument

5 years agoAdd test for 'std' crate being public
Aaron Hill [Mon, 14 Jan 2019 03:33:06 +0000 (22:33 -0500)]
Add test for 'std' crate being public

5 years agoClippy fixes, rename stuff to match RFC
Aaron Hill [Mon, 14 Jan 2019 03:29:52 +0000 (22:29 -0500)]
Clippy fixes, rename stuff to match RFC

5 years agoImprove UI tests
Aaron Hill [Mon, 14 Jan 2019 01:37:27 +0000 (20:37 -0500)]
Improve UI tests

5 years agoAlways treat 'std' and 'core' as public
Aaron Hill [Mon, 14 Jan 2019 01:35:14 +0000 (20:35 -0500)]
Always treat 'std' and 'core' as public

5 years agoAdd UI test
Aaron Hill [Sun, 13 Jan 2019 23:50:24 +0000 (18:50 -0500)]
Add UI test

5 years agoProperly register lint
Aaron Hill [Sun, 13 Jan 2019 23:50:16 +0000 (18:50 -0500)]
Properly register lint

5 years agoFixup code
Aaron Hill [Sun, 13 Jan 2019 23:07:42 +0000 (18:07 -0500)]
Fixup code

5 years agoFix emitting lint
Aaron Hill [Sat, 15 Dec 2018 13:01:57 +0000 (08:01 -0500)]
Fix emitting lint

5 years agoInitial implementation work
Aaron Hill [Sat, 15 Dec 2018 12:00:15 +0000 (07:00 -0500)]
Initial implementation work

5 years agoAuto merge of #57916 - Zoxc:incr-passes4, r=michaelwoerister
bors [Fri, 1 Feb 2019 12:52:54 +0000 (12:52 +0000)]
Auto merge of #57916 - Zoxc:incr-passes4, r=michaelwoerister

Misc performance tweaks

r? @michaelwoerister

5 years agoFix typo
king6cong [Fri, 1 Feb 2019 10:41:51 +0000 (18:41 +0800)]
Fix typo

5 years agoStabilize std::error::Error::type_id
Simon Sapin [Fri, 1 Feb 2019 10:29:02 +0000 (11:29 +0100)]
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

5 years agoStabilize split_ascii_whitespace
Simon Sapin [Fri, 1 Feb 2019 10:24:12 +0000 (11:24 +0100)]
Stabilize split_ascii_whitespace

Tracking issue FCP to merge: https://github.com/rust-lang/rust/issues/48656#issuecomment-442372750

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 #58040 - vors:fix-E0283-explanation, r=cramertj
bors [Fri, 1 Feb 2019 06:34:45 +0000 (06:34 +0000)]
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?"

5 years agoFix grammar in E0283 explanation
Sergei Vorobev [Fri, 1 Feb 2019 06:26:19 +0000 (22:26 -0800)]
Fix grammar in E0283 explanation

5 years agoAuto merge of #58002 - oli-obk:deprecated_sugg, r=zackmdavis
bors [Fri, 1 Feb 2019 01:06:15 +0000 (01:06 +0000)]
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.

5 years agoAuto merge of #56696 - jonas-schievink:weak-counts, r=alexcrichton
bors [Thu, 31 Jan 2019 19:20:14 +0000 (19:20 +0000)]
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

5 years agoUse ensure for mir_borrowck
John Kåre Alsaker [Thu, 31 Jan 2019 16:47:33 +0000 (17:47 +0100)]
Use ensure for mir_borrowck

5 years agoAuto merge of #57914 - jethrogb:jb/sgx-unwind-version, r=alexcrichton
bors [Thu, 31 Jan 2019 16:21:39 +0000 (16:21 +0000)]
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

5 years agoAuto merge of #58003 - nikic:saturating-add, r=nagisa
bors [Thu, 31 Jan 2019 13:40:11 +0000 (13:40 +0000)]
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

5 years agoUpdated commit id for building libunwind.
Vardhan Thigle [Thu, 31 Jan 2019 11:31:16 +0000 (17:01 +0530)]
Updated commit id for building libunwind.

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 agoAdd suggestions to deprecation lints
Oliver Scherer [Wed, 30 Jan 2019 16:47:36 +0000 (17:47 +0100)]
Add suggestions to deprecation lints

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