]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #57499 - steveklabnik:gh47757, r=Mark-Simulacrum
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:16 +0000 (10:55 +0100)]
Rollup merge of #57499 - steveklabnik:gh47757, r=Mark-Simulacrum

note that FromStr does not work for borrowed types

Fixes #47757

5 years agoRollup merge of #57498 - steveklabnik:gh29008, r=alexcrichton
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:15 +0000 (10:55 +0100)]
Rollup merge of #57498 - steveklabnik:gh29008, r=alexcrichton

make note of one more normalization that Paths do

Fixes #29008

5 years agoRollup merge of #57493 - euclio:deref-suggest, r=oli-obk
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:13 +0000 (10:55 +0100)]
Rollup merge of #57493 - euclio:deref-suggest, r=oli-obk

use structured suggestion when casting a reference

5 years agoRollup merge of #57466 - king6cong:comment, r=alexcrichton
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:12 +0000 (10:55 +0100)]
Rollup merge of #57466 - king6cong:comment, r=alexcrichton

Remove outdated comment

More here: https://github.com/rust-lang/rustc-guide/pull/261

5 years agoRollup merge of #57463 - phansch:fix_some_links, r=steveklabnik
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:11 +0000 (10:55 +0100)]
Rollup merge of #57463 - phansch:fix_some_links, r=steveklabnik

docs: Fix some 'second-edition' links

If I understand it correctly, we now want to link to

    https://doc.rust-lang.org/book/*.html

instead of

    https://doc.rust-lang.org/book/second-edition/*.html

because the second-edition page says that it's no longer distributed with
Rust's docs.

For example: https://doc.rust-lang.org/book/second-edition/ch13-01-closures.html

5 years agoRollup merge of #57459 - varkor:E0202-issue-reference, r=petrochenkov
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:09 +0000 (10:55 +0100)]
Rollup merge of #57459 - varkor:E0202-issue-reference, r=petrochenkov

Reference tracking issue for inherent associated types in diagnostic

This makes it clearer that associated types in inherent impls are an intended feature, like the diagnostic for equality constraints in where clauses. (This is more helpful, because the lack of associated types is a confusing omission and it lets users more easily track the state of the feature.)

5 years agoRollup merge of #57450 - steveklabnik:gh45678, r=KodrAus
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:08 +0000 (10:55 +0100)]
Rollup merge of #57450 - steveklabnik:gh45678, r=KodrAus

actually take a slice in this example

Fixes #45678

5 years agoRollup merge of #57441 - VardhanThigle:Vardhan/x86_64-fortanix-unknown-sgx-backtrace...
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:07 +0000 (10:55 +0100)]
Rollup merge of #57441 - VardhanThigle:Vardhan/x86_64-fortanix-unknown-sgx-backtrace-support, r=alexcrichton

Supporting backtrace for x86_64-fortanix-unknown-sgx.

# Overview
Implementing following functions required by `libstd/sys_common` to support `backtrace`:
```
1. unwind_backtrace
2. trace_fn
3. resolve_symname
```
# Description:
The changes here are quite similar to the Cloudabi target `src/libstd/sys/cloudabi/backtrace.rs`
The first 2 functions are implemented via calls to libunwind.a that is linked to the `x86_64-fortanix-unknown-sgx` (#56979),  we have not implemented functionality needed by `resolve_symname`  (or `dladdr`) to reduce SGX TCB. Rather, we print the function address (relative to enclave image base) in `resolve_symname` which can be later translated to correct symbol name (say, via `addr2line`).

# Note:
For `x86_64-fortanix-unknown-sgx`, the `RUST_BACKTRACE` environment has to be set from within the program running in an enclave.
cc: @jethrogb
r? @alexcrichton

5 years agoRollup merge of #57434 - nnethercote:rm-CrateNum-Invalid, r=petrochenkov
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:05 +0000 (10:55 +0100)]
Rollup merge of #57434 - nnethercote:rm-CrateNum-Invalid, r=petrochenkov

Remove `CrateNum::Invalid`.

It's unused.

5 years agoRollup merge of #57433 - ecstatic-morse:issue-56610-bad-link, r=dtolnay
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:03 +0000 (10:55 +0100)]
Rollup merge of #57433 - ecstatic-morse:issue-56610-bad-link, r=dtolnay

Add link destination for `read-ownership`

Resolves #56610.

5 years agoRollup merge of #57417 - QuietMisdreavus:semi-revert-doctest-parsing, r=GuillaumeGomez
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:02 +0000 (10:55 +0100)]
Rollup merge of #57417 - QuietMisdreavus:semi-revert-doctest-parsing, r=GuillaumeGomez

rustdoc: use text-based doctest parsing if a macro is wrapping main

This is a "forward-port" of https://github.com/rust-lang/rust/pull/57019, intended to get https://github.com/rust-lang/rust/issues/56898 on nightly, since it's now fixed on beta (and already worked on stable).

To recap:

