]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAlways calculate glob map but only for glob uses
Igor Matuszewski [Sun, 6 Jan 2019 00:22:52 +0000 (01:22 +0100)]
Always calculate glob map but only for glob uses

Previously calculating glob map was *opt-in*, however it did record
node id -> ident use for every use directive. This aims to see if we
can unconditionally calculate the glob map and not regress performance.

5 years agoAuto merge of #56759 - petrochenkov:prestabuni, r=nikomatsakis
bors [Sat, 12 Jan 2019 20:11:36 +0000 (20:11 +0000)]
Auto merge of #56759 - petrochenkov:prestabuni, r=nikomatsakis

Stabilize `uniform_paths`

Address all the things described in https://github.com/rust-lang/rust/issues/56417.

Assign visibilities to `macro_rules` items - `pub` to `macro_export`-ed macros and `pub(crate)` to non-exported macros, these visibilities determine how far these macros can be reexported with `use`.

Prohibit use of reexported inert attributes and "tool modules", after renaming (e.g. `use inline as imported_inline`) their respective tools and even compiler passes won't be able to recognize and properly check them.

Also turn use of uniform paths in 2015 macros into an error, I'd prefer to neither remove nor stabilize them right away because I still want to make some experiments in this area (uniform path fallback was added to 2015 macros used on 2018 edition in https://github.com/rust-lang/rust/pull/56053#issuecomment-441405140).

UPDATE: The last commit also stabilizes the feature `uniform_paths`.

Closes https://github.com/rust-lang/rust/issues/53130
Closes https://github.com/rust-lang/rust/issues/55618
Closes https://github.com/rust-lang/rust/issues/56326
Closes https://github.com/rust-lang/rust/issues/56398
Closes https://github.com/rust-lang/rust/issues/56417
Closes https://github.com/rust-lang/rust/issues/56821
Closes https://github.com/rust-lang/rust/issues/57252
Closes https://github.com/rust-lang/rust/issues/57422

5 years agoFix a hole in generic parameter import future-proofing
Vadim Petrochenkov [Sun, 30 Dec 2018 17:07:43 +0000 (20:07 +0300)]
Fix a hole in generic parameter import future-proofing

Add some tests for buggy derive helpers

5 years agoStabilize `uniform_paths`
Vadim Petrochenkov [Thu, 27 Dec 2018 00:38:43 +0000 (03:38 +0300)]
Stabilize `uniform_paths`

5 years agoresolve: Prohibit use of imported tool modules
Vadim Petrochenkov [Wed, 12 Dec 2018 22:43:44 +0000 (01:43 +0300)]
resolve: Prohibit use of imported tool modules

5 years agoresolve: Prohibit use of imported non-macro attributes
Vadim Petrochenkov [Wed, 12 Dec 2018 01:11:46 +0000 (04:11 +0300)]
resolve: Prohibit use of imported non-macro attributes

5 years agoresolve: Prohibit use of uniform paths in macros originating from 2015 edition
Vadim Petrochenkov [Sun, 9 Dec 2018 19:58:51 +0000 (22:58 +0300)]
resolve: Prohibit use of uniform paths in macros originating from 2015 edition

...while still keeping ambiguity errors future-proofing for uniform paths.
This corner case is not going to be stabilized for 1.32 and needs some more general experiments about retrofitting 2018 import rules to 2015 edition

5 years agoresolve: Assign `pub` and `pub(crate)` visibilities to `macro_rules` items
Vadim Petrochenkov [Sun, 9 Dec 2018 18:49:21 +0000 (21:49 +0300)]
resolve: Assign `pub` and `pub(crate)` visibilities to `macro_rules` items

5 years agoAuto merge of #57542 - Centril:rollup, r=Centril
bors [Sat, 12 Jan 2019 11:22:20 +0000 (11:22 +0000)]
Auto merge of #57542 - Centril:rollup, r=Centril

Rollup of 26 pull requests

Successful merges:

 - #56425 (Redo the docs for Vec::set_len)
 - #56906 (Issue #56905)
 - #57042 (Don't call `FieldPlacement::count` when count is too large)
 - #57175 (Stabilize `let` bindings and destructuring in constants and const fn)
 - #57192 (Change std::error::Error trait documentation to talk about `source` instead of `cause`)
 - #57296 (Fixed the link to the ? operator)
 - #57368 (Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache)
 - #57400 (Rustdoc: update Source Serif Pro and replace Heuristica italic)
 - #57417 (rustdoc: use text-based doctest parsing if a macro is wrapping main)
 - #57433 (Add link destination for `read-ownership`)
 - #57434 (Remove `CrateNum::Invalid`.)
 - #57441 (Supporting backtrace for x86_64-fortanix-unknown-sgx.)
 - #57450 (actually take a slice in this example)
 - #57459 (Reference tracking issue for inherent associated types in diagnostic)
 - #57463 (docs: Fix some 'second-edition' links)
 - #57466 (Remove outdated comment)
 - #57493 (use structured suggestion when casting a reference)
 - #57498 (make note of one more normalization that Paths do)
 - #57499 (note that FromStr does not work for borrowed types)
 - #57505 (Remove submodule step from README)
 - #57510 (Add a profiles section to the manifest)
 - #57511 (Fix undefined behavior)
 - #57519 (Correct RELEASES.md for 1.32.0)
 - #57522 (don't unwrap unexpected tokens in `format!`)
 - #57530 (Fixing a typographical error.)
 - #57535 (Stabilise irrefutable if-let and while-let patterns)

