Commit graph

88237 commits

Author SHA1 Message Date
Mazdak Farrokhzad
7be2ff3d48
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.
2019-01-12 10:55:01 +01:00
Mazdak Farrokhzad
c6146b2370
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.
2019-01-12 10:54:59 +01:00
Mazdak Farrokhzad
ebbecac538
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.
2019-01-12 10:54:58 +01:00
Mazdak Farrokhzad
40a819b7df
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
2019-01-12 10:54:57 +01:00
Mazdak Farrokhzad
bd8f464877
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.
2019-01-12 10:54:56 +01:00
Mazdak Farrokhzad
017f046c13
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
2019-01-12 10:54:54 +01:00
Mazdak Farrokhzad
53aa8a1ad0
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.
2019-01-12 10:54:53 +01:00
Mazdak Farrokhzad
e69a5cb2d7
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.
2019-01-12 10:54:51 +01:00
Mazdak Farrokhzad
6c623224dc const_let: --bless with --compare-mode=nll 2019-01-12 10:32:27 +01:00
Mazdak Farrokhzad
3dc08ed068 move const_let accepted gate to avoid future conflict. 2019-01-12 10:31:52 +01:00
bors
0c91f3d97f 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`
2019-01-12 02:00:18 +00:00
bors
b43986184b Auto merge of #57470 - RalfJung:miri, r=oli-obk
update miri

r? @oli-obk
2019-01-11 16:28:45 +00:00
bors
88f19a774f 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.
2019-01-11 12:04:24 +00:00
Oliver Scherer
16a4e477d8 Remove unneeded but benign change 2019-01-11 12:19:08 +01:00
bors
729d3f07b4 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
2019-01-11 00:20:04 +00:00
Aaron Power
890a8a45c2
Update RELEASES.md 2019-01-10 23:28:18 +01:00
Aaron Power
359e6bf30b
Update RELEASES.md 2019-01-10 23:07:38 +01:00
bors
c2d381d39d 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.
2019-01-10 21:31:34 +00:00
Alex Crichton
dd326f84fb 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!
2019-01-10 07:53:19 -08:00
Aaron Power
521031f1b8
Apply suggestions from code review
Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
2019-01-10 10:08:32 +01:00
Aaron Power
60677a86bf
Update RELEASES.md 2019-01-10 10:08:07 +01:00
Aaron Power
f82ecff4d1 Updated RELEASES.md for 1.32.0 2019-01-09 16:20:51 +01:00
Ralf Jung
4da3a1cb81 update miri 2019-01-09 16:03:01 +01:00
bors
6ecad33838 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
2019-01-09 13:48:37 +00:00
bors
664c7797f6 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
2019-01-09 11:08:14 +00:00
Oliver Scherer
80262e6040 Fix irrefutable slice patterns in const fn 2019-01-09 11:32:56 +01:00
Oliver Scherer
aef6288d9a const fn feature gate is not needed anymore in a lot of tests 2019-01-09 10:20:44 +01:00
Oliver Scherer
a49acea80d Clarify const_let comment 2019-01-09 10:20:44 +01:00
Oliver Scherer
4b4fc63eb7 Stabilize let bindings and destructuring in constants and const fn 2019-01-09 10:20:12 +01:00
bors
8c97b6ffbf 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 31935e5f63/src/rustup/lib.rs (L28) and 1ccd706d1d/src/rustup-win-installer/src/lib.rs (L29)
2019-01-09 06:42:11 +00:00
scottmcm
986e49da04
Merge pull request #1 from Centril/redo-vec-set_len-docs-adjust
Explain safety for `vec.set_len(0)`
2019-01-08 19:41:32 -08:00
Blitzerr
69e491815d addressing Niko's comments 2019-01-08 19:19:34 -08:00
Mazdak Farrokhzad
5052197e44 explain safety for vec.set_len(0) 2019-01-09 04:17:24 +01:00
Blitzerr
15d8e8fb2b [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)
2019-01-08 17:57:22 -08:00
Blitzerr
7853b780fc Some more refactoring.
Change the key of UpvarListMap from DefId to ast::NodeId
2019-01-08 17:57:22 -08:00
Blitzerr
410b52958d Creating the vector using with_capacity to avoid re-allocation later on (#56905) 2019-01-08 17:57:22 -08:00
Blitzerr
47db51eece 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.
2019-01-08 17:57:22 -08:00
Czipperz
564a24c772 Change std::error::Error trait documentation to talk about source instead of cause 2019-01-08 17:45:54 -05:00
bors
167ceff01e Auto merge of #56407 - GuillaumeGomez:missing-docs-reexported-macros, r=varkor
check missing docs for reexported macros as well

Fixes #56334.
2019-01-08 22:16:13 +00:00
bors
d22fa2d87d 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
2019-01-08 19:33:20 +00:00
Guillaume Gomez
0b272e7400 Update stdsimd submodule 2019-01-08 20:24:15 +01:00
bors
2cb7cdcb36 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
2019-01-08 16:47:27 +00:00
Oliver Scherer
2ab78e195a More feature whitelisting of winapi 2019-01-08 15:21:07 +01:00
Oliver Scherer
edaa1882bb Adjust cargo workspace hack to miri/cargo interactions 2019-01-08 15:21:06 +01:00
Oliver Scherer
f8033a2923 fixup 2019-01-08 15:21:06 +01:00
Oliver Scherer
83530120ea Prepare everything for distributing miri via rustup 2019-01-08 15:21:06 +01:00
Oliver Scherer
67ede4cb7f Ignore some IDE-local files 2019-01-08 15:21:06 +01:00
bors
b8c8f0bdf6 Auto merge of #57114 - Zoxc:query-perf11, r=michaelwoerister
Clean up and optimize OpenTask / read_index

r? @michaelwoerister
2019-01-08 14:11:19 +00:00
bors
2f19f8cec9 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
2019-01-08 11:30:19 +00:00
bors
7ad470c0a6 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
2019-01-08 07:49:13 +00:00