* The libsyntax-based doctest parsing now checks to see whether there is a top-level macro invocation in the doctest while it's checking for `fn main` and an `extern crate` statement.
* If it finds a macro invocation and *didn't* find `fn main`, then it performs the older text-based scan to allow doctests like the ones in `allocator_api` to still compile.

A "proper" fix will involve changing how `make_test` works to call it later in the `run_test` function, after the initial steps of compilation have completed. I've filed [a separate issue](https://github.com/rust-lang/rust/issues/57415) for that, though.

5 years agoRollup merge of #57400 - tspiteri:source-serif-pro-it, r=GuillaumeGomez
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:01 +0000 (10:55 +0100)]
Rollup merge of #57400 - tspiteri:source-serif-pro-it, r=GuillaumeGomez

Rustdoc: update Source Serif Pro and replace Heuristica italic

When Source Serif Pro was used to replace Heuristica in #15530, the italic variant was not ready yet, but now it is. This PR updates the Source Serif Pro font files to the [latest release](https://github.com/adobe-fonts/source-serif-pro/releases/tag/2.007R-ro%2F1.007R-it) which includes an italic variant, and replaces Heuristica italic with Source Serif Pro italic.

Fixes #57363.

5 years agoRollup merge of #57368 - petrhosek:cmake-compiler-launcher, r=alexcrichton
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:54:59 +0000 (10:54 +0100)]
Rollup merge of #57368 - petrhosek:cmake-compiler-launcher, r=alexcrichton

Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache

CMake 3.4 and newer which is the required minimum version for LLVM
supports CMAKE_{C,CXX}_COMPILER_LAUNCHER for settting the compiler
launcher such as ccache which doesn't require shifting arguments.

5 years agoRollup merge of #57296 - JosephTLyons:Fix-question-mark-operator-in-stdio-document...
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:54:58 +0000 (10:54 +0100)]
Rollup merge of #57296 - JosephTLyons:Fix-question-mark-operator-in-stdio-document, r=wesleywiser

Fixed the link to the ? operator

I'm working on updating all broken links, but figured I'd break up the pull requests so they are easier to review, versus just one big pull request.

5 years agoRollup merge of #57192 - czipperz:error_trait_doc_cause_to_source, r=wesleywiser
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:54:57 +0000 (10:54 +0100)]
Rollup merge of #57192 - czipperz:error_trait_doc_cause_to_source, r=wesleywiser

Change std::error::Error trait documentation to talk about `source` instead of `cause`

Resolves #57056

5 years agoRollup merge of #57175 - oli-obk:const_let_stabilization, r=nikomatsakis
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:54:56 +0000 (10:54 +0100)]
Rollup merge of #57175 - oli-obk:const_let_stabilization, r=nikomatsakis

Stabilize `let` bindings and destructuring in constants and const fn

r? @Centril

This PR stabilizes the following features in constants and `const` functions:

* irrefutable destructuring patterns (e.g. `const fn foo((x, y): (u8, u8)) { ... }`)
* `let` bindings (e.g. `let x = 1;`)
* mutable `let` bindings (e.g. `let mut x = 1;`)
* assignment (e.g. `x = y`) and assignment operator (e.g. `x += y`) expressions, even where the assignment target is a projection (e.g. a struct field or index operation like `x[3] = 42`)
* expression statements (e.g. `3;`)

This PR does explicitly *not* stabilize:

* mutable references (i.e. `&mut T`)
* dereferencing mutable references
* refutable patterns (e.g. `Some(x)`)
* operations on `UnsafeCell` types (as that would need raw pointers and mutable references and such, not because it is explicitly forbidden. We can't explicitly forbid it as such values are OK as long as they aren't mutated.)
* We are not stabilizing `let` bindings in constants that use `&&` and `||` short circuiting operations. These are treated as `&` and `|` inside `const` and `static` items right now. If we stopped treating them as `&` and `|` after stabilizing `let` bindings, we'd break code like `let mut x = false; false && { x = true; false };`. So to use `let` bindings in constants you need to change `&&` and `||` to `&` and `|` respectively.

5 years agoRollup merge of #57042 - pnkfelix:issue-57038-sidestep-ice-in-fieldplacement-count...
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:54:54 +0000 (10:54 +0100)]
Rollup merge of #57042 - pnkfelix:issue-57038-sidestep-ice-in-fieldplacement-count, r=michaelwoerister

Don't call `FieldPlacement::count` when count is too large

Sidestep ICE in `FieldPlacement::count` by not calling it when count will not fit in host's usize.

(I briefly played with trying to fix this by changing `FieldPlacement::count` to return a `u64`. However, based on how `FieldPlacement` is used, it seems like this would be a largely pointless pursuit... I'm open to counter-arguments, however.)

Fix #57038

5 years agoRollup merge of #56906 - blitzerr:master, r=nikomatsakis
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:54:53 +0000 (10:54 +0100)]
Rollup merge of #56906 - blitzerr:master, r=nikomatsakis

Issue #56905

