]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoOptimize match checking
John Kåre Alsaker [Sat, 26 Jan 2019 10:53:42 +0000 (11:53 +0100)]
Optimize match checking

5 years agoAdd an ensure() method to TyCtxt used to ensure queries are run
John Kåre Alsaker [Sat, 26 Jan 2019 10:47:56 +0000 (11:47 +0100)]
Add an ensure() method to TyCtxt used to ensure queries are run

5 years agoImplement a slightly racy `sync::Weak::weak_count`
Jonas Schievink [Mon, 7 Jan 2019 22:35:52 +0000 (23:35 +0100)]
Implement a slightly racy `sync::Weak::weak_count`

5 years agoImplement Weak::{strong_count, weak_count}
Jonas Schievink [Mon, 10 Dec 2018 23:40:39 +0000 (00:40 +0100)]
Implement Weak::{strong_count, weak_count}

5 years agoUse correct CI test image for WASM and NVPTX
Denys Zariaiev [Tue, 29 Jan 2019 20:00:07 +0000 (21:00 +0100)]
Use correct CI test image for WASM and NVPTX

5 years agoProvide PTXLinker with fallback to internal `target-cpu`
Denys Zariaiev [Tue, 29 Jan 2019 19:54:23 +0000 (20:54 +0100)]
Provide PTXLinker with fallback to internal `target-cpu`

5 years agoAuto merge of #57808 - gnzlbg:ustdsimd, r=gnzlbg
bors [Tue, 29 Jan 2019 19:40:51 +0000 (19:40 +0000)]
Auto merge of #57808 - gnzlbg:ustdsimd, r=gnzlbg

Update stdsimd

This is the companion PR to https://github.com/rust-lang-nursery/stdsimd/pull/640

r? @alexcrichton

5 years agoMerge NVPTX and WASM test images into `test-various`
Denys Zariaiev [Tue, 29 Jan 2019 18:06:42 +0000 (19:06 +0100)]
Merge NVPTX and WASM test images into `test-various`

5 years agoAuto merge of #57901 - lqd:issue_57362, r=nikomatsakis
bors [Tue, 29 Jan 2019 16:58:15 +0000 (16:58 +0000)]
Auto merge of #57901 - lqd:issue_57362, r=nikomatsakis

Add information to higher-ranked lifetimes conflicts error messages

Make these errors go through the new "placeholder error" code path, to have self tys displayed and make them hopefully less confusing.

Should fix #57362.

r? @nikomatsakis — so we can iterate on the specific wording you wanted.

5 years agoAttempt to debug 259 exit code on AppVeyor
Alex Crichton [Tue, 29 Jan 2019 15:45:54 +0000 (07:45 -0800)]
Attempt to debug 259 exit code on AppVeyor

Let's try to dig in a bit more and see where this is coming from, it
looks like AppVeyor is also unsure where this is coming from!

5 years agoAuto merge of #57948 - Zoxc:parallel, r=michaelwoerister
bors [Tue, 29 Jan 2019 13:32:13 +0000 (13:32 +0000)]
Auto merge of #57948 - Zoxc:parallel, r=michaelwoerister

Use multiple threads by default. Limits tests to one thread. Do some renaming.

r? @michaelwoerister

5 years agoSGX target: improve panic & exit handling
Jethro Beekman [Tue, 29 Jan 2019 11:40:22 +0000 (17:10 +0530)]
SGX target: improve panic & exit handling

5 years agoUpdate stdsimd
gnzlbg [Mon, 21 Jan 2019 17:42:04 +0000 (18:42 +0100)]
Update stdsimd

5 years agoAuto merge of #57862 - hsivonen:buildneon, r=alexcrichton
bors [Tue, 29 Jan 2019 09:42:13 +0000 (09:42 +0000)]
Auto merge of #57862 - hsivonen:buildneon, r=alexcrichton

Build the standard library for thumbv7neon-unknown-linux-gnueabihf in CI

Using the `dist-armv7-linux` image instead of `dist-various-1` in order to use the ARMv7 toolchain available in `dist-armv7-linux`.