Failed merges:

r? @ghost

5 years agoRollup merge of #57535 - varkor:stabilise-if-while-let-patterns, r=Centril
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:25 +0000 (10:55 +0100)]
Rollup merge of #57535 - varkor:stabilise-if-while-let-patterns, r=Centril

Stabilise irrefutable if-let and while-let patterns

This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495).

This replaces https://github.com/rust-lang/rust/pull/55639, as we want to stabilise this in time for the beta cut-off.

Closes https://github.com/rust-lang/rust/pull/55639.

r? @Centril

5 years agoRollup merge of #57530 - insideoutclub:master, r=estebank
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:24 +0000 (10:55 +0100)]
Rollup merge of #57530 - insideoutclub:master, r=estebank

Fixing a typographical error.

5 years agoRollup merge of #57522 - euclio:format-ice, r=varkor
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:22 +0000 (10:55 +0100)]
Rollup merge of #57522 - euclio:format-ice, r=varkor

don't unwrap unexpected tokens in `format!`

Fixes #57512.

5 years agoRollup merge of #57519 - pthariensflame:patch-2, r=alexcrichton
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:21 +0000 (10:55 +0100)]
Rollup merge of #57519 - pthariensflame:patch-2, r=alexcrichton

Correct RELEASES.md for 1.32.0

The `into_to_from_bytes` feature was stabilized for `i128` and `u128` just like for the other integer types, but they seem to have been missed.

5 years agoRollup merge of #57511 - jethrogb:jb/fix-undef, r=cramertj
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:20 +0000 (10:55 +0100)]
Rollup merge of #57511 - jethrogb:jb/fix-undef, r=cramertj

Fix undefined behavior

From the [`MaybeUninit::get_mut` docs](https://doc.rust-lang.org/std/mem/union.MaybeUninit.html):
> It is up to the caller to guarantee that the the MaybeUninit really is in an initialized state, otherwise this will immediately cause undefined behavior.

r? @joshtriplett

5 years agoRollup merge of #57510 - nrc:manifest-profiles, r=alexcrichton
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:19 +0000 (10:55 +0100)]
Rollup merge of #57510 - nrc:manifest-profiles, r=alexcrichton

Add a profiles section to the manifest

This supports the profiles work for Rustup in a backwards compatible manner.

r? @alexcrichton

5 years agoRollup merge of #57505 - rust-lang:nrc-patch-1, r=alexcrichton
Mazdak Farrokhzad [Sat, 12 Jan 2019 09:55:18 +0000 (10:55 +0100)]
Rollup merge of #57505 - rust-lang:nrc-patch-1, r=alexcrichton

Remove submodule step from README

Since the bootstrap does it now

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 #57532 - Centril:stabilize-2175, r=varkor
bors [Sat, 12 Jan 2019 08:40:17 +0000 (08:40 +0000)]
Auto merge of #57532 - Centril:stabilize-2175, r=varkor

Stabilize #![feature(if_while_or_patterns)]

r? @varkor

Per https://github.com/rust-lang/rust/issues/56212#issue-384085857.
Leading `|` is also accepted per the comment in the stabilization proposal.

5 years agobless ui/while-let
Mazdak Farrokhzad [Sat, 12 Jan 2019 07:59:12 +0000 (08:59 +0100)]
bless ui/while-let

5 years agoStabilise irrefutable if-let and while-let patterns
varkor [Sat, 12 Jan 2019 03:10:59 +0000 (03:10 +0000)]
Stabilise irrefutable if-let and while-let patterns

This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495).

Co-Authored-By: Sebastian Malton <sebastian@malton.name>
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 agostabilize top level or-pats in if/while let.
Mazdak Farrokhzad [Fri, 11 Jan 2019 22:57:04 +0000 (23:57 +0100)]
stabilize top level or-pats in if/while let.

5 years agoFixing a typographical error.
David Sanders [Fri, 11 Jan 2019 21:58:13 +0000 (13:58 -0800)]
Fixing a typographical error.

5 years agoFix new hyperlinks in RELEASES.md
Alexander Ronald Altman [Fri, 11 Jan 2019 19:59:04 +0000 (13:59 -0600)]
Fix new hyperlinks in RELEASES.md

5 years agodon't unwrap unexpected tokens in `format!`
Andy Russell [Fri, 11 Jan 2019 17:40:05 +0000 (12:40 -0500)]
don't unwrap unexpected tokens in `format!`

Fixes #57512.

5 years agoCorrect RELEASES.md for 1.32.0
Alexander Ronald Altman [Fri, 11 Jan 2019 17:06:56 +0000 (11:06 -0600)]
Correct RELEASES.md for 1.32.0

The `into_to_from_bytes` feature was stabilized for `i128` and `u128` just like for the other integer types, but they seem to have been missed.

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 agoFix undefined behavior
Jethro Beekman [Fri, 11 Jan 2019 09:30:08 +0000 (15:00 +0530)]
Fix undefined behavior

5 years agoAdd a profiles section to the manifest
Nick Cameron [Fri, 11 Jan 2019 05:13:45 +0000 (18:13 +1300)]
Add a profiles section to the manifest

5 years agoRemove submodule step from README
Nick Cameron [Fri, 11 Jan 2019 01:27:12 +0000 (14:27 +1300)]
Remove submodule step from README

Since the bootstrap does it now

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.