Adding a map to TypeckTables to get the list of all the Upvars
given a closureID. This is help us get rid of the recurring
pattern in the codebase of iterating over the free vars
using with_freevars.

5 years agoRollup merge of #56425 - scottmcm:redo-vec-set_len-docs, r=Centril
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:54:51 +0000 (10:54 +0100)]
Rollup merge of #56425 - scottmcm:redo-vec-set_len-docs, r=Centril

Redo the docs for Vec::set_len

Inspired by the [recent conversation on IRLO](https://internals.rust-lang.org/t/make-vec-set-len-enforce-the-len-cap-invariant/8927/23?u=scottmcm).

This is just my first stab at this; suggestions welcome.

5 years agoconst_let: --bless with --compare-mode=nll
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:32:27 +0000 (10:32 +0100)]
const_let: --bless with --compare-mode=nll

5 years agomove const_let accepted gate to avoid future conflict.
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:31:52 +0000 (10:31 +0100)]
move const_let accepted gate to avoid future conflict.

5 years agoAuto merge of #57234 - Centril:const-stabilizations-2, r=oli-obk
bors [Sat, 12 Jan 2019 02:00:18 +0000 (02:00 +0000)]
Auto merge of #57234 - Centril:const-stabilizations-2, r=oli-obk

Const-stabilize `const_int_ops` + `const_ip`

r? @oli-obk

## Note for relnotes: This PR includes https://github.com/rust-lang/rust/pull/57105.

I've added T-lang since this affects intrinsics and the operational semantics of Rust's `const fn` fragment.

## Stable APIs proposed for constification

+ `const_int_ops`:
    + `count_ones`
    + `count_zeros`
    + `leading_zeros`
    + `trailing_zeros`
    + `swap_bytes`
    + `from_be`
    + `from_le`
    + `to_be`
    + `to_le`
+ `const_ip`
    + `Ipv4Addr::new`

## Unstable APIs constified

+ `const_int_conversion`:
    + `reverse_bits`

5 years agoAuto merge of #57470 - RalfJung:miri, r=oli-obk
bors [Fri, 11 Jan 2019 16:28:45 +0000 (16:28 +0000)]
Auto merge of #57470 - RalfJung:miri, r=oli-obk

update miri

r? @oli-obk

5 years agoAuto merge of #57355 - arielb1:correct-subst, r=nikomatsakis
bors [Fri, 11 Jan 2019 12:04:24 +0000 (12:04 +0000)]
Auto merge of #57355 - arielb1:correct-subst, r=nikomatsakis

use the correct supertrait substitution in `object_ty_for_trait`

beta-nominating because regression.

Fixes #57156.

5 years agoRemove unneeded but benign change
Oliver Scherer [Fri, 11 Jan 2019 11:19:08 +0000 (12:19 +0100)]
Remove unneeded but benign change

5 years agoAuto merge of #57471 - Aaronepower:master, r=Aaronepower
bors [Fri, 11 Jan 2019 00:20:04 +0000 (00:20 +0000)]
Auto merge of #57471 - Aaronepower:master, r=Aaronepower

Updated RELEASES.md for 1.32.0

[Rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md)

r? @Mark-Simulacrum
cc @rust-lang/release

5 years agoUpdate RELEASES.md
Aaron Power [Thu, 10 Jan 2019 22:28:18 +0000 (23:28 +0100)]
Update RELEASES.md

5 years agoUpdate src/libstd/path.rs
Mazdak Farrokhzad [Thu, 10 Jan 2019 22:08:42 +0000 (17:08 -0500)]
Update src/libstd/path.rs

Co-Authored-By: steveklabnik <steve@steveklabnik.com>
5 years agonote that FromStr does not work for borrowed types
Steve Klabnik [Thu, 10 Jan 2019 20:40:05 +0000 (15:40 -0500)]
note that FromStr does not work for borrowed types

Fixes #47757

5 years agoUpdate RELEASES.md
Aaron Power [Thu, 10 Jan 2019 22:07:38 +0000 (23:07 +0100)]
Update RELEASES.md

5 years agoAuto merge of #57484 - alexcrichton:fix-nightlies, r=Mark-Simulacru
bors [Thu, 10 Jan 2019 21:31:34 +0000 (21:31 +0000)]
Auto merge of #57484 - alexcrichton:fix-nightlies, r=Mark-Simulacru

Integrate miri into build-manifest

This fixes a mistake where miri was accidentally left out of the
build-manifest parsing, meaning that today's nightly generated a
manifest with invalid urls!

Fixes #57488.

5 years agomake note of one more normalization that Paths do
Steve Klabnik [Thu, 10 Jan 2019 20:30:36 +0000 (15:30 -0500)]
make note of one more normalization that Paths do

Fixes #29008

5 years agouse structured suggestion when casting a reference
Andy Russell [Thu, 10 Jan 2019 18:42:59 +0000 (13:42 -0500)]
use structured suggestion when casting a reference

5 years agoIntegrate miri into build-manifest
Alex Crichton [Thu, 10 Jan 2019 01:14:11 +0000 (17:14 -0800)]
Integrate miri into build-manifest