Closes #57030.

5 years agoAuto merge of #57957 - Centril:rollup, r=Centril
bors [Tue, 29 Jan 2019 05:22:51 +0000 (05:22 +0000)]
Auto merge of #57957 - Centril:rollup, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #57045 (Kill remaining uses of mem::uninitialized in libcore, liballoc)
 - #57674 (Avoid erase_regions_ty queries if there are no regions to erase)
 - #57833 (Print a slightly clearer message when failing to launch a thread)
 - #57859 (Fix invalid background color)
 - #57904 (add typo suggestion to unknown attribute error)
 - #57915 (Pretty print `$crate` as `crate` or `crate_name` in more cases)
 - #57950 (Extend E0106, E0261)

Failed merges:

r? @ghost

5 years agoAdjust PTXLinker LTO logic and CLI
Denys Zariaiev [Mon, 28 Jan 2019 22:56:37 +0000 (23:56 +0100)]
Adjust PTXLinker LTO logic and CLI

5 years agoIntroduce into_raw_non_null on Rc and Arc
Dale Wijnand [Sun, 27 Jan 2019 17:03:03 +0000 (17:03 +0000)]
Introduce into_raw_non_null on Rc and Arc

5 years agoRefer to synthetically named lifetimes as "some specific lifetime" rather than "the...
Rémy Rakic [Mon, 28 Jan 2019 22:12:13 +0000 (23:12 +0100)]
Refer to synthetically named lifetimes as "some specific lifetime" rather than "the specific lifetime"

5 years agoRollup merge of #57950 - QuietMisdreavus:lifetime-err-desc, r=estebank
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:49 +0000 (22:25 +0100)]
Rollup merge of #57950 - QuietMisdreavus:lifetime-err-desc, r=estebank

Extend E0106, E0261

This is a reopening of https://github.com/rust-lang/rust/pull/57310 with review comments addressed because the original author has since deleted their fork.

From the author (@purple-ice):

> Added an example that points out hardly obvious mistake one could make when writing impl for a new type.

r? @rust-lang/docs

5 years agoRollup merge of #57915 - petrochenkov:notto-disu, r=zackmdavis
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:48 +0000 (22:25 +0100)]
Rollup merge of #57915 - petrochenkov:notto-disu, r=zackmdavis

Pretty print `$crate` as `crate` or `crate_name` in more cases

So, people do parse output of `--pretty=expanded` (sigh), so covering only the legacy proc-macro case (like it was done in https://github.com/rust-lang/rust/pull/57155) is not enough.

This PRs resolves all `$crate`s produced by macros, so they are all printed in the parseable form `$crate::foo` -> `crate::foo` or `crate_name::foo`.

Fixes https://github.com/rust-lang/rust/issues/38016#issuecomment-455851334
Fixes https://github.com/rust-lang/rust/pull/57155#issuecomment-455807195

5 years agoRollup merge of #57904 - euclio:attribute-typos, r=davidtwco
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:47 +0000 (22:25 +0100)]
Rollup merge of #57904 - euclio:attribute-typos, r=davidtwco

add typo suggestion to unknown attribute error

Provides a suggestion using Levenshtein distance to suggest built-in attributes and attribute macros.

Fixes #49270.

5 years agoRollup merge of #57859 - GuillaumeGomez:fix-background, r=QuietMisdreavus
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:45 +0000 (22:25 +0100)]
Rollup merge of #57859 - GuillaumeGomez:fix-background, r=QuietMisdreavus

Fix invalid background color

As discussed in #57814.

r? @QuietMisdreavus

5 years agoRollup merge of #57833 - jethrogb:jb/thread-spawn-unwrap, r=alexcrichton
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:44 +0000 (22:25 +0100)]
Rollup merge of #57833 - jethrogb:jb/thread-spawn-unwrap, r=alexcrichton

Print a slightly clearer message when failing to launch a thread

