]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #56120 - SergioBenitez:subspan, r=alexcrichton
kennytm [Fri, 23 Nov 2018 17:31:58 +0000 (01:31 +0800)]
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

5 years agoRollup merge of #56116 - alexcrichton:tarball-calng, r=kennytm
kennytm [Fri, 23 Nov 2018 17:31:57 +0000 (01:31 +0800)]
Rollup merge of #56116 - alexcrichton:tarball-calng, r=kennytm

ci: Download clang/lldb from tarballs

Hopefully will speed up CI slightly!

5 years agoRollup merge of #56097 - ogoffart:union-abi, r=eddyb
kennytm [Fri, 23 Nov 2018 17:31:56 +0000 (01:31 +0800)]
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

5 years agoRollup merge of #56091 - wesleywiser:fix_self_profiler_json, r=petrochenkov
kennytm [Fri, 23 Nov 2018 17:31:54 +0000 (01:31 +0800)]
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

5 years agoRollup merge of #56048 - bjorn3:cg_ssa_sysroot, r=eddyb
kennytm [Fri, 23 Nov 2018 17:31:53 +0000 (01:31 +0800)]
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)

5 years agoRollup merge of #56022 - RalfJung:validate-before-jump, r=oli-obk
kennytm [Fri, 23 Nov 2018 17:31:52 +0000 (01:31 +0800)]
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

5 years agoRollup merge of #55945 - oli-obk:static_assert_arg_type, r=michaelwoerister
kennytm [Fri, 23 Nov 2018 17:31:51 +0000 (01:31 +0800)]
Rollup merge of #55945 - oli-obk:static_assert_arg_type, r=michaelwoerister

Ensure that the argument to `static_assert` is a `bool`

cc @eddyb

5 years agoRollup merge of #55869 - SimonSapin:iterate, r=alexcrichton
kennytm [Fri, 23 Nov 2018 17:31:50 +0000 (01:31 +0800)]
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]);
```

5 years agoRollup merge of #55838 - dralley:fix-cfg-step, r=Kimundi
kennytm [Fri, 23 Nov 2018 17:31:48 +0000 (01:31 +0800)]
Rollup merge of #55838 - dralley:fix-cfg-step, r=Kimundi

Fix #[cfg] for step impl on ranges

```#[cfg(target_pointer_witdth = ...)]``` is misspelled

5 years agoRollup merge of #55767 - tromey:disable-some-pretty-printers, r=alexcrichton
kennytm [Fri, 23 Nov 2018 17:31:47 +0000 (01:31 +0800)]
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.

5 years agoAuto merge of #56184 - matthiaskrgr:clippy, r=oli-obk
bors [Fri, 23 Nov 2018 14:22:04 +0000 (14:22 +0000)]
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

5 years agosubmodules: update clippy from 2f6881c6 to 754b4c07
Matthias Krüger [Fri, 23 Nov 2018 11:52:47 +0000 (12:52 +0100)]
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
````

5 years agoAuto merge of #55808 - estebank:type-arguments, r=petrochenkov
bors [Fri, 23 Nov 2018 11:26:48 +0000 (11:26 +0000)]
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.

5 years agoAuto merge of #54071 - eddyb:alignsssss, r=oli-obk
bors [Fri, 23 Nov 2018 01:02:21 +0000 (01:02 +0000)]
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

5 years agoFix invalid panic setup message
Guillaume Gomez [Thu, 22 Nov 2018 21:17:23 +0000 (22:17 +0100)]
Fix invalid panic setup message

5 years agoDo not point at associated types from other crates
Esteban Küber [Thu, 22 Nov 2018 22:30:33 +0000 (14:30 -0800)]
Do not point at associated types from other crates

This is a somewhat arbitrary restriction in order to be consistent in the
output of the tests regardless of target platform.

5 years agoReword and fix test
Esteban Küber [Fri, 9 Nov 2018 05:43:08 +0000 (21:43 -0800)]
Reword and fix test