This fixes a mistake where miri was accidentally left out of the
build-manifest parsing, meaning that today's nightly generated a
manifest with invalid urls!

5 years agoApply suggestions from code review
Aaron Power [Thu, 10 Jan 2019 09:08:32 +0000 (10:08 +0100)]
Apply suggestions from code review

Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
5 years agoUpdate RELEASES.md
Aaron Power [Thu, 10 Jan 2019 09:08:07 +0000 (10:08 +0100)]
Update RELEASES.md

5 years agoactually take a slice in this example
Steve Klabnik [Tue, 8 Jan 2019 19:58:29 +0000 (14:58 -0500)]
actually take a slice in this example

Fixes #45678

5 years agoUpdated RELEASES.md for 1.32.0
Aaron Power [Wed, 9 Jan 2019 15:12:12 +0000 (16:12 +0100)]
Updated RELEASES.md for 1.32.0

5 years agoupdate miri
Ralf Jung [Wed, 9 Jan 2019 15:03:01 +0000 (16:03 +0100)]
update miri

5 years agoAuto merge of #57419 - cramertj:pin-set, r=withouboats
bors [Wed, 9 Jan 2019 13:48:37 +0000 (13:48 +0000)]
Auto merge of #57419 - cramertj:pin-set, r=withouboats

Reborrow Pin<P> using &mut in `Pin::set`

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

This makes it possible to call `.set` multiple times without
using `.as_mut()` first to reborrow the pointer.

r? @withoutboats
cc @rust-lang/libs

5 years agoExposing enclave image-base to the enclave application
Vardhan Thigle [Wed, 9 Jan 2019 11:50:37 +0000 (17:20 +0530)]
Exposing enclave image-base to the enclave application

image-base could be used by crates like backtrace to providing to make
symbol resolution easier.

5 years agoRemove outdated comment
king6cong [Wed, 9 Jan 2019 11:42:25 +0000 (19:42 +0800)]
Remove outdated comment

5 years agoAuto merge of #56614 - Zoxc:query-perf2, r=michaelwoerister
bors [Wed, 9 Jan 2019 11:08:14 +0000 (11:08 +0000)]
Auto merge of #56614 - Zoxc:query-perf2, r=michaelwoerister

Replace LockCell with atomic types

Split from https://github.com/rust-lang/rust/pull/56509

r? @michaelwoerister

5 years agoFix irrefutable slice patterns in const fn
Oliver Scherer [Wed, 9 Jan 2019 10:32:56 +0000 (11:32 +0100)]
Fix irrefutable slice patterns in const fn

5 years agoconst fn feature gate is not needed anymore in a lot of tests
Oliver Scherer [Sun, 30 Dec 2018 18:20:53 +0000 (19:20 +0100)]
const fn feature gate is not needed anymore in a lot of tests

5 years agoClarify const_let comment
Oliver Scherer [Sun, 30 Dec 2018 17:57:31 +0000 (18:57 +0100)]
Clarify const_let comment

5 years agoStabilize `let` bindings and destructuring in constants and const fn
Oliver Scherer [Fri, 28 Dec 2018 19:05:22 +0000 (20:05 +0100)]
Stabilize `let` bindings and destructuring in constants and const fn

5 years agoAuto merge of #57086 - oli-obk:miri_dist, r=kennytm
bors [Wed, 9 Jan 2019 06:42:11 +0000 (06:42 +0000)]
Auto merge of #57086 - oli-obk:miri_dist, r=kennytm

Prepare everything for distributing miri via rustup

The next step is to tell rustup about `cargo-miri` in https://github.com/rust-lang/rustup.rs/blob/31935e5f633a5acd3a203d23b61d1556c64a821c/src/rustup/lib.rs#L28 and https://github.com/rust-lang/rustup.rs/blob/1ccd706d1d572c777c5134bd7db7aa1a8df7f278/src/rustup-win-installer/src/lib.rs#L29

5 years agodocs: Fix some 'second-edition' links
Philipp Hansch [Wed, 9 Jan 2019 06:15:52 +0000 (07:15 +0100)]
docs: Fix some 'second-edition' links

5 years agoMerge pull request #1 from Centril/redo-vec-set_len-docs-adjust
scottmcm [Wed, 9 Jan 2019 03:41:32 +0000 (19:41 -0800)]
Merge pull request #1 from Centril/redo-vec-set_len-docs-adjust

Explain safety for `vec.set_len(0)`

5 years agoaddressing Niko's comments
Blitzerr [Wed, 9 Jan 2019 03:13:50 +0000 (19:13 -0800)]
addressing Niko's comments

5 years agoexplain safety for vec.set_len(0)
Mazdak Farrokhzad [Wed, 9 Jan 2019 03:17:24 +0000 (04:17 +0100)]
explain safety for vec.set_len(0)

