Commit Graph

87190 Commits

Author SHA1 Message Date
Oliver Scherer
98cd2ad4ea Move some methods from Memory to Allocation 2018-11-24 11:36:31 +01:00
Guillaume Gomez
e87f8cc49b Source sidebar improvements 2018-11-24 09:49:57 +01:00
Guillaume Gomez
93520d2ad1 Add source file sidebar 2018-11-24 09:49:57 +01:00
scalexm
4478dced47 Fix NLL ui test 2018-11-24 01:24:40 +01:00
scalexm
c0f98e8390 Fix ChalkInferenceContext::into_hh_goal 2018-11-24 01:24:40 +01:00
scalexm
5b2baa8336 Implement some instantiate / canonical routines 2018-11-24 01:24:40 +01:00
scalexm
95861b1590 Move BoundTy debruijn index to the TyKind enum variant 2018-11-24 01:24:40 +01:00
scalexm
6bf17d249b Instantiate all bound vars universally 2018-11-24 01:24:40 +01:00
scalexm
cdb96be11e Handle placeholder types in canonicalization 2018-11-24 01:24:40 +01:00
scalexm
91623ca640 Add HAS_TY_PLACEHOLDER flag 2018-11-24 01:24:40 +01:00
scalexm
da3def3ebf Rename some occurences of skol to placeholder 2018-11-24 01:24:40 +01:00
scalexm
05995a8522 Introduce TyKind::Placeholder variant 2018-11-24 01:24:40 +01:00
scalexm
7401e3def5 Distinguish between placeholder kinds 2018-11-24 01:24:40 +01:00
Esteban Küber
d011313d84 Reword EOF in macro arm message 2018-11-23 15:49:31 -08:00
Esteban Küber
950a3edf27 Fix proc-macro test after internal API change 2018-11-23 15:37:31 -08:00
Esteban Küber
c45871ba02 Keep label on moved spans and point at macro invocation on parse error 2018-11-23 15:37:31 -08:00
Esteban Küber
76449d86c0 Point at macro arm when it doesn't expand to an expression 2018-11-23 15:37:31 -08:00
Esteban Küber
e5cd1edfa1 Reword incorrect macro invocation primary label 2018-11-23 15:37:31 -08:00
Esteban Küber
34bd86a3fd Add label when replacing primary DUMMY_SP in macro expansion 2018-11-23 15:37:31 -08:00
Esteban Küber
ea9ccb6046 Point at end of macro arm when encountering EOF
Fix #52866
2018-11-23 15:37:31 -08:00
bors
4632cf2a2e Auto merge of #55935 - alexcrichton:vs2017, r=Mark-Simulacrum
appveyor: Use VS2017 for all our images

This was [recommended by AppVeyor][1] to see if it has any impact on our
build times, hopefully on the beneficial side of things! This shouldn't
affect our binary compatibility for generated compilers like it would
normally do for Linux.

[1]: https://help.appveyor.com/discussions/questions/29832-did-recent-changes-apply-to-possibly-slow-down-builds#comment_46484879
2018-11-23 23:12:11 +00:00
Ralf Jung
59786b020b use more inlining, and force some of it 2018-11-23 22:52:18 +01:00
Ralf Jung
5e27ee76b6 use MaybeUninit in core::ptr::swap_nonoverlapping_bytes
Code by @japaric, I just split it into individual commits
2018-11-23 22:50:20 +01:00
Ralf Jung
3fb03d0650 use MaybeUninit in core::ptr::swap
Code by @japaric, I just split it into individual commits
2018-11-23 22:50:20 +01:00
Ralf Jung
0bb2e2d6d4 use MaybeUninit in core::ptr::{read,read_unaligned}
Code by @japaric, I just split it into individual commits
2018-11-23 22:50:20 +01:00
Ralf Jung
525e8f4368 use MaybeUninit in core::slice::rotate
Code by @japaric, I just split it into individual commits
2018-11-23 22:50:20 +01:00
Ralf Jung
f950c2cbd5 use MaybeUninit in core::slice::sort
Code by @japaric, I just split it into individual commits
2018-11-23 22:50:20 +01:00
Ralf Jung
44c135b6a9 use MaybeUninit in core::fmt
Code by @japaric, I just split it into individual commits
2018-11-23 22:50:20 +01:00
Corey Farwell
ebb1a48b41
Merge branch 'master' into frewsxcv-dyn 2018-11-23 14:09:08 -05:00
bors
1f57e48411 Auto merge of #56186 - kennytm:rollup, r=kennytm
Rollup of 14 pull requests