5 years agoSuggest correct syntax when writing type arg instead of assoc type
Esteban Küber [Fri, 9 Nov 2018 02:54:34 +0000 (18:54 -0800)]
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>`.

5 years agoPoint at the associated type's def span
Esteban Küber [Fri, 9 Nov 2018 02:14:41 +0000 (18:14 -0800)]
Point at the associated type's def span

5 years agoJoin multiple E0191 errors in the same location under a single diagnostic
Esteban Küber [Fri, 9 Nov 2018 02:11:37 +0000 (18:11 -0800)]
Join multiple E0191 errors in the same location under a single diagnostic

5 years agoPoint at every unexpected lifetime and type argument in E0107
Esteban Küber [Fri, 9 Nov 2018 01:51:13 +0000 (17:51 -0800)]
Point at every unexpected lifetime and type argument in E0107

5 years agoAuto merge of #56143 - nikomatsakis:issue-56128-segment-id-ice-nightly, r=petrochenkov
bors [Thu, 22 Nov 2018 20:29:51 +0000 (20:29 +0000)]
Auto merge of #56143 - nikomatsakis:issue-56128-segment-id-ice-nightly, r=petrochenkov

Issue 56128 segment id ice nightly

Tentative fix for #56128

From what I can tell, the problem is that if you have `pub(super) use foo::{a, b}`, then when we explode the `a` and `b`, the segment ids from the `super` path were not getting cloned. However, once I fixed *that*, then I ran into a problem that the "visibility" node-ids were not present in the final HIR -- this is because the visibility of the "stem" that is returned in this case was getting reset to inherited. I don't *think* it is a problem to undo that, so that the visibility is returned unmodified.

Fixes #55475
Fixes #56128

cc @nrc @petrochenkov

5 years agoMove fake rustc_codegen_ssa dependency from rustc_driver to rustc-main
bjorn3 [Mon, 19 Nov 2018 17:28:44 +0000 (18:28 +0100)]
Move fake rustc_codegen_ssa dependency from rustc_driver to rustc-main

5 years agoAdd rustc_codegen_ssa to sysroot
bjorn3 [Sun, 18 Nov 2018 17:06:31 +0000 (18:06 +0100)]
Add rustc_codegen_ssa to sysroot

5 years agoDisable the self-profiler unless the `-Z self-profile` flag is set
Wesley Wiser [Thu, 22 Nov 2018 17:56:15 +0000 (12:56 -0500)]
Disable the self-profiler unless the `-Z self-profile` flag is set

Related to #51648

5 years agoFix the tracking issue for hash_raw_entry
Steven Fackler [Thu, 22 Nov 2018 16:52:24 +0000 (09:52 -0700)]
Fix the tracking issue for hash_raw_entry

It used to point to the implementation PR.

5 years agoAuto merge of #53586 - eddyb:top-lock, r=alexcrichton
bors [Thu, 22 Nov 2018 15:54:10 +0000 (15:54 +0000)]
Auto merge of #53586 - eddyb:top-lock, r=alexcrichton

Move Cargo.{toml,lock} to the repository root directory.

This should give us back `src/` in errors, panics and debuginfo, for free.

r? @Mark-Simulacrum @alexcrichton cc @michaelwoerister

5 years agoInclude changes from 1.30.1 in release notes
Mark Rousskov [Wed, 7 Nov 2018 02:44:35 +0000 (19:44 -0700)]
Include changes from 1.30.1 in release notes

5 years agoexplain how this works
Niko Matsakis [Thu, 22 Nov 2018 11:48:13 +0000 (06:48 -0500)]
explain how this works

5 years agoonly reset non-restricted visibilities
Niko Matsakis [Thu, 22 Nov 2018 11:41:26 +0000 (06:41 -0500)]
only reset non-restricted visibilities

5 years agostd::str Adapt documentation to reality
Adrian Heine né Lang [Thu, 22 Nov 2018 14:26:16 +0000 (15:26 +0100)]
std::str Adapt documentation to reality

5 years agoAuto merge of #56136 - matthiaskrgr:clippy, r=oli-obk
bors [Thu, 22 Nov 2018 13:07:30 +0000 (13:07 +0000)]
Auto merge of #56136 - matthiaskrgr:clippy, r=oli-obk

submodules: update clippy from f5d868c9 to 2f6881c6

Changes:

````
missed another one in the README
run "util/dev update_lints"
rust-lang-nursery/rust-clippy => rust-lang/rust-clippy
Address 'clippy::single-match' dogfood lint
Fix nit
Address travis CI lint failure
Update trivially_copy_pass_by_ref with Trait stderr output
issue#3318 run trivially_copy_pass_by_ref for traits
Update trivially_copy_pass_by_ref with Trait examples
Fix awkward wording
Document how to lint local Clippy changes with locally built Clippy
Enable rustup clippy to refer to the correct documentation
rustup https://github.com/rust-lang/rust/pull/52591
remove unused allow() attributes, NFC
Add regression test
Don't emit suggestion when inside of a macro
````

fixes clippy toolstate

5 years agosubmodules: update clippy from f5d868c9 to 2f6881c6
Matthias Krüger [Wed, 21 Nov 2018 14:10:05 +0000 (15:10 +0100)]
submodules: update clippy from f5d868c9 to 2f6881c6

````
missed another one in the README
run "util/dev update_lints"
rust-lang-nursery/rust-clippy => rust-lang/rust-clippy
Address 'clippy::single-match' dogfood lint
Fix nit
Address travis CI lint failure
Update trivially_copy_pass_by_ref with Trait stderr output
issue#3318 run trivially_copy_pass_by_ref for traits
Update trivially_copy_pass_by_ref with Trait examples
Fix awkward wording
Document how to lint local Clippy changes with locally built Clippy
Enable rustup clippy to refer to the correct documentation
rustup https://github.com/rust-lang/rust/pull/52591
remove unused allow() attributes, NFC
Add regression test
Don't emit suggestion when inside of a macro
````

5 years agoMove Cargo.{toml,lock} to the repository root directory.
Eduard-Mihai Burtescu [Wed, 22 Aug 2018 02:50:46 +0000 (05:50 +0300)]
Move Cargo.{toml,lock} to the repository root directory.

5 years agoAuto merge of #56155 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Thu, 22 Nov 2018 10:04:41 +0000 (10:04 +0000)]
Auto merge of #56155 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 11 pull requests

Successful merges:

 - #55367 (lint if a private item has doctests)
 - #55485 (Return &T / &mut T in ManuallyDrop Deref(Mut) impl)
 - #55784 (Clarifying documentation for collections::hash_map::Entry::or_insert)
 - #55961 (Fix VecDeque pretty-printer)
 - #55980 (Suggest on closure args count mismatching with pipe span)
 - #56002 (fix #55972: Erroneous self arguments on bare functions emit subpar compilation error)
 - #56063 (Update any.rs documentation using keyword dyn)
 - #56067 (Add SGX target to rustc)
 - #56078 (Fix error message for `-C panic=xxx`.)
 - #56106 (Remove some incorrect doc comments)
 - #56126 (core/benches/num: Add `from_str/from_str_radix()` benchmarks)

Failed merges:

r? @ghost

5 years agoRollup merge of #56126 - Turbo87:bench-parse, r=alexcrichton
Guillaume Gomez [Thu, 22 Nov 2018 09:37:56 +0000 (10:37 +0100)]
Rollup merge of #56126 - Turbo87:bench-parse, r=alexcrichton

core/benches/num: Add `from_str/from_str_radix()` benchmarks

This was extracted from #55973

/cc @alexcrichton

5 years agoRollup merge of #56106 - bjorn3:patch-1, r=alexcrichton
Guillaume Gomez [Thu, 22 Nov 2018 09:37:55 +0000 (10:37 +0100)]
Rollup merge of #56106 - bjorn3:patch-1, r=alexcrichton

Remove some incorrect doc comments

5 years agoRollup merge of #56078 - ehuss:fix-panic-opt-msg, r=alexcrichton
Guillaume Gomez [Thu, 22 Nov 2018 09:37:54 +0000 (10:37 +0100)]
Rollup merge of #56078 - ehuss:fix-panic-opt-msg, r=alexcrichton

Fix error message for `-C panic=xxx`.

Fixes rust-lang/cargo#6334

5 years agoRollup merge of #56067 - jethrogb:jb/sgx-target-spec, r=alexcrichton
Guillaume Gomez [Thu, 22 Nov 2018 09:37:53 +0000 (10:37 +0100)]
Rollup merge of #56067 - jethrogb:jb/sgx-target-spec, r=alexcrichton

Add SGX target to rustc

This adds the `x86_64-fortanix-unknown-sgx` target specification to the Rust compiler. See #56066 for more details about this target.

5 years agoRollup merge of #56063 - 0xrgb:patch-1, r=joshtriplett
Guillaume Gomez [Thu, 22 Nov 2018 09:37:51 +0000 (10:37 +0100)]
Rollup merge of #56063 - 0xrgb:patch-1, r=joshtriplett

Update any.rs documentation using keyword dyn

This will fix #56062.

5 years agoRollup merge of #56002 - Axary:master, r=estebank
Guillaume Gomez [Thu, 22 Nov 2018 09:37:50 +0000 (10:37 +0100)]
Rollup merge of #56002 - Axary:master, r=estebank

fix #55972: Erroneous self arguments on bare functions emit subpar compilation error

#55972

r? @estebank

5 years agoRollup merge of #55980 - csmoe:issue-55891, r=estebank
Guillaume Gomez [Thu, 22 Nov 2018 09:37:49 +0000 (10:37 +0100)]
Rollup merge of #55980 - csmoe:issue-55891, r=estebank

Suggest on closure args count mismatching with pipe span

Closes #55891
r? @estebank

5 years agoRollup merge of #55961 - tromey:Bug-55944-vecdeque, r=nikomatsakis
Guillaume Gomez [Thu, 22 Nov 2018 09:37:48 +0000 (10:37 +0100)]
Rollup merge of #55961 - tromey:Bug-55944-vecdeque, r=nikomatsakis

Fix VecDeque pretty-printer

This fixes the VecDeque pretty-printer to handle cases where
head < tail.
Closes #55944

5 years agoRollup merge of #55784 - meltinglava:master, r=KodrAus
Guillaume Gomez [Thu, 22 Nov 2018 09:37:46 +0000 (10:37 +0100)]
Rollup merge of #55784 - meltinglava:master, r=KodrAus

Clarifying documentation for collections::hash_map::Entry::or_insert

Previous version does not show that or_insert does not insert the passed value, as the passed value was the same value as what was already in the map.

5 years agoRollup merge of #55485 - petertodd:2018-10-manuallydrop-deref, r=TimNN
Guillaume Gomez [Thu, 22 Nov 2018 09:37:45 +0000 (10:37 +0100)]
Rollup merge of #55485 - petertodd:2018-10-manuallydrop-deref, r=TimNN

Return &T / &mut T in ManuallyDrop Deref(Mut) impl

Without this change the generated documentation looks like this:

    fn deref(&self) -> &<ManuallyDrop<T> as Deref>::Target

Returning the actual type directly makes the generated docs more clear:

    fn deref(&self) -> &T

Basically, compare how the impl for `Box<T>` and `ManuallyDrop<T>` looks in this screenshot:

![rust docs for ManuallyDrop as Deref](https://user-images.githubusercontent.com/7042/47673083-fc9dc280-db89-11e8-89b0-c6bde663feef.png)

5 years agoRollup merge of #55367 - GuillaumeGomez:private-item-doc-test-lint, r=QuietMisdreavus
Guillaume Gomez [Thu, 22 Nov 2018 09:37:43 +0000 (10:37 +0100)]
Rollup merge of #55367 - GuillaumeGomez:private-item-doc-test-lint, r=QuietMisdreavus

lint if a private item has doctests

Fixes #55333.

r? @QuietMisdreavus

5 years agoPass additional linker flags when targeting Fuchsia
Petr Hosek [Thu, 22 Nov 2018 08:59:37 +0000 (00:59 -0800)]
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.

5 years agoAuto merge of #53918 - Havvy:doc-sort-by, r=GuillaumeGomez
bors [Thu, 22 Nov 2018 06:50:18 +0000 (06:50 +0000)]
Auto merge of #53918 - Havvy:doc-sort-by, r=GuillaumeGomez

Doc total order requirement of sort(_unstable)_by

I took the definition of what a total order is from the Ord trait
docs. I specifically put "elements of the slice" because if you
have a slice of f64s, but know none are NaN, then sorting by
partial ord is total in this case. I'm not sure if I should give
such an example in the docs or not.

r? @GuillaumeGomez

5 years agoMove a flaky process test out of libstd
Alex Crichton [Thu, 22 Nov 2018 05:56:23 +0000 (21:56 -0800)]
Move a flaky process test out of libstd

This test ensures that everything in `env::vars()` is inherited but
that's not actually true because other tests may add env vars after we
spawn the process, causing the test to be flaky! This commit moves the
test to a run-pass test where it can execute in isolation.

Along the way this removes a lot of the platform specificity of the
test, using iteslf to print the environment instead of a foreign process.

5 years agorustc_target: avoid using AbiAndPrefAlign where possible.
Eduard-Mihai Burtescu [Sat, 8 Sep 2018 22:16:45 +0000 (01:16 +0300)]
rustc_target: avoid using AbiAndPrefAlign where possible.

5 years agoAuto merge of #56147 - petrochenkov:impice, r=nikomatsakis
bors [Thu, 22 Nov 2018 02:40:44 +0000 (02:40 +0000)]
Auto merge of #56147 - petrochenkov:impice, r=nikomatsakis

resolve: Fix some asserts in import validation

The asserts are not actually correct in presence of ambiguity errors.

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

5 years agorustc_target: separate out an individual Align from AbiAndPrefAlign.
Eduard-Mihai Burtescu [Sat, 8 Sep 2018 21:22:22 +0000 (00:22 +0300)]
rustc_target: separate out an individual Align from AbiAndPrefAlign.

5 years agorustc_target: rename abi::Align to AbiAndPrefAlign.
Eduard-Mihai Burtescu [Sat, 8 Sep 2018 19:14:55 +0000 (22:14 +0300)]
rustc_target: rename abi::Align to AbiAndPrefAlign.

5 years agoadd compile-pass annotation
Niko Matsakis [Wed, 21 Nov 2018 23:50:10 +0000 (18:50 -0500)]
add compile-pass annotation

5 years agoAuto merge of #56065 - oli-obk:min_const_fn_loop_ice, r=davidtwco
bors [Wed, 21 Nov 2018 23:24:15 +0000 (23:24 +0000)]
Auto merge of #56065 - oli-obk:min_const_fn_loop_ice, r=davidtwco

Replace the ICEing on const fn loops with an error

fixes #56035

5 years agoresolve: Fix some asserts in import validation
Vadim Petrochenkov [Wed, 21 Nov 2018 22:13:09 +0000 (01:13 +0300)]
resolve: Fix some asserts in import validation

5 years agohack: ignore list-stems for pub lint
Niko Matsakis [Wed, 21 Nov 2018 21:09:17 +0000 (16:09 -0500)]
hack: ignore list-stems for pub lint

5 years agoFix BTreeSet and BTreeMap gdb pretty-printers
Tom Tromey [Wed, 21 Nov 2018 18:35:49 +0000 (11:35 -0700)]
Fix BTreeSet and BTreeMap gdb pretty-printers

The BTreeSet and BTreeMap gdb pretty-printers did not take the node
structure into account, and consequently only worked for shallow sets.
This fixes the problem by iterating over child nodes when needed.

This patch avoids the current approach of implementing some of the
value manipulations in debugger-indepdendent code.  This was done for
convenience: a type lookup was needed for the first time, and there
currently are no lldb formatters for these types.

Closes #55771

5 years agopass vis by shared reference
Niko Matsakis [Wed, 21 Nov 2018 19:24:36 +0000 (14:24 -0500)]
pass vis by shared reference

We are not mutating it now.

5 years agoadd regression test
Niko Matsakis [Wed, 21 Nov 2018 19:20:03 +0000 (14:20 -0500)]
add regression test

5 years agopreserve the original visibility for the "list stem" node
Niko Matsakis [Wed, 21 Nov 2018 20:34:11 +0000 (15:34 -0500)]
preserve the original visibility for the "list stem" node

Without this, the `vis` does not wind up in the tree anywhere, and
then we get ICEs because the node-ids it refers to are not present.
The motivation seemed to be documentation, but `ListStem` HIR nodes
are ignored in rustdoc, from what I can tell.

5 years agoAuto merge of #56134 - oli-obk:clippy_documentation, r=nrc
bors [Wed, 21 Nov 2018 20:26:15 +0000 (20:26 +0000)]
Auto merge of #56134 - oli-obk:clippy_documentation, r=nrc

Forward rust version number to tools

Clippy uses it to identify the correct documentation to point to

cc @Manishearth @nrc

sibling PR in clippy: https://github.com/rust-lang-nursery/rust-clippy/pull/3442

5 years agomacro_literal_matcher: fixes per petrochenkov's review
Dan Aloni [Tue, 20 Nov 2018 07:11:12 +0000 (09:11 +0200)]
macro_literal_matcher: fixes per petrochenkov's review

5 years agoStabilize macro_literal_matcher
Dan Aloni [Mon, 19 Nov 2018 14:32:18 +0000 (16:32 +0200)]
Stabilize macro_literal_matcher

5 years agorenumber segment ids for visibilities whenever we clone them
Niko Matsakis [Wed, 21 Nov 2018 18:36:11 +0000 (13:36 -0500)]
renumber segment ids for visibilities whenever we clone them

5 years agoadd some `debug!` into lowering
Niko Matsakis [Wed, 21 Nov 2018 18:35:54 +0000 (13:35 -0500)]
add some `debug!` into lowering

5 years agotrack the span for each id so that we can give a nice ICE
Niko Matsakis [Wed, 21 Nov 2018 18:35:14 +0000 (13:35 -0500)]
track the span for each id so that we can give a nice ICE

5 years agoAuto merge of #56118 - steveklabnik:update-books, r=alexcrichton
bors [Wed, 21 Nov 2018 15:56:32 +0000 (15:56 +0000)]
Auto merge of #56118 - steveklabnik:update-books, r=alexcrichton

Update books for Rust 2018

This PR:

1. updates all of the books
    * I don't know if @Gankro has further plans for the nomicon or not
2. updates the build process because TRPL is only distributing one edition now
3. fixes up the stdlib links

I think that this passes but it's 3:20 am and so I'm sending it in and will fix up anything i missed in the morning.

/cc @alexcrichton for the big beta backport

5 years agoForward rust version number to tools
Oliver Scherer [Wed, 21 Nov 2018 13:27:30 +0000 (14:27 +0100)]
Forward rust version number to tools

Clippy uses it to identify the correct documentation to point to

5 years agoModify doc to reflect the unsized-locals improvement.
Masaki Hara [Sun, 18 Nov 2018 15:27:16 +0000 (00:27 +0900)]
Modify doc to reflect the unsized-locals improvement.

5 years agoAdd tests for unsized-locals functions stability.
Masaki Hara [Sun, 18 Nov 2018 15:26:05 +0000 (00:26 +0900)]
Add tests for unsized-locals functions stability.

5 years agoAdd tests verifying #50940.
Masaki Hara [Sun, 18 Nov 2018 15:19:14 +0000 (00:19 +0900)]
Add tests verifying #50940.

5 years agoCheck arg/ret sizedness at ExprKind::Path.
Masaki Hara [Sun, 18 Nov 2018 15:18:13 +0000 (00:18 +0900)]
Check arg/ret sizedness at ExprKind::Path.

5 years agoAdd require_type_is_sized_deferred.
Masaki Hara [Sun, 18 Nov 2018 15:15:41 +0000 (00:15 +0900)]
Add require_type_is_sized_deferred.

5 years agoAuto merge of #56117 - petrochenkov:iempty, r=eddyb
bors [Wed, 21 Nov 2018 12:54:10 +0000 (12:54 +0000)]
Auto merge of #56117 - petrochenkov:iempty, r=eddyb

resolve: Make "empty import canaries" invisible from other crates

Empty imports `use prefix::{};` are desugared into `use prefix::{self as _};` to make sure the prefix is checked for privacy/stability/etc.
This caused issues in cross-crate scenarios because gensyms are lost in crate metadata (the `_` is a gensym).

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

5 years agoupdate various stdlib docs
Steve Klabnik [Wed, 21 Nov 2018 00:49:47 +0000 (19:49 -0500)]
update various stdlib docs

5 years agocore/benches/num: Add `from_str/from_str_radix()` benchmarks
Tobias Bieniek [Tue, 13 Nov 2018 12:54:51 +0000 (13:54 +0100)]
core/benches/num: Add `from_str/from_str_radix()` benchmarks

5 years agoAdd x86_64-fortanix-unknown-sgx target to the compiler
Jethro Beekman [Mon, 19 Nov 2018 09:35:28 +0000 (15:05 +0530)]
Add x86_64-fortanix-unknown-sgx target to the compiler

5 years agoAuto merge of #52591 - eddyb:functional-snakes, r=oli-obk
bors [Wed, 21 Nov 2018 08:08:13 +0000 (08:08 +0000)]
Auto merge of #52591 - eddyb:functional-snakes, r=oli-obk

rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.

These are cruft left over from a time when `Foo::default()` didn't "just work".

5 years agorustc: implement and use Default on more types.
Eduard-Mihai Burtescu [Wed, 25 Jul 2018 12:44:06 +0000 (15:44 +0300)]
rustc: implement and use Default on more types.

5 years agorustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.
Eduard-Mihai Burtescu [Sat, 21 Jul 2018 19:15:11 +0000 (22:15 +0300)]
rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.

5 years agoAdd unstable Literal::subspan().
Sergio Benitez [Wed, 21 Nov 2018 05:12:30 +0000 (21:12 -0800)]
Add unstable Literal::subspan().

5 years agoAuto merge of #56032 - petrochenkov:stabecip, r=nikomatsakis
bors [Wed, 21 Nov 2018 02:30:35 +0000 (02:30 +0000)]
Auto merge of #56032 - petrochenkov:stabecip, r=nikomatsakis

Stabilize `extern_crate_item_prelude`

Closes https://github.com/rust-lang/rust/issues/55599

5 years agofix more links
Steve Klabnik [Tue, 20 Nov 2018 23:42:49 +0000 (18:42 -0500)]
fix more links

5 years agofix rustbuild to build all the books
Steve Klabnik [Tue, 20 Nov 2018 19:57:56 +0000 (14:57 -0500)]
fix rustbuild to build all the books

5 years agoupdate books
Steve Klabnik [Tue, 20 Nov 2018 12:40:31 +0000 (07:40 -0500)]
update books

5 years agoresolve: Make "empty import canaries" invisible from other crates
Vadim Petrochenkov [Wed, 21 Nov 2018 00:39:41 +0000 (03:39 +0300)]
resolve: Make "empty import canaries" invisible from other crates

5 years agoci: Download clang/lldb from tarballs
Alex Crichton [Tue, 20 Nov 2018 23:56:19 +0000 (15:56 -0800)]
ci: Download clang/lldb from tarballs

Hopefully will speed up CI slightly!

5 years agoAdd a couple more tests
Vadim Petrochenkov [Tue, 20 Nov 2018 22:28:07 +0000 (01:28 +0300)]
Add a couple more tests

5 years agoStabilize `extern_crate_item_prelude`
Vadim Petrochenkov [Sat, 17 Nov 2018 18:08:00 +0000 (21:08 +0300)]
Stabilize `extern_crate_item_prelude`

5 years agoAuto merge of #56111 - nrc:update, r=kennytm
bors [Tue, 20 Nov 2018 21:06:55 +0000 (21:06 +0000)]
Auto merge of #56111 - nrc:update, r=kennytm

Update RLS and Rustfmt

Re-opening https://github.com/rust-lang/rust/pull/56061

@bors: r=kennytm p=2

5 years agoUpdate RLS and Rustfmt
Nick Cameron [Mon, 19 Nov 2018 04:21:10 +0000 (17:21 +1300)]
Update RLS and Rustfmt

5 years agoAuto merge of #55720 - RalfJung:const-eval-raw, r=oli-obk
bors [Tue, 20 Nov 2018 18:08:12 +0000 (18:08 +0000)]
Auto merge of #55720 - RalfJung:const-eval-raw, r=oli-obk

Make const_eval_raw query return just an AllocId

r? @oli-obk

5 years agoCapitalize
Simon Sapin [Tue, 20 Nov 2018 17:22:26 +0000 (18:22 +0100)]
Capitalize

5 years agoAdd tracking issue for unfold and successors
Simon Sapin [Thu, 15 Nov 2018 13:33:47 +0000 (14:33 +0100)]
Add tracking issue for unfold and successors

5 years agoAdd std::iter::successors
Simon Sapin [Thu, 15 Nov 2018 13:23:20 +0000 (14:23 +0100)]
Add std::iter::successors

5 years ago`Copy` is best avoided on iterators
Simon Sapin [Thu, 15 Nov 2018 13:22:21 +0000 (14:22 +0100)]
`Copy` is best avoided on iterators

5 years agoUnfold<St, F>: Debug without F: Debug
Simon Sapin [Thu, 15 Nov 2018 12:21:25 +0000 (13:21 +0100)]
Unfold<St, F>: Debug without F: Debug

5 years agoAdd std::iter::unfold
Simon Sapin [Sun, 11 Nov 2018 11:13:59 +0000 (12:13 +0100)]
Add std::iter::unfold

5 years agoRemove incorrect doc comment in rustc_mir::monomorphize::item
bjorn3 [Tue, 20 Nov 2018 16:32:46 +0000 (17:32 +0100)]
Remove incorrect doc comment in rustc_mir::monomorphize::item