As discussed in #46345, the `io::Error` you get when a thread fails to launch is of type `io::ErrorKind::WouldBlock`. This is super uninformative when an arbitrary `thread::spawn` fails somewhere in your code:

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11,
kind: WouldBlock, message: "operation would block" }', src/libcore/result.rs:997:5
```

This PR improves the situation a little bit by using `expect` instead of `unwrap`. I don't consider this a complete fix for #46345 though.

5 years agoRollup merge of #57674 - dotdash:erase_reg, r=varkor
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:42 +0000 (22:25 +0100)]
Rollup merge of #57674 - dotdash:erase_reg, r=varkor

Avoid erase_regions_ty queries if there are no regions to erase

It's overall faster to perform this extra check than to perform the
query, even if the result is already in the query cache.

5 years agoRollup merge of #57045 - RalfJung:kill-more-uninit, r=SimonSapin
Mazdak Farrokhzad [Mon, 28 Jan 2019 21:25:41 +0000 (22:25 +0100)]
Rollup merge of #57045 - RalfJung:kill-more-uninit, r=SimonSapin

Kill remaining uses of mem::uninitialized in libcore, liballoc

Kill remaining uses of mem::uninitialized in libcore and liballoc, and enable a lint that will warn when uses are added again in the future.

To avoid casting raw pointers around (which is always very dangerous because it is not typechecked at all -- it doesn't even get the "same size" sanity check that `transmute` gets), I also added two new functions to `MaybeUninit`:

```rust
    /// Get a pointer to the first contained values.
    pub fn first_ptr(this: &[MaybeUninit<T>]) -> *const T {
        this as *const [MaybeUninit<T>] as *const T
    }

    /// Get a mutable pointer to the first contained values.
    pub fn first_mut_ptr(this: &mut [MaybeUninit<T>]) -> *mut T {
        this as *mut [MaybeUninit<T>] as *mut T
    }