Successful merges:

 - #55767 (Disable some pretty-printers when gdb is rust-enabled)
 - #55838 (Fix #[cfg] for step impl on ranges)
 - #55869 (Add std::iter::unfold)
 - #55945 (Ensure that the argument to `static_assert` is a `bool`)
 - #56022 (When popping in CTFE, perform validation before jumping to next statement to have a better span for the error)
 - #56048 (Add rustc_codegen_ssa to sysroot)
 - #56091 (Fix json output in the self-profiler)
 - #56097 (Fix invalid bitcast taking bool out of a union represented as a scalar)
 - #56116 (ci: Download clang/lldb from tarballs)
 - #56120 (Add unstable Literal::subspan().)
 - #56154 (Pass additional linker flags when targeting Fuchsia)
 - #56162 (std::str Adapt documentation to reality)
 - #56163 ([master] Backport 1.30.1 release notes)
 - #56168 (Fix the tracking issue for hash_raw_entry)

Failed merges:

r? @ghost
2018-11-23 18:42:20 +00:00
kennytm
36189a2739
Rollup merge of #56168 - sfackler:raw-entry-tracking, r=kennytm
Fix the tracking issue for hash_raw_entry

It used to point to the implementation PR.
2018-11-24 01:32:03 +08:00
kennytm
a56b0ab4be
Rollup merge of #56163 - pietroalbini:1.30.1-relnotes-master, r=pietroalbini
[master] Backport 1.30.1 release notes

Fixes #56135

r? @ghost
2018-11-24 01:32:02 +08:00
kennytm
69d4901846
Rollup merge of #56162 - adrianheine:patch-1, r=withoutboats
std::str Adapt documentation to reality
2018-11-24 01:32:01 +08:00
kennytm
c9870a4fe7
Rollup merge of #56154 - petrhosek:fuchsia-linker-args, r=alexcrichton
Pass additional linker flags when targeting Fuchsia

This is a follow up to 8aa9267 which changed the driver to use lld
directly rather than invoking it through Clang. This change ensures
we pass all the necessary flags to lld.
2018-11-24 01:31:59 +08:00
kennytm
bf72971abc
Rollup merge of #56120 - SergioBenitez:subspan, r=alexcrichton
Add unstable Literal::subspan().

Take 2 of #55971. Still ~wrong, but now with a comment! (and less of a surface) Unblocks #49219.

r? @alexcrichton
2018-11-24 01:31:58 +08:00
kennytm
97e6007932
Rollup merge of #56116 - alexcrichton:tarball-calng, r=kennytm
ci: Download clang/lldb from tarballs

Hopefully will speed up CI slightly!
2018-11-24 01:31:57 +08:00
kennytm
e0025df3fd
Rollup merge of #56097 - ogoffart:union-abi, r=eddyb
Fix invalid bitcast taking bool out of a union represented as a scalar

As reported in https://github.com/rust-lang/rust/pull/54668#issuecomment-440186476
2018-11-24 01:31:56 +08:00
kennytm
fb33fa4916
Rollup merge of #56091 - wesleywiser:fix_self_profiler_json, r=petrochenkov
Fix json output in the self-profiler

Fix missing ',' array element separators and convert NaN's to 0.

cc @Mark-Simulacrum
2018-11-24 01:31:54 +08:00
kennytm
1b707f78f5
Rollup merge of #56048 - bjorn3:cg_ssa_sysroot, r=eddyb
Add rustc_codegen_ssa to sysroot

Outside of rustc you are currently unable to use it.

