]> git.lizzy.rs Git - rust.git/log
rust.git
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 agoAdd label for invalid literal suffix
Esteban Küber [Sat, 12 Jan 2019 07:37:49 +0000 (23:37 -0800)]
Add label for invalid literal suffix

5 years agoTweak incorrect discriminator value variant error
Esteban Küber [Sat, 12 Jan 2019 07:12:29 +0000 (23:12 -0800)]
Tweak incorrect discriminator value variant error

5 years agoSmall tweaks to parser errors
Esteban Küber [Sat, 12 Jan 2019 06:04:54 +0000 (22:04 -0800)]
Small tweaks to parser errors

5 years agoTweak type argument after assoc type error
Esteban Küber [Sat, 12 Jan 2019 05:45:24 +0000 (21:45 -0800)]
Tweak type argument after assoc type error

5 years agoContinue evaluating after finding incorrect .. in pattern
Esteban Küber [Sat, 12 Jan 2019 05:33:57 +0000 (21:33 -0800)]
Continue evaluating after finding incorrect .. in pattern

5 years agofix test
Esteban Küber [Sat, 12 Jan 2019 05:21:30 +0000 (21:21 -0800)]
fix test

5 years agoContinue evaluating after incorrect float literal
Esteban Küber [Sat, 12 Jan 2019 05:19:44 +0000 (21:19 -0800)]
Continue evaluating after incorrect float literal

5 years agofix tests
Esteban Küber [Sat, 12 Jan 2019 05:07:46 +0000 (21:07 -0800)]
fix tests

5 years agoContinue evaluating after type argument in where clause
Esteban Küber [Sat, 12 Jan 2019 05:05:18 +0000 (21:05 -0800)]
Continue evaluating after type argument in where clause

5 years agoContinue evaluating after missing `for` in `impl Trait for Foo`
Esteban Küber [Sat, 12 Jan 2019 04:05:31 +0000 (20:05 -0800)]
Continue evaluating after missing `for` in `impl Trait for Foo`

5 years agoContinue evaluating after parsing incorrect binary literal
Esteban Küber [Sat, 12 Jan 2019 03:56:41 +0000 (19:56 -0800)]
Continue evaluating after parsing incorrect binary literal

5 years agoContinue parsing after lifetime in incorrect location
Esteban Küber [Sat, 12 Jan 2019 03:41:43 +0000 (19:41 -0800)]
Continue parsing after lifetime in incorrect location

5 years agoContinue parser after trailing type argument attribute
Esteban Küber [Sat, 12 Jan 2019 03:31:45 +0000 (19:31 -0800)]
Continue parser after trailing type argument attribute

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 agore-do docs for core::cmp
Steve Klabnik [Thu, 10 Jan 2019 20:21:01 +0000 (15:21 -0500)]
re-do docs for core::cmp

Fixes #32934

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 agoAddress comments
John Kåre Alsaker [Fri, 11 Jan 2019 03:58:46 +0000 (04:58 +0100)]
Address comments

5 years agoUpdate tests
John Kåre Alsaker [Tue, 1 Jan 2019 18:08:25 +0000 (19:08 +0100)]
Update tests

5 years agoMake more passes incremental
John Kåre Alsaker [Wed, 6 Jun 2018 20:13:52 +0000 (22:13 +0200)]
Make more passes incremental

5 years agoadd test for pub extern crate
DebugSteven [Fri, 11 Jan 2019 02:18:46 +0000 (21:18 -0500)]
add test for pub extern crate

5 years agoinline pub extern crate statements
DebugSteven [Fri, 11 Jan 2019 01:27:44 +0000 (20:27 -0500)]
inline pub extern crate statements

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 agoAdd a fast path for identical regions in lub_concrete_regions
Björn Steinbrink [Thu, 10 Jan 2019 18:28:42 +0000 (19:28 +0100)]
Add a fast path for identical regions in lub_concrete_regions