5 years ago[Cleanup] This is the first in the series of removals of with_freevars usage.
Blitzerr [Sat, 22 Dec 2018 23:06:14 +0000 (15:06 -0800)]
[Cleanup] This is the first in the series of removals of with_freevars usage.

Currently, there are many places in rustc, where we use
with_freevars to iterate over freevars of a closure. The
problem with this is the argument to with_freevars is a
NodeId and this will get in the way of our eventual goal
of solving for issue (#53488), sub-issue (#56905)

5 years agoSome more refactoring.
Blitzerr [Sat, 22 Dec 2018 04:00:11 +0000 (20:00 -0800)]
Some more refactoring.

Change the key of UpvarListMap from DefId to ast::NodeId

5 years agoCreating the vector using with_capacity to avoid re-allocation later on (#56905)
Blitzerr [Wed, 19 Dec 2018 04:54:35 +0000 (20:54 -0800)]
Creating the vector using with_capacity to avoid re-allocation later on (#56905)

5 years agoIssue 56905
Blitzerr [Mon, 17 Dec 2018 01:01:57 +0000 (17:01 -0800)]
Issue 56905

Adding a map to TypeckTables to get the list of all the Upvars
given a closureID. This is help us get rid of the recurring
pattern in the codebase of iterating over the free vars
using with_freevars.

5 years agoConsolidate equality constraints error message
varkor [Tue, 8 Jan 2019 23:53:43 +0000 (23:53 +0000)]
Consolidate equality constraints error message

5 years agoAdd issue reference to E0202 message
varkor [Tue, 8 Jan 2019 23:50:51 +0000 (23:50 +0000)]
Add issue reference to E0202 message

5 years agoChange std::error::Error trait documentation to talk about `source` instead of `cause`
Czipperz [Sat, 29 Dec 2018 07:09:21 +0000 (02:09 -0500)]
Change std::error::Error trait documentation to talk about `source` instead of `cause`

5 years agoAuto merge of #56407 - GuillaumeGomez:missing-docs-reexported-macros, r=varkor
bors [Tue, 8 Jan 2019 22:16:13 +0000 (22:16 +0000)]
Auto merge of #56407 - GuillaumeGomez:missing-docs-reexported-macros, r=varkor

check missing docs for reexported macros as well

Fixes #56334.

5 years agoAuto merge of #56638 - matthewjasper:remove-ref-region, r=nikomatsakis
bors [Tue, 8 Jan 2019 19:33:20 +0000 (19:33 +0000)]
Auto merge of #56638 - matthewjasper:remove-ref-region, r=nikomatsakis

Remove some `Region`s from HAIR

Use `ReErased` for any regions that need to be created in RValue::Ref
in MIR generation. We will change them to all to `ReVar` before borrow
checking anyway.

r? @nikomatsakis

5 years agoUpdate stdsimd submodule
Guillaume Gomez [Mon, 7 Jan 2019 15:20:25 +0000 (16:20 +0100)]
Update stdsimd submodule

5 years agoAuto merge of #57429 - alexcrichton:fix-dist, r=Mark-Simulacrum
bors [Tue, 8 Jan 2019 16:47:27 +0000 (16:47 +0000)]
Auto merge of #57429 - alexcrichton:fix-dist, r=Mark-Simulacrum

Build LLVM with -static-libstdc++ on dist builds

This commit is intended on fixing a regression from #57286 where the
distributed LLVM shared library unfortunately depends on a dynamic copy
of libstdc++, meaning we're no longer as binary compatible as we
thought! This tweaks the build of LLVM as out distribution is slightly
different now, and is hoped to fix the issue.

Closes #57426

5 years agoSupporting backtrace for x86_64-fortanix-unknown-sgx.
Vardhan Thigle [Thu, 3 Jan 2019 05:16:22 +0000 (10:46 +0530)]
Supporting backtrace for x86_64-fortanix-unknown-sgx.

5 years agoMore feature whitelisting of winapi
Oliver Scherer [Mon, 7 Jan 2019 16:17:41 +0000 (17:17 +0100)]
More feature whitelisting of winapi

5 years agoAdjust cargo workspace hack to miri/cargo interactions
Oliver Scherer [Tue, 1 Jan 2019 13:36:05 +0000 (14:36 +0100)]
Adjust cargo workspace hack to miri/cargo interactions

5 years agofixup
Oliver Scherer [Sun, 23 Dec 2018 20:31:45 +0000 (21:31 +0100)]
fixup

5 years agoPrepare everything for distributing miri via rustup
Oliver Scherer [Sun, 23 Dec 2018 20:20:35 +0000 (21:20 +0100)]
Prepare everything for distributing miri via rustup

5 years agoIgnore some IDE-local files
Oliver Scherer [Sun, 23 Dec 2018 20:21:02 +0000 (21:21 +0100)]
Ignore some IDE-local files

5 years agoAuto merge of #57114 - Zoxc:query-perf11, r=michaelwoerister
bors [Tue, 8 Jan 2019 14:11:19 +0000 (14:11 +0000)]
Auto merge of #57114 - Zoxc:query-perf11, r=michaelwoerister

Clean up and optimize OpenTask / read_index

r? @michaelwoerister

5 years agoAuto merge of #56988 - alexcrichton:monotonic-instant, r=sfackler
bors [Tue, 8 Jan 2019 11:30:19 +0000 (11:30 +0000)]
Auto merge of #56988 - alexcrichton:monotonic-instant, r=sfackler

std: Force `Instant::now()` to be monotonic

This commit is an attempt to force `Instant::now` to be monotonic
through any means possible. We tried relying on OS/hardware/clock
implementations, but those seem buggy enough that we can't rely on them
in practice. This commit implements the same hammer Firefox recently
implemented (noted in #56612) which is to just keep whatever the lastest
`Instant::now()` return value was in memory, returning that instead of
the OS looks like it's moving backwards.

Closes #48514
Closes #49281
cc #51648
cc #56560
Closes #56612
Closes #56940

5 years agoAuto merge of #57332 - Dylan-DPC:feature/stabilise-cfg-attr, r=Centril
bors [Tue, 8 Jan 2019 07:49:13 +0000 (07:49 +0000)]
Auto merge of #57332 - Dylan-DPC:feature/stabilise-cfg-attr, r=Centril

stabilize cfg_attr_multi

Stabilizes cfg_attr_multi feature

Related to #54881

Will add the lint in a seperate PR

r? @Centril

5 years agoRemove `CrateNum::Invalid`.
Nicholas Nethercote [Tue, 8 Jan 2019 05:13:22 +0000 (16:13 +1100)]
Remove `CrateNum::Invalid`.

It's unused.

5 years agoAdd link destination for `read-ownership`
Dylan MacKenzie [Tue, 8 Jan 2019 05:03:41 +0000 (21:03 -0800)]
Add link destination for `read-ownership`

5 years agoBuild LLVM with -static-libstdc++ on dist builds
Alex Crichton [Mon, 7 Jan 2019 21:47:35 +0000 (13:47 -0800)]
Build LLVM with -static-libstdc++ on dist builds

This commit is intended on fixing a regression from #57286 where the
distributed LLVM shared library unfortunately depends on a dynamic copy
of libstdc++, meaning we're no longer as binary compatible as we
thought! This tweaks the build of LLVM as out distribution is slightly
different now, and is hoped to fix the issue.

Closes #57426

5 years agoAuto merge of #57095 - Zoxc:prof-fix, r=michaelwoerister
bors [Tue, 8 Jan 2019 02:00:12 +0000 (02:00 +0000)]
Auto merge of #57095 - Zoxc:prof-fix, r=michaelwoerister

Fix and optimize query profiling

r? @michaelwoerister

cc @wesleywiser

5 years agoReborrow Pin<P> using &mut in `Pin::set`
Taylor Cramer [Mon, 7 Jan 2019 19:45:34 +0000 (11:45 -0800)]
Reborrow Pin<P> using &mut in `Pin::set`

This makes it possible to call `.set` multiple times without
using `.as_mut()` first to reborrow the pointer.

5 years agoAuto merge of #57303 - matthiaskrgr:clippy_submodule_upd, r=oli-obk
bors [Mon, 7 Jan 2019 19:44:00 +0000 (19:44 +0000)]
Auto merge of #57303 - matthiaskrgr:clippy_submodule_upd, r=oli-obk

submodules: update clippy and rls

Fixes clippy toolstate

Changes:
````
Update to latest compiletest-rs release
add testcase for #3462
deps: bump rustc_tools_util version from 0.1.0 to 0.1.1 just in case...
rustc_tool_utils: fix failure to create proper non-repo version string when used in crates on crates.io, bump version
UI test cleanup: Extract ifs_same_cond tests
UI test cleanup: Extract for_kv_map lint tests
Fix test for rust-lang/rust#57250
Limit infinite_iter collect() check to known types
Some improvements to util documentation
Use hashset for name blacklist
Reformat random_state tests
Use node_id_to_type_opt instead of node_it_to_type in random_state
Check pattern equality while checking declaration equality
random_state lint
Use an FxHashSet for valid idents in documentation lint
Fix suggestion for unnecessary_ref lint
Update CONTRIBUTING.md for rustfix tests
Update .fixed files via update-references.sh
Run rustfix on first UI test
Use WIP branch for compiletest_rs
````

Also updates RLS and removes the patching of rustc_tool_utils from cargo.toml

RLS changes:
````
update clippy hash and rustc_tools_util and use rustc_tools_util from crates.io
Work around https://github.com/rust-lang/rust/pull/55937
Update Clippy... again
Update Clippy
Update clippy
````
r? @oli-obk

5 years agobless you
dylan_DPC [Sun, 6 Jan 2019 12:07:28 +0000 (17:37 +0530)]
bless you

5 years agoremove unwanted stage0 line, fix style
dylan_DPC [Fri, 4 Jan 2019 17:33:36 +0000 (23:03 +0530)]
remove unwanted stage0 line, fix style

5 years agoremove unused imports and feature gate from tests
dylan_DPC [Fri, 4 Jan 2019 11:51:29 +0000 (17:21 +0530)]
remove unused imports and feature gate from tests

5 years agostabilise cfg_attr
dylan_DPC [Fri, 4 Jan 2019 07:07:27 +0000 (12:37 +0530)]
stabilise cfg_attr

5 years agoRevert "Auto merge of #57101 - o01eg:fix-57014, r=alexcrichton"
Matthias Krüger [Sun, 6 Jan 2019 12:55:15 +0000 (13:55 +0100)]
Revert "Auto merge of #57101 - o01eg:fix-57014, r=alexcrichton"

This reverts commit 68614265d312fc2cbe8a696f7dabb9416eb6f221, reversing
changes made to cae623c5ce12df8f237264d8f2c31fdaa664c382.

Should fix tools on windows.

Reopens #57014

5 years agosubmodules: update rls from 6f5e4bb to 1a6361b
Matthias Krüger [Sat, 5 Jan 2019 14:44:23 +0000 (15:44 +0100)]
submodules: update rls from 6f5e4bb to 1a6361b

Changes:
````
Update Clippy
Move TestFailures when collecting failures
Update languageserver-types to 0.51.1
update clippy hash and rustc_tools_util and use rustc_tools_util from crates.io
Work around https://github.com/rust-lang/rust/pull/55937
Update Clippy... again
Update Clippy
Update clippy
````

5 years agosubmodules: update clippy from 39bd8449 to c63b6349
Matthias Krüger [Sat, 5 Jan 2019 14:40:10 +0000 (15:40 +0100)]
submodules: update clippy from 39bd8449 to c63b6349

Changes:
````
Revert "tests: used_underscore_binding_macro: disable random_state lint."
Revert "Auto merge of #3603 - xfix:random-state-lint, r=phansch"
rustup https://github.com/rust-lang/rust/pull/56837
rustup (don't know the exact PR unfortunately)
Add itertools to integration tests
tests: used_underscore_binding_macro: disable random_state lint.
Trigger `use_self` lint in local macros
Add run-rustfix where it already passes
rustup: https://github.com/rust-lang/rust/pull/55517
Make clippy work with parallel rustc
Add ui/for_kv_map test for false positive in #1279
Update to latest compiletest-rs release
add testcase for #3462
deps: bump rustc_tools_util version from 0.1.0 to 0.1.1 just in case...
Use compiletest's aux-build header instead of include macro
rustc_tool_utils: fix failure to create proper non-repo version string when used in crates on crates.io, bump version
rustfmt
UI test cleanup: Extract ifs_same_cond tests
Extract IteratorFalsePositives into option_helpers.rs
UI test cleanup: Extract for_kv_map lint tests
UI test cleanup: Extract lint from methods.rs test
Fix test for rust-lang/rust#57250
Limit infinite_iter collect() check to known types
Some improvements to util documentation
Use hashset for name blacklist
Reformat random_state tests
Use node_id_to_type_opt instead of node_it_to_type in random_state
Check pattern equality while checking declaration equality
random_state lint
Move constant write checks to temporary_assignment lint
Use an FxHashSet for valid idents in documentation lint
Fix suggestion for unnecessary_ref lint
Update CONTRIBUTING.md for rustfix tests
Update .fixed files via update-references.sh
Run rustfix on first UI test
Use WIP branch for compiletest_rs
````

5 years agoRename some functions
John Kåre Alsaker [Mon, 7 Jan 2019 17:50:51 +0000 (18:50 +0100)]
Rename some functions

5 years agoFix and optimize query profiling
John Kåre Alsaker [Mon, 24 Dec 2018 12:35:37 +0000 (13:35 +0100)]
Fix and optimize query profiling

5 years agosemi-revert libsyntax doctest parsing if a macro is wrapping main
QuietMisdreavus [Thu, 20 Dec 2018 21:10:07 +0000 (15:10 -0600)]
semi-revert libsyntax doctest parsing if a macro is wrapping main

5 years agoAuto merge of #57405 - pietroalbini:rollup, r=pietroalbini
bors [Mon, 7 Jan 2019 17:01:25 +0000 (17:01 +0000)]
Auto merge of #57405 - pietroalbini:rollup, r=pietroalbini

Rollup of 6 pull requests

Successful merges:

 - #57290 (remove outdated comment)
 - #57308 (Make CompileController thread-safe)
 - #57358 (use utf-8 throughout htmldocck)
 - #57369 (Provide the option to use libc++ even on all platforms)
 - #57375 (Add duration constants)
 - #57403 (Make extern ref HTTPS)

Failed merges:

 - #57370 (Support passing cflags/cxxflags/ldflags to LLVM build)

r? @ghost

5 years agostd: Force `Instant::now()` to be monotonic
Alex Crichton [Wed, 19 Dec 2018 18:29:23 +0000 (10:29 -0800)]
std: Force `Instant::now()` to be monotonic

This commit is an attempt to force `Instant::now` to be monotonic
through any means possible. We tried relying on OS/hardware/clock
implementations, but those seem buggy enough that we can't rely on them
in practice. This commit implements the same hammer Firefox recently
implemented (noted in #56612) which is to just keep whatever the lastest
`Instant::now()` return value was in memory, returning that instead of
the OS looks like it's moving backwards.

Closes #48514
Closes #49281
cc #51648
cc #56560
Closes #56612
Closes #56940

5 years agoRollup merge of #57403 - claudijd:tweak_code_of_conduct, r=alexcrichton
Pietro Albini [Mon, 7 Jan 2019 15:25:41 +0000 (16:25 +0100)]
Rollup merge of #57403 - claudijd:tweak_code_of_conduct, r=alexcrichton

Make extern ref HTTPS

Basically, saw an HTTP link and noticed it could be HTTPS.  When visiting the link, the URL pattern changed on the site since last linking, so fixed that too!

5 years agoRollup merge of #57375 - stjepang:duration-constants, r=joshtriplett
Pietro Albini [Mon, 7 Jan 2019 15:25:40 +0000 (16:25 +0100)]
Rollup merge of #57375 - stjepang:duration-constants, r=joshtriplett

Add duration constants

Add constants `SECOND`, `MILLISECOND`, `MICROSECOND`, and `NANOSECOND` to `core::time`.

This will make working with durations more ergonomic. Compare:

```rust
// Convenient, but deprecated function.
thread::sleep_ms(2000);

// The current canonical way to sleep for two seconds.
thread::sleep(Duration::from_secs(2));

// Sleeping using one of the new constants.
thread::sleep(2 * SECOND);
```

5 years agoRollup merge of #57369 - petrhosek:llvm-libcxx, r=alexcrichton
Pietro Albini [Mon, 7 Jan 2019 15:25:38 +0000 (16:25 +0100)]
Rollup merge of #57369 - petrhosek:llvm-libcxx, r=alexcrichton

Provide the option to use libc++ even on all platforms

This is the default on platforms which use libc++ as the default C++
library but this option allows using libc++ on others as well.

5 years agoRollup merge of #57358 - euclio:docck-unicode, r=QuietMisdreavus
Pietro Albini [Mon, 7 Jan 2019 15:25:36 +0000 (16:25 +0100)]
Rollup merge of #57358 - euclio:docck-unicode, r=QuietMisdreavus

use utf-8 throughout htmldocck

This commit improves compatibility with Python 3, which already uses
Unicode throughout.

It also fixes a subtle incompatibility stemming from the use of
`entitydefs`, which contains replacement text _encoded in latin-1_ for
HTML entities. When using Python 3, this would cause `0xa0` to be
incorrectly added to the element tree.

This meant that there was a rustdoc test that would pass under Python 2
but fail under Python 3, due to an incorrect regex match against the
non-breaking space character. This commit triggers that failure in both
versions, and also fixes it.

5 years agoRollup merge of #57308 - Zoxc:controller-sync, r=michaelwoerister
Pietro Albini [Mon, 7 Jan 2019 15:25:35 +0000 (16:25 +0100)]
Rollup merge of #57308 - Zoxc:controller-sync, r=michaelwoerister

Make CompileController thread-safe

5 years agoRollup merge of #57290 - mark-i-m:remove-outdated-comment, r=michaelwoerister
Pietro Albini [Mon, 7 Jan 2019 15:25:33 +0000 (16:25 +0100)]
Rollup merge of #57290 - mark-i-m:remove-outdated-comment, r=michaelwoerister

remove outdated comment

https://github.com/rust-lang/rust/issues/44234 was closed, apparently solved by #45353

r? @michaelwoerister

5 years agoMake extern ref HTTPS
Jonathan Claudius [Mon, 7 Jan 2019 14:52:32 +0000 (09:52 -0500)]
Make extern ref HTTPS

5 years agoAuto merge of #57304 - davidtwco:issue-57280, r=nikomatsakis
bors [Mon, 7 Jan 2019 14:16:27 +0000 (14:16 +0000)]
Auto merge of #57304 - davidtwco:issue-57280, r=nikomatsakis

NLL: Fix bug in associated constant type annotations.

Fixes #57280.

This PR reverses the variance used when relating types from the type
annotation of an associated constant - this matches the behaviour of the
lexical borrow checker and fixes a bug whereby matching a `&'a str`
against a `&'static str` would produce an error.

r? @nikomatsakis

5 years agoUpdate static files code for updated Source Serif Pro font
Trevor Spiteri [Mon, 7 Jan 2019 13:27:50 +0000 (14:27 +0100)]
Update static files code for updated Source Serif Pro font

5 years agoReplace Heuristica with Source Serif Pro italic in rustdoc.css
Trevor Spiteri [Mon, 7 Jan 2019 13:03:46 +0000 (14:03 +0100)]
Replace Heuristica with Source Serif Pro italic in rustdoc.css