r? @nikomatsakis (because you r+'ed #55627)
2018-11-24 01:31:53 +08:00
kennytm
419a101d9c
Rollup merge of #56022 - RalfJung:validate-before-jump, r=oli-obk
When popping in CTFE, perform validation before jumping to next statement to have a better span for the error

Currently, when validating the return value fails, the span points at the next statement after the call. That does not make much sense.

r? @oli-obk
2018-11-24 01:31:52 +08:00
kennytm
12f6a42f61
Rollup merge of #55945 - oli-obk:static_assert_arg_type, r=michaelwoerister
Ensure that the argument to `static_assert` is a `bool`

cc @eddyb
2018-11-24 01:31:51 +08:00
kennytm
ef2cbec5a6
Rollup merge of #55869 - SimonSapin:iterate, r=alexcrichton
Add std::iter::unfold

This adds an **unstable** ~`std::iter::iterate`~ `std::iter::unfold` function and ~`std::iter::Iterate`~ `std::iter::Unfold` type that trivially wrap a ~`FnMut() -> Option<T>`~ `FnMut(&mut State) -> Option<T>` closure to create an iterator. ~Iterator state can be kept in the closure’s environment or captures.~

This is intended to help reduce amount of boilerplate needed when defining an iterator that is only created in one place. Compare the existing example of the `std::iter` module: (explanatory comments elided)

```rust
struct Counter {
    count: usize,
}

impl Counter {
    fn new() -> Counter {
        Counter { count: 0 }
    }
}

impl Iterator for Counter {
    type Item = usize;

    fn next(&mut self) -> Option<usize> {
        self.count += 1;
        if self.count < 6 {
            Some(self.count)
        } else {
            None
        }
    }
}
```

… with the same algorithm rewritten to use this new API:

```rust
fn counter() -> impl Iterator<Item=usize> {
    std::iter::unfold(0, |count| {
        *count += 1;
        if *count < 6 {
            Some(*count)
        } else {
            None
        }
    })
}
```

-----

This also add unstable `std::iter::successors` which takes an (optional) initial item and a closure that takes an item and computes the next one (its successor).

```rust
let powers_of_10 = successors(Some(1_u16), |n| n.checked_mul(10));
assert_eq!(powers_of_10.collect::<Vec<_>>(), &[1, 10, 100, 1_000, 10_000]);
```
2018-11-24 01:31:50 +08:00
kennytm
738afd4f69
Rollup merge of #55838 - dralley:fix-cfg-step, r=Kimundi
Fix #[cfg] for step impl on ranges

```#[cfg(target_pointer_witdth = ...)]``` is misspelled
2018-11-24 01:31:48 +08:00
kennytm
91bceb8fc2
Rollup merge of #55767 - tromey:disable-some-pretty-printers, r=alexcrichton
Disable some pretty-printers when gdb is rust-enabled

A rust-enabled gdb already knows how to display string slices,
structs, tuples, and enums (and after #54004, the pretty-printers
can't handle enums at all).  This patch disables these pretty-printers
when gdb is rust-enabled.

The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed,
because it does not seem to depend on any behavior of that version of
gdb, and because gdb 7.7 is 4 years old now.
2018-11-24 01:31:47 +08:00
bors
821bad3a5b Auto merge of #56184 - matthiaskrgr:clippy, r=oli-obk
submodules: update clippy from 2f6881c6 to 754b4c07

Changes:
````
rustup https://github.com/rust-lang/rust/pull/54071/
dependencies: update pulldown-cmark from 0.1 to 0.2
s/file_map/source_map
````

r? @oli-obk
2018-11-23 14:22:04 +00:00
Matthias Krüger
2598a7a56d submodules: update clippy from 2f6881c6 to 754b4c07
Changes:
````
rustup https://github.com/rust-lang/rust/pull/54071/
dependencies: update pulldown-cmark from 0.1 to 0.2
s/file_map/source_map
````
2018-11-23 13:05:31 +01:00
bors
aecbcd1ce2 Auto merge of #55808 - estebank:type-arguments, r=petrochenkov
Suggest correct syntax when writing type arg instead of assoc type

- When confusing an associated type with a type argument, suggest the appropriate syntax. Given `Iterator<isize>`, suggest `Iterator<Item = isize>`.
- When encountering multiple missing associated types, emit only one diagnostic.
- Point at associated type def span for context.
- Point at each extra type argument.

Follow up to #48288, fix #20977.
2018-11-23 11:26:48 +00:00
Ralf Jung
7b6ad7a960 make park/unpark example more realistic 2018-11-23 11:04:16 +01:00
bors
6a2d1b4e15 Auto merge of #54071 - eddyb:alignsssss, r=oli-obk
rustc_target: separate out an individual alignment quantity type from Align.

Before this PR, `rustc_target::abi::Align` combined "power-of-two alignment quantity" semantics, with a distinction between ABI (required) and preferred alignment (by having two quantities).

After this PR, `Align` is only *one* such quantity, and a new `AbiAndPrefAlign` type is introduced to hold the pair of ABI and preferred `Align` quantities.

`Align` is used everywhere one quantity is necessary/sufficient, simplifying some of the code in codegen/miri, while `AbiAndPrefAlign` only in layout computation (to propagate preferred alignment).

r? @oli-obk cc @nagisa @RalfJung @nikomatsakis
2018-11-23 01:02:21 +00:00
Guillaume Gomez
4381772695 Fix invalid panic setup message 2018-11-23 00:13:44 +01:00