In functions with lots of region constraint, if the fixed point
iteration converges only slowly, a lot of the var/var constraints will
have equal regions most of the time. Yet, we still perform the LUB
calculation and try to intern the result. Especially the latter incurs
quite some overhead.

This reduces the take taken by the item bodies checking pass for the
unicode_normalization crate by about 75%.

5 years agoDrop "solved" constraints during region expansion
Björn Steinbrink [Wed, 9 Jan 2019 17:40:30 +0000 (18:40 +0100)]
Drop "solved" constraints during region expansion

Once a region has been expanded to cover a fixed region, a corresponding
RegSubVar constraint won't have any effect on the expansion anymore, the
same is true for constraints where the variable on the RHS has already
reached static scope. By removing those constraints from the set that
we're iterating over, we remove a lot of needless overhead in case of
slow convergences (i.e. lots of iterations).

For the unicode_normalization crate, this about cuts the time required
for item_bodies checking in half.

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 agostd: Render large exit codes as hex on Windows
Alex Crichton [Wed, 9 Jan 2019 17:35:09 +0000 (09:35 -0800)]
std: Render large exit codes as hex on Windows

On Windows process exit codes are never signals but rather always 32-bit
integers. Most faults like segfaults and such end up having large
integers used to represent them, like STATUS_ACCESS_VIOLATION being
0xC0000005. Currently, however, when an `ExitStatus` is printed this
ends up getting rendered as 3221225477 which is somewhat more difficult
to debug.

This commit adds a branch in `Display for ExitStatus` on Windows which
handles exit statuses where the high bit is set and prints those exit
statuses as hex instead of with decimals. This will hopefully preserve
the current display for small exit statuses (like `exit code: 22`), but
assist in quickly debugging segfaults/access violations/etc. I've
found at least that the hex codes are easier to search for than decimal.

I wasn't able to find any official documentation saying that all system
exit codes have the high bit set, but I figure it's a good enough
heuristic for now.

5 years agoUpdate Cargo.lock
Hugues de Valon [Thu, 10 Jan 2019 12:42:14 +0000 (12:42 +0000)]
Update Cargo.lock

5 years agoMerge remote-tracking branch 'upstream/master'
Stein Somers [Thu, 10 Jan 2019 11:30:09 +0000 (12:30 +0100)]
Merge remote-tracking branch 'upstream/master'

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 agoprovide suggestion for invalid boolean cast
Andy Russell [Wed, 9 Jan 2019 21:57:49 +0000 (16:57 -0500)]
provide suggestion for invalid boolean cast

Also, don't suggest comparing to zero for non-numeric expressions.

5 years agoFix poor worst case performance of is_disjoint
Stein Somers [Wed, 9 Jan 2019 21:19:54 +0000 (22:19 +0100)]
Fix poor worst case performance of is_disjoint

5 years agoClean up and fix a bug in query plumbing
John Kåre Alsaker [Wed, 9 Jan 2019 01:34:23 +0000 (02:34 +0100)]
Clean up and fix a bug in query plumbing

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 agoclarify resolve typo suggestion
Andy Russell [Wed, 9 Jan 2019 19:11:00 +0000 (14:11 -0500)]
clarify resolve typo suggestion

Include the kind of the binding that we're suggesting, and use a
structured suggestion.

5 years agosave-analysis: Get path def from parent in case there's no def for the path itself.
Emilio Cobos Álvarez [Wed, 9 Jan 2019 16:31:16 +0000 (17:31 +0100)]
save-analysis: Get path def from parent in case there's no def for the path itself.

This fixes #57462.

The relevant part from the hir type collector is:

```
DEBUG 2019-01-09T15:42:58Z: rustc::hir::map::collector: hir_map: NodeId(32) => Entry { parent: NodeId(33), dep_node: 4294967040, node: Expr(expr(32: <Foo>::new)) }
DEBUG 2019-01-09T15:42:58Z: rustc::hir::map::collector: hir_map: NodeId(48) => Entry { parent: NodeId(32), dep_node: 4294967040, node: Ty(type(Foo)) }
DEBUG 2019-01-09T15:42:58Z: rustc::hir::map::collector: hir_map: NodeId(30) => Entry { parent: NodeId(48), dep_node: 4294967040, node: PathSegment(PathSegment { ident: Foo#0, id: Some(NodeId(30)), def: Some(Err), args: None, infer_types: true }) }
DEBUG 2019-01-09T15:42:58Z: rustc::hir::map::collector: hir_map: NodeId(31) => Entry { parent: NodeId(32), dep_node: 4294967040, node: PathSegment(PathSegment { ident: new#0, id: Some(NodeId(31)), def: Some(Err), args: None, infer_types: true }) }
```

We have the right ID when looking for NodeId(31) and try with NodeId(32) (which
is the right thing to look for) from get_path_data, but not for the segments
that we write from `write_sub_paths_truncated`.

Basically `process_path` takes an id which is always the parent, and that we
fall back to in `get_path_data()`, so we get the right result for the last path
segment, but not for the other segments that get written to from
`write_sub_paths_truncated`.

I think we can stop passing the explicit id around to `get_path_data` now, will
consider sending that as a followup.

5 years agoNot seeing the forest because there are too many trees in the way
Oliver Scherer [Wed, 9 Jan 2019 15:34:31 +0000 (16:34 +0100)]
Not seeing the forest because there are too many trees in the way

5 years agoExplain the arguments of the `mk_*_eval_cx` functions
Oliver Scherer [Wed, 9 Jan 2019 15:27:33 +0000 (16:27 +0100)]
Explain the arguments of the `mk_*_eval_cx` functions

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 agoDocument the `mk_*_eval_cx` functions
Oliver Scherer [Wed, 9 Jan 2019 15:08:07 +0000 (16:08 +0100)]
Document the `mk_*_eval_cx` functions

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

5 years agoUpdate cc crate to include Armv8-M changes
Hugues de Valon [Wed, 9 Jan 2019 14:51:22 +0000 (14:51 +0000)]
Update cc crate to include Armv8-M changes

5 years agoReplace Arm GCC to a more recent version
Hugues de Valon [Thu, 3 Jan 2019 13:42:02 +0000 (13:42 +0000)]
Replace Arm GCC to a more recent version

The version included in Ubuntu 16.04 repositories in the dist-various-1
docker, Arm GCC version 4.9, does not support the new Armv8-M
architecture.
This commit adds the team-gcc-arm-embedded PPA to get through APT a
newer version of Arm GCC.

5 years agoAdd dist builder for Armv8-M Mainline
Hugues de Valon [Tue, 18 Dec 2018 16:30:34 +0000 (16:30 +0000)]
Add dist builder for Armv8-M Mainline

This commit adds the Armv8-M Mainline target in the list of targets that
get their dist components built. It also update the build-manifest so
that this target gets also its dist components uploaded.

5 years agoMerge remote-tracking branch 'upstream/master'
Stein Somers [Wed, 9 Jan 2019 14:15:18 +0000 (15:15 +0100)]
Merge remote-tracking branch 'upstream/master'

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 agoMetadataOnlyCodegenBackend: remove `is_inline` call
lqd [Wed, 9 Jan 2019 13:21:46 +0000 (14:21 +0100)]
MetadataOnlyCodegenBackend: remove `is_inline` call

This function has no side effects, and its result is ignored.

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 agoChange `String` to `&'static str` in `ParseResult::Failure`.
Nicholas Nethercote [Wed, 9 Jan 2019 04:16:19 +0000 (15:16 +1100)]
Change `String` to `&'static str` in `ParseResult::Failure`.

This avoids 770,000 allocations when compiling the `html5ever`
benchmark, reducing instruction counts by up to 2%.

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)