```

I changed some of the existing code to use array-of-`MaybeUninit` instead of `MaybeUninit`-of-array, successfully removing raw pointer casts there as well.

5 years agobootstrap: set toolchain variables on per target basis
Mateusz Mikuła [Mon, 28 Jan 2019 17:40:47 +0000 (18:40 +0100)]
bootstrap: set toolchain variables on per target basis

Using CC, CFLAGS, CXX, CXXFLAGS, AR and RANLIB breaks cross compilation
because host is built first and has correct values. The same
values are incorrect for the target however.

5 years agoFix a comment
John Kåre Alsaker [Mon, 28 Jan 2019 18:24:07 +0000 (19:24 +0100)]
Fix a comment

5 years agoFix CI
John Kåre Alsaker [Mon, 28 Jan 2019 18:22:55 +0000 (19:22 +0100)]
Fix CI

5 years agofix gdb debug printing
Ralf Jung [Mon, 28 Jan 2019 16:33:29 +0000 (17:33 +0100)]
fix gdb debug printing

5 years agoreview comments
QuietMisdreavus [Mon, 28 Jan 2019 15:30:43 +0000 (09:30 -0600)]
review comments

5 years agoUse multiple threads by default. Limits tests to one thread. Do some renaming.
John Kåre Alsaker [Mon, 28 Jan 2019 14:51:47 +0000 (15:51 +0100)]
Use multiple threads by default. Limits tests to one thread. Do some renaming.

5 years agoAuto merge of #55704 - Nemo157:pinned-generators, r=Zoxc
bors [Mon, 28 Jan 2019 14:12:15 +0000 (14:12 +0000)]
Auto merge of #55704 - Nemo157:pinned-generators, r=Zoxc

Use pinning for generators to make trait safe

I'm unsure whether there needs to be any changes to the actual generator transform. Tests are passing so the fact that `Pin<&mut T>` is fundamentally the same as `&mut T` seems to allow it to still work, but maybe there's something subtle here that could go wrong.

This is specified in [RFC 2349 § Immovable generators](https://github.com/rust-lang/rfcs/blob/master/text/2349-pin.md#immovable-generators) (although, since that RFC it has become safe to create an immovable generator, and instead it's unsafe to resume any generator; with these changes both are now safe and instead the unsafety is moved to creating a `Pin<&mut [static generator]>` which there are safe APIs for).

CC #43122

5 years agorename first_mut_ptr -> first_ptr_mut
Ralf Jung [Mon, 28 Jan 2019 11:37:29 +0000 (12:37 +0100)]
rename first_mut_ptr -> first_ptr_mut

5 years agofix typos, improve docs
Ralf Jung [Mon, 28 Jan 2019 10:04:30 +0000 (11:04 +0100)]
fix typos, improve docs

5 years agoAuto merge of #57899 - davidtwco:issue-56685, r=estebank
bors [Mon, 28 Jan 2019 09:52:31 +0000 (09:52 +0000)]
Auto merge of #57899 - davidtwco:issue-56685, r=estebank

Unused variable suggestions apply on all patterns.

Fixes #56685.

This PR extends existing suggestions to prefix unused variable bindings in match arms with an underscore so that it applies to all patterns in a match arm.

r? @estebank
cc @alexcrichton (since you filed the issue)

5 years agoUse warn() for extra diagnostics; with -D warnings this leads to errors
Ralf Jung [Mon, 28 Jan 2019 09:49:11 +0000 (10:49 +0100)]
Use warn() for extra diagnostics; with -D warnings this leads to errors

This is needed to properly respect "deny_warnings = false" in config.toml

5 years agoadd macro for creating uninitialized array
Ralf Jung [Sat, 22 Dec 2018 10:02:06 +0000 (11:02 +0100)]
add macro for creating uninitialized array

5 years agoavoid some raw ptr casts in BTreeMap
Ralf Jung [Fri, 21 Dec 2018 14:10:19 +0000 (15:10 +0100)]
avoid some raw ptr casts in BTreeMap

5 years agoavoid mem::uninitialized in BTreeMap
Ralf Jung [Fri, 21 Dec 2018 10:22:18 +0000 (11:22 +0100)]
avoid mem::uninitialized in BTreeMap

5 years agoBuild the standard library for thumbv7neon-unknown-linux-gnueabihf in CI
Henri Sivonen [Mon, 28 Jan 2019 09:46:41 +0000 (11:46 +0200)]
Build the standard library for thumbv7neon-unknown-linux-gnueabihf in CI

Closes #57030.

5 years agoUnused variable suggestions on all patterns.
David Wood [Fri, 25 Jan 2019 15:56:27 +0000 (16:56 +0100)]
Unused variable suggestions on all patterns.

This commit extends existing suggestions to prefix unused variable
bindings in match arms with an underscore so that it applies to all
patterns in a match arm.

5 years agolibcore: avoid mem::uninitialized and raw ptr casts
Ralf Jung [Fri, 21 Dec 2018 10:08:26 +0000 (11:08 +0100)]
libcore: avoid mem::uninitialized and raw ptr casts

5 years agoliballoc: remove unneeded allow(deprecated)
Ralf Jung [Thu, 20 Dec 2018 21:51:08 +0000 (22:51 +0100)]
liballoc: remove unneeded allow(deprecated)

5 years agolibcore: remove unneeded allow(deprecated)
Ralf Jung [Thu, 20 Dec 2018 21:49:32 +0000 (22:49 +0100)]
libcore: remove unneeded allow(deprecated)

5 years agoAuto merge of #57691 - Zoxc:pass-skip, r=petrochenkov
bors [Mon, 28 Jan 2019 06:32:39 +0000 (06:32 +0000)]
Auto merge of #57691 - Zoxc:pass-skip, r=petrochenkov

Conditionally skip two passes if their related attributes were not found

5 years agoConditionally skip two passes if their related attributes were not found
John Kåre Alsaker [Thu, 17 Jan 2019 06:28:39 +0000 (07:28 +0100)]
Conditionally skip two passes if their related attributes were not found

5 years agoAuto merge of #57910 - Mark-Simulacrum:delete-test, r=petrochenkov
bors [Mon, 28 Jan 2019 03:46:25 +0000 (03:46 +0000)]
Auto merge of #57910 - Mark-Simulacrum:delete-test, r=petrochenkov

Delete long-ignored and useless test

cc @pnkfelix (https://github.com/rust-lang/rust/issues/13745#issuecomment-457599109)

r? @petrochenkov as you re-enabled this test in 21d67c45a3d032b3f0d421e6f882f11ea43d1f9c, https://github.com/rust-lang/rust/pull/55236

5 years agoadd typo suggestion to unknown attribute error
Andy Russell [Fri, 25 Jan 2019 19:29:47 +0000 (14:29 -0500)]
add typo suggestion to unknown attribute error

5 years agoAuto merge of #57442 - oli-obk:lazy_const, r=RalfJung
bors [Mon, 28 Jan 2019 00:46:07 +0000 (00:46 +0000)]
Auto merge of #57442 - oli-obk:lazy_const, r=RalfJung

Simplify `ConstValue::ScalarPair`

While looking at #57432 I realized that some of our types for representing constants are very big. This reduces `LazyConst` to 3/4th of its original size and simplifies some code around slices at the same time.

r? @RalfJung

5 years agoSymbolPathBuffer shallow refactoring
Denys Zariaiev [Mon, 28 Jan 2019 00:16:59 +0000 (01:16 +0100)]
SymbolPathBuffer shallow refactoring

5 years agoNVPTX: by-default use target cpu "sm_30"
Denys Zariaiev [Sun, 27 Jan 2019 22:52:22 +0000 (23:52 +0100)]
NVPTX: by-default use target cpu "sm_30"

5 years agoMark non-static generators as always Unpin
Wim Looman [Wed, 21 Nov 2018 14:32:51 +0000 (15:32 +0100)]
Mark non-static generators as always Unpin

5 years agoTemporary workaround for travis diagnostic difference
Wim Looman [Wed, 7 Nov 2018 18:01:35 +0000 (19:01 +0100)]
Temporary workaround for travis diagnostic difference

5 years agoUpdate generator upvar debug info
Wim Looman [Wed, 7 Nov 2018 09:33:35 +0000 (10:33 +0100)]
Update generator upvar debug info

5 years agoUpdate generator transform and generated function signature
Wim Looman [Tue, 6 Nov 2018 23:11:58 +0000 (00:11 +0100)]
Update generator transform and generated function signature

5 years agoimpl Generator for Pin<Box<Generator>>
Wim Looman [Tue, 6 Nov 2018 18:47:18 +0000 (19:47 +0100)]
impl Generator for Pin<Box<Generator>>

5 years agoMark static generators as !Unpin
Wim Looman [Sun, 4 Nov 2018 21:07:55 +0000 (22:07 +0100)]
Mark static generators as !Unpin

5 years agoChange generator trait to use pinning
Wim Looman [Thu, 4 Oct 2018 18:49:38 +0000 (20:49 +0200)]
Change generator trait to use pinning

5 years agoAuto merge of #56932 - clarcharr:iter_refactor, r=Centril
bors [Sun, 27 Jan 2019 20:50:17 +0000 (20:50 +0000)]
Auto merge of #56932 - clarcharr:iter_refactor, r=Centril

Refactor core::iter module

A while back, I refactored `core::ops` in #42523 because the module had become a giant mess and was difficult to modify. Now, I'm doing the same with the `core::iter` module.

Like the `core::ops` refactor, things have been split up into multiple commits to make rebasing easier, and so that you can follow changes. Although the diffs are hard to decipher, the only actual code changes I've made in the first few commits are to modify exports and imports. I save all of the actual code refactoring, e.g. modifying what methods are called, for the end.

5 years ago`ConstValue::ScalarPair` only needs to represent slices
Oliver Scherer [Tue, 8 Jan 2019 12:49:37 +0000 (13:49 +0100)]
`ConstValue::ScalarPair` only needs to represent slices

5 years agoAdd some size assertions for const eval types
Oliver Scherer [Tue, 8 Jan 2019 11:40:25 +0000 (12:40 +0100)]
Add some size assertions for const eval types

5 years agoFix indentation
Oliver Scherer [Tue, 8 Jan 2019 08:25:06 +0000 (09:25 +0100)]
Fix indentation

5 years agoAuto merge of #57765 - Mark-Simulacrum:bootstrap-bump, r=alexcrichton
bors [Sun, 27 Jan 2019 18:18:17 +0000 (18:18 +0000)]
Auto merge of #57765 - Mark-Simulacrum:bootstrap-bump, r=alexcrichton

Bump bootstrap compiler to 1.33 beta

r? @alexcrichton or @pietroalbini

cc @rust-lang/release

5 years agoUpdate comment in test which has changed its purpose
Mark Rousskov [Sat, 26 Jan 2019 01:44:50 +0000 (18:44 -0700)]
Update comment in test which has changed its purpose

5 years agoUpdate cargo to fix deprecation warnings
Mark Rousskov [Sun, 27 Jan 2019 15:43:30 +0000 (08:43 -0700)]
Update cargo to fix deprecation warnings

Implemented in rust-lang/cargo#6600

5 years agoAuto merge of #57826 - danielhenrymantilla:master, r=Centril
bors [Sun, 27 Jan 2019 15:33:45 +0000 (15:33 +0000)]
Auto merge of #57826 - danielhenrymantilla:master, r=Centril

Fixed Deref coercion explanation for DerefMut using shared references

5 years agoEnable CI for `nvptx64-nvidia-cuda`
Denys Zariaiev [Thu, 24 Jan 2019 00:13:52 +0000 (01:13 +0100)]
Enable CI for `nvptx64-nvidia-cuda`

5 years agoCreate `nvptx64-nvidia-cuda` target specification
Denys Zariaiev [Sat, 19 Jan 2019 20:59:34 +0000 (21:59 +0100)]
Create `nvptx64-nvidia-cuda` target specification

5 years agoFix stray typo
Rémy Rakic [Sat, 26 Jan 2019 20:39:47 +0000 (21:39 +0100)]
Fix stray typo

5 years agoExtract the notes explaining the placeholder region errors to a helper fn
Rémy Rakic [Sat, 26 Jan 2019 20:32:09 +0000 (21:32 +0100)]
Extract the notes explaining the placeholder region errors to a helper fn

5 years agoWhen mentioning lifetimes, put either the trait ref or the self type closer to the...
Rémy Rakic [Sat, 26 Jan 2019 19:25:36 +0000 (20:25 +0100)]
When mentioning lifetimes, put either the trait ref or the self type closer to the lifetimes

When mentioning lifetimes, only invert wording between the expected trait and the self type when the self type has the vid.
This way, the lifetimes always stay close to the self type or trait ref that actually contains them.

5 years agoFix issue-57362-1.rs attributes
Rémy Rakic [Fri, 25 Jan 2019 22:37:56 +0000 (23:37 +0100)]
Fix issue-57362-1.rs attributes

5 years agocomment the pattern
Niko Matsakis [Fri, 25 Jan 2019 20:43:36 +0000 (15:43 -0500)]
comment the pattern

5 years agoidentify when implemented for "some specific lifetime"
Niko Matsakis [Fri, 25 Jan 2019 20:23:13 +0000 (15:23 -0500)]
identify when implemented for "some specific lifetime"

5 years agoadd a lot more `debug!` to `try_report_placeholders_trait`
Niko Matsakis [Fri, 25 Jan 2019 19:54:42 +0000 (14:54 -0500)]
add a lot more `debug!` to `try_report_placeholders_trait`

5 years agobreak apart tests
Niko Matsakis [Fri, 25 Jan 2019 19:53:59 +0000 (14:53 -0500)]
break apart tests

5 years agoTest new placeholder error messages in previously untested combinations
Remy Rakic [Fri, 25 Jan 2019 18:35:35 +0000 (19:35 +0100)]
Test new placeholder error messages in previously untested combinations

5 years agoUpdate test expectations for new placeholder error messages
Remy Rakic [Fri, 25 Jan 2019 18:17:38 +0000 (19:17 +0100)]
Update test expectations for new placeholder error messages

5 years agoUpdate two E308 tests to the new placeholder error
lqd [Fri, 25 Jan 2019 18:04:26 +0000 (19:04 +0100)]
Update two E308 tests to the new placeholder error

5 years agoTry to reword placeholder error messages to make them clearer
lqd [Fri, 25 Jan 2019 18:02:38 +0000 (19:02 +0100)]
Try to reword placeholder error messages to make them clearer

5 years agoTry to resolve type vars in the placeholder errors trait refs
lqd [Fri, 25 Jan 2019 17:39:51 +0000 (18:39 +0100)]
Try to resolve type vars in the placeholder errors trait refs

These can sometimes be unresolved: some of the rustc UI tests show this.

5 years agoHandle higher-ranked lifetime conflict errors where the subtype is the `sup` region
lqd [Fri, 25 Jan 2019 17:35:47 +0000 (18:35 +0100)]
Handle higher-ranked lifetime conflict errors where the subtype is the `sup` region

These are happening since the switch to universes, and will now go through the "placeholder error" path, instead of the current fallback of E308 "mismatched types" errors.

5 years agoMake NiceRegionError use the `InferCtxt` instead of its `TyCtxt`
lqd [Fri, 25 Jan 2019 17:22:44 +0000 (18:22 +0100)]
Make NiceRegionError use the `InferCtxt` instead of its `TyCtxt`

Some errors (e.g placeholder errors) have unresolved type vars so this will allow to use `resolve_type_vars_if_possible` when needed.

5 years agoAuto merge of #57927 - Alexendoo:mem-drop-nll-docs, r=Centril
bors [Sun, 27 Jan 2019 09:19:00 +0000 (09:19 +0000)]
Auto merge of #57927 - Alexendoo:mem-drop-nll-docs, r=Centril

Remove lexical scope examples from std::mem::drop

The example no longer produces an error in the 2018 edition

5 years agoAuto merge of #57907 - euclio:applicability-rename, r=estebank
bors [Sun, 27 Jan 2019 06:35:51 +0000 (06:35 +0000)]
Auto merge of #57907 - euclio:applicability-rename, r=estebank

remove deprecated suggestion functions

This PR removes the (now unused) deprecated suggestion functions and removes `_with_applicability` from their replacements' names.

This PR will break clippy, but I'll open a clippy PR once this is merged.

5 years agoremove `_with_applicability` from suggestion fns
Andy Russell [Fri, 25 Jan 2019 21:03:27 +0000 (16:03 -0500)]
remove `_with_applicability` from suggestion fns

5 years agodocument `Applicability`
Andy Russell [Fri, 25 Jan 2019 19:56:27 +0000 (14:56 -0500)]
document `Applicability`

5 years agoAuto merge of #57925 - fintelia:riscv-cas, r=nagisa
bors [Sun, 27 Jan 2019 03:57:54 +0000 (03:57 +0000)]
Auto merge of #57925 - fintelia:riscv-cas, r=nagisa

Enable RISC-V atomic compare and swap

Fixes #56564

5 years agoAuto merge of #57871 - Mark-Simulacrum:fix-compiletest-stamp, r=oli-obk
bors [Sun, 27 Jan 2019 00:07:53 +0000 (00:07 +0000)]
Auto merge of #57871 - Mark-Simulacrum:fix-compiletest-stamp, r=oli-obk

Correctly set filetime for copied LLVM

This also makes compiletest no longer always retest everything.

Fixes #57864

5 years agoReplace deprecated ATOMIC_INIT consts
Mark Rousskov [Sat, 26 Jan 2019 16:14:49 +0000 (09:14 -0700)]
Replace deprecated ATOMIC_INIT consts

5 years agoRemove lexical scope examples from std::mem::drop
Alex Macleod [Sat, 26 Jan 2019 21:52:20 +0000 (21:52 +0000)]
Remove lexical scope examples from std::mem::drop

The example no longer produces an error in the 2018 edition

5 years agoEnable RISC-V atomic compare and swap
Jonathan Behrens [Sat, 26 Jan 2019 21:42:42 +0000 (16:42 -0500)]
Enable RISC-V atomic compare and swap

5 years agoAuto merge of #57918 - Centril:rollup, r=Centril
bors [Sat, 26 Jan 2019 18:14:46 +0000 (18:14 +0000)]
Auto merge of #57918 - Centril:rollup, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #57407 (Stabilize extern_crate_self)
 - #57703 (Make MutexGuard's Debug implementation more useful.)
 - #57764 (Fix some minor warnings)
 - #57825 (un-deprecate mem::zeroed)
 - #57827 (Ignore aarch64 in simd-intrinsic-generic-reduction)
 - #57908 (resolve: Fix span arithmetics in the import conflict error)
 - #57913 (Change crate-visibility-modifier issue number in The Unstable Book)

Failed merges:

r? @ghost

5 years agouse `SOURCE_DATE_EPOCH` for man page time if set
Andy Russell [Sat, 26 Jan 2019 17:54:09 +0000 (12:54 -0500)]
use `SOURCE_DATE_EPOCH` for man page time if set

5 years agoRollup merge of #57913 - h-michael:fix-crate-visibility-modifier-issue-number, r...
Mazdak Farrokhzad [Sat, 26 Jan 2019 17:21:49 +0000 (18:21 +0100)]
Rollup merge of #57913 - h-michael:fix-crate-visibility-modifier-issue-number, r=Centril

Change crate-visibility-modifier issue number in The Unstable Book

#45388 is closed.
Because, it's duplicate issue of #53120.

5 years agoRollup merge of #57908 - petrochenkov:errepice, r=estebank
Mazdak Farrokhzad [Sat, 26 Jan 2019 17:21:47 +0000 (18:21 +0100)]
Rollup merge of #57908 - petrochenkov:errepice, r=estebank

resolve: Fix span arithmetics in the import conflict error

https://github.com/rust-lang/rust/pull/56937 rebased and fixed

Fixes https://github.com/rust-lang/rust/issues/56411
Fixes https://github.com/rust-lang/rust/issues/57071
Fixes https://github.com/rust-lang/rust/issues/57787

r? @estebank

5 years agoRollup merge of #57827 - parched:ignore, r=nikomatsakis
Mazdak Farrokhzad [Sat, 26 Jan 2019 17:21:46 +0000 (18:21 +0100)]
Rollup merge of #57827 - parched:ignore, r=nikomatsakis

Ignore aarch64 in simd-intrinsic-generic-reduction

This fails on AArch64 see https://github.com/rust-lang/rust/issues/54510

Disabling it for now until it's fixed/implemented in LLVM

cc @gnzlbg

5 years agoRollup merge of #57825 - RalfJung:zeroed, r=nikomatsakis
Mazdak Farrokhzad [Sat, 26 Jan 2019 17:21:45 +0000 (18:21 +0100)]
Rollup merge of #57825 - RalfJung:zeroed, r=nikomatsakis

un-deprecate mem::zeroed

as per the discussion around <https://github.com/rust-lang/rust/issues/53491#issuecomment-451454793>

5 years agoRollup merge of #57764 - Xanewok:tiny-tweaks, r=nikomatsakis
Mazdak Farrokhzad [Sat, 26 Jan 2019 17:21:44 +0000 (18:21 +0100)]
Rollup merge of #57764 - Xanewok:tiny-tweaks, r=nikomatsakis

Fix some minor warnings

Since apparently RLS works when initialized in the root repository (:tada:) I decided to fix some of the issues it caught.

There are a lot of unused attribute warnings left on `rustc_on_unimplemented` and `rustc_layout_scalar_valid_range_start` but I imagine we can't do much about it due to 2-stage compilation?

5 years agoRollup merge of #57703 - m-ou-se:mutexguard-debug, r=cramertj
Mazdak Farrokhzad [Sat, 26 Jan 2019 17:21:42 +0000 (18:21 +0100)]
Rollup merge of #57703 - m-ou-se:mutexguard-debug, r=cramertj

Make MutexGuard's Debug implementation more useful.

Fixes #57702.