]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #54308 - dsciarra:issue-22692, r=estebank
kennytm [Mon, 1 Oct 2018 08:12:55 +0000 (16:12 +0800)]
Rollup merge of #54308 - dsciarra:issue-22692, r=estebank

Better user experience when attempting to call associated functions with dot notation

Closes #22692

5 years agoRollup merge of #53784 - tbu-:pr_doc_slice_isize_max, r=RalfJung
kennytm [Mon, 1 Oct 2018 08:12:54 +0000 (16:12 +0800)]
Rollup merge of #53784 - tbu-:pr_doc_slice_isize_max, r=RalfJung

Document that slices cannot be larger than `isize::MAX` bytes

Fixes #53676.

5 years agoAuto merge of #54675 - alexcrichton:defaultlibs, r=varkor
bors [Mon, 1 Oct 2018 03:24:02 +0000 (03:24 +0000)]
Auto merge of #54675 - alexcrichton:defaultlibs, r=varkor

rust: Add a `-C default-linker-libraries` option

This commit adds a new codegen option for the compiler which disables
rustc's passing of `-nodefaultlibs` by default on relevant platforms.
Sometimes Rust is linked with C code which fails to link with
`-nodefaultlibs` and is unnecessarily onerous to get linking correctly
with `-nodefaultlibs`.

An example of this is that when you compile C code with sanitizers and
then pass `-fsanitize=address` to the linker, it's incompatible with
`-nodefaultlibs` also being passed to the linker.

In these situations it's easiest to turn off Rust's default passing of
`-nodefaultlibs`, which was more ideological to start with than
anything! Preserving the default is somewhat important but having this
be opt-in shouldn't cause any breakage.

Closes #54237

5 years agoAuto merge of #54662 - matklad:once-perf, r=alexcrichton
bors [Mon, 1 Oct 2018 00:51:19 +0000 (00:51 +0000)]
Auto merge of #54662 - matklad:once-perf, r=alexcrichton

Fix Once perf regression

Because `call_once` is generic, but `is_completed` is not, we need
`#[inline]` annotation to allow LLVM to inline `is_completed` into
`call_once` in downstream crates.

cc https://github.com/rust-lang/rust/pull/53027/files#r221418859

5 years agoAuto merge of #54650 - eddyb:no-extern's-land, r=alexcrichton
bors [Sun, 30 Sep 2018 22:20:16 +0000 (22:20 +0000)]
Auto merge of #54650 - eddyb:no-extern's-land, r=alexcrichton

Don't lint non-extern-prelude extern crate's in Rust 2018.

Fixes #54381 by silencing the lint telling users to remove `extern crate` when `use` doesn't work.

r? @alexcrichton cc @petrochenkov @nikomatsakis @Centril

5 years agoAuto merge of #53255 - orium:fix-bug-overflow-send, r=arielb1
bors [Sun, 30 Sep 2018 19:41:07 +0000 (19:41 +0000)]
Auto merge of #53255 - orium:fix-bug-overflow-send, r=arielb1

Add a per-tree error cache to the obligation forest

This implements part of what @nikomatsakis mentioned in  https://github.com/rust-lang/rust/pull/30533#issuecomment-170705871:

> 1. If you find that a new obligation is a duplicate of one already in the tree, the proper processing is:
>      * if that other location is your parent, you should abort with a cycle error (or accept it, if coinductive)
>      * if that other location is not an ancestor, you can safely ignore the new obligation

In particular it implements the "if that other location is your parent accept it, if coinductive" part.  This fixes #40827.

I have to say that I'm not 100% confident that this is rock solid.  This is my first pull request :tada:, and I didn't know anything about the trait resolver before this.  In particular I'm not totally sure that comparing predicates is enough (for instance, do we need to compare `param_env` as well?).  Also, I'm not sure what @nikomatsakis mentions [here](https://github.com/rust-lang/rust/issues/30977#issue-127091096), but it might be something that affects this PR:

> In particular, I am wary of getting things wrong around inference variables! We can always add things to the set in their current state, and if unifications occur then the obligation is just kind of out-of-date, but I want to be sure we don't accidentally fail to notice that something is our ancestor. I decided this was subtle enough to merit its own PR.

Anyway, go ahead and review :slightly_smiling_face:.

Ref #30977.

# Performance

We are now copying vectors around, so I decided to do some benchmarking.  A simple benchmark shows that this does not seem to affect performance in a measurable way:

I ran `cargo clean && cargo build` 20 times on actix-web (84b27db) and these are the results:

```text
rustc master:

            Mean        Std.Dev.    Min         Median      Max
real        66.637      2.996       57.220      67.714      69.314
user        307.293     14.741      258.093     312.209     320.702
sys         12.524      0.653       10.499      12.726      13.193

rustc fix-bug-overflow-send:

            Mean        Std.Dev.    Min         Median      Max
real        66.297      4.310       53.532      67.516      70.348
user        306.812     22.371      236.917     314.748     326.229
sys         12.757      0.952       9.671       13.125      13.544
```

I will do a more comprehensive benchmark (compiling rustc stage1) and post the results.

r? @nikomatsakis, @nnethercote

PS: It is better to review this commit-by-commit.

5 years agoDeduplicate errors in the obligation forest.
Diogo Sousa [Sun, 30 Sep 2018 01:41:49 +0000 (02:41 +0100)]
Deduplicate errors in the obligation forest.

Fixes #40827.

5 years agoTypos and style fixes.
Diogo Sousa [Fri, 10 Aug 2018 17:13:43 +0000 (18:13 +0100)]
Typos and style fixes.

5 years agoAuto merge of #54622 - matthewjasper:more-nll-mode, r=pnkfelix
bors [Sun, 30 Sep 2018 14:38:47 +0000 (14:38 +0000)]
Auto merge of #54622 - matthewjasper:more-nll-mode, r=pnkfelix

Enable NLL compare mode for more tests

Most of these tests were disabled due to NLL bugs that have since been fixed. A few needed updating for NLL.

r? @nikomatsakis

5 years agoAuto merge of #54596 - mjbshaw:drop, r=RalfJung
bors [Sun, 30 Sep 2018 12:00:45 +0000 (12:00 +0000)]
Auto merge of #54596 - mjbshaw:drop, r=RalfJung

Make core::mem::needs_drop a const fn

This fixes #51929.

5 years agoAuto merge of #53816 - zackmdavis:elided_lifetimes_in_paths_field_day, r=nikomatsakis
bors [Sun, 30 Sep 2018 09:22:31 +0000 (09:22 +0000)]
Auto merge of #53816 - zackmdavis:elided_lifetimes_in_paths_field_day, r=nikomatsakis

don't elide lifetimes in paths in librustc/

In light of the "Apply to rustc" checkbox on #44524 and @nikomatsakis's [recent comment about regularly wanting visual indication of elided lifetimes in types](https://github.com/rust-lang/rust/issues/44524#issuecomment-414663773), I was curious to see what it would look like if we turned the `elided_lifetimes_in_path` lint on in at least one crate in the codebase (I chose librustc). Given that I couldn't figure out how to get `cargo fix` work with the build system, this arguably wasn't a very efficient use of my time, but once I started, the conjunction of moral law and the sunk cost fallacy forced me to continue.

This is mostly applying the `<'_>` suggestions issued by the lint, but there were a few places where I named the lifetimes (_e.g._, `<'a, 'gcx, 'tcx>` on `TyCtxt`) in order to match style with surrounding code.

r? @nikomatsakis

5 years agoAuto merge of #54639 - nagisa:lets-alias-for-now, r=eddyb
bors [Sun, 30 Sep 2018 06:44:13 +0000 (06:44 +0000)]
Auto merge of #54639 - nagisa:lets-alias-for-now, r=eddyb

Do not put noalias annotations by default

This will be re-enabled sooner or later depending on results of further
investigation.

Fixes #54462

Beta backport is: #54640

r? @nikomatsakis

5 years agodon't elide lifetimes in paths in librustc/
Zack M. Davis [Thu, 30 Aug 2018 05:02:42 +0000 (22:02 -0700)]
don't elide lifetimes in paths in librustc/

This seemed like a good way to kick the tires on the
elided-lifetimes-in-paths lint (#52069)—seems to work! This was also
pretty tedious—it sure would be nice if `cargo fix` worked on this
codebase (#53896)!

5 years agoMerge branch 'master' into drop
Michael Bradshaw [Sun, 30 Sep 2018 02:51:09 +0000 (19:51 -0700)]
Merge branch 'master' into drop

5 years agoFix ui/run-pass/union/union-nodrop.rs test
Michael Bradshaw [Sun, 30 Sep 2018 02:49:17 +0000 (19:49 -0700)]
Fix ui/run-pass/union/union-nodrop.rs test

5 years agoAuto merge of #54601 - cuviper:prep-1.31, r=Mark-Simulacrum
bors [Sun, 30 Sep 2018 01:45:50 +0000 (01:45 +0000)]
Auto merge of #54601 - cuviper:prep-1.31, r=Mark-Simulacrum

Bump to 1.31.0 and bootstrap from 1.30 beta

Closes #54594.

5 years agoAuto merge of #54591 - ljedrz:cleanup_typeck_rest, r=zackmdavis
bors [Sat, 29 Sep 2018 22:20:01 +0000 (22:20 +0000)]
Auto merge of #54591 - ljedrz:cleanup_typeck_rest, r=zackmdavis

A few cleanups and minor improvements to typeck

This PR complements https://github.com/rust-lang/rust/pull/54533, which was limited to `check`.

- change a few `push` loops to `extend`s
- prefer `to_owned` to `to_string` for string literals
- prefer `if let` to `match` where only one branch matters
- a few other minor improvements
- whitespace fixes

5 years agoAuto merge of #54240 - csmoe:nonzero_from, r=alexcrichton
bors [Sat, 29 Sep 2018 19:38:12 +0000 (19:38 +0000)]
Auto merge of #54240 - csmoe:nonzero_from, r=alexcrichton

Impl From<NonZero<T>> for T

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

r? @SimonSapin

5 years agoImprove ux when calling associated functions with dot notation
Donato Sciarra [Mon, 17 Sep 2018 21:37:20 +0000 (23:37 +0200)]
Improve ux when calling associated functions with dot notation

Issue: 22692

5 years agorust: Add a `-C default-linker-libraries` option
Alex Crichton [Sat, 29 Sep 2018 18:03:59 +0000 (11:03 -0700)]
rust: Add a `-C default-linker-libraries` option

This commit adds a new codegen option for the compiler which disables
rustc's passing of `-nodefaultlibs` by default on relevant platforms.
Sometimes Rust is linked with C code which fails to link with
`-nodefaultlibs` and is unnecessarily onerous to get linking correctly
with `-nodefaultlibs`.

An example of this is that when you compile C code with sanitizers and
then pass `-fsanitize=address` to the linker, it's incompatible with
`-nodefaultlibs` also being passed to the linker.

In these situations it's easiest to turn off Rust's default passing of
`-nodefaultlibs`, which was more ideological to start with than
anything! Preserving the default is somewhat important but having this
be opt-in shouldn't cause any breakage.

Closes #54237

5 years agoAuto merge of #54599 - nikomatsakis:issue-54593-impl-Trait, r=eddyb
bors [Sat, 29 Sep 2018 15:07:59 +0000 (15:07 +0000)]
Auto merge of #54599 - nikomatsakis:issue-54593-impl-Trait, r=eddyb

use closure def-id in returns, but base def-id in locals

The refactorings to  handle `let x: impl Trait`  wound up breaking `impl Trait` in closure return types. I think there are some deeper problems with the code in question, but this a least should make @eddyb's example work.

Fixes #54593

r? @eddyb

5 years agoAuto merge of #54660 - kennytm:rollup, r=kennytm
bors [Sat, 29 Sep 2018 12:35:39 +0000 (12:35 +0000)]
Auto merge of #54660 - kennytm:rollup, r=kennytm

Rollup of 8 pull requests

Successful merges:

 - #54564 (Add 1.29.1 release notes)
 - #54567 (Include path in stamp hash for debuginfo tests)
 - #54577 (rustdoc: give proc-macros their own pages)
 - #54590 (std: Don't let `rust_panic` get inlined)
 - #54598 (Remove useless lifetimes from `Pin` `impl`s.)
 - #54604 (Added help message for `self_in_typedefs` feature gate)
 - #54635 (Improve docs for std::io::Seek)
 - #54645 (Compute Android gdb version in compiletest)

5 years agoDo not put noalias annotations by default
Simonas Kazlauskas [Fri, 28 Sep 2018 14:40:06 +0000 (17:40 +0300)]
Do not put noalias annotations by default

This will be re-enabled sooner or later depending on results of further
investigation.

Fixes #54462

5 years agoAuto merge of #54554 - RalfJung:maybe-uninit, r=nagisa
bors [Sat, 29 Sep 2018 09:58:09 +0000 (09:58 +0000)]
Auto merge of #54554 - RalfJung:maybe-uninit, r=nagisa

Revert most of MaybeUninit, except for the new API itself

This reverts most of https://github.com/rust-lang/rust/pull/53508/ for perf reasons (first commit reverts that entire PR), except for the new API itself (added back in 2nd commit).

5 years agoA few cleanups and minor improvements to typeck
ljedrz [Wed, 26 Sep 2018 15:32:23 +0000 (17:32 +0200)]
A few cleanups and minor improvements to typeck

5 years agoRollup merge of #54577 - QuietMisdreavus:docs-for-procs, r=GuillaumeGomez
kennytm [Sat, 29 Sep 2018 08:46:30 +0000 (16:46 +0800)]
Rollup merge of #54577 - QuietMisdreavus:docs-for-procs, r=GuillaumeGomez

rustdoc: give proc-macros their own pages

related to https://github.com/rust-lang/rust/issues/49553 but i don't think it'll fix it

Currently, rustdoc doesn't expose proc-macros all that well. In the source crate, only their definition function is exposed, but when re-exported, they're treated as a macro! This is an awkward situation in all accounts. This PR checks functions to see whether they have any of `#[proc_macro]`, `#[proc_macro_attribute]`, or `#[proc_macro_derive]`, and exposes them as macros instead. In addition, attributes and derives are exposed differently than other macros, getting their own item-type, CSS class, and module heading.

![image](https://user-images.githubusercontent.com/5217170/46044803-6df8da00-c0e1-11e8-8c3b-25d2c3beb55c.png)

Function-like proc-macros are lumped in with `macro_rules!` macros, but they get a different declaration block (i'm open to tweaking this, it's just what i thought of given how function-proc-macros operate):

![image](https://user-images.githubusercontent.com/5217170/46044828-84069a80-c0e1-11e8-9cc4-127e5477c395.png)

Proc-macro attributes and derives get their own pages, with a representative declaration block. Derive macros also show off their helper attributes:

![image](https://user-images.githubusercontent.com/5217170/46094583-ef9f4500-c17f-11e8-8f71-fa0a7895c9f6.png)

![image](https://user-images.githubusercontent.com/5217170/46101529-cab3cd80-c191-11e8-857a-946897750da1.png)

There's one wrinkle which this PR doesn't address, which is why i didn't mark this as fixing the linked issue. Currently, proc-macros don't expose their attributes or source span across crates, so while rustdoc knows they exist, that's about all the information it gets. This leads to an "inlined" macro that has absolutely no docs on it, and no `[src]` link to show you where it was declared.

The way i got around it was to keep proc-macro re-export disabled, since we do get enough information across crates to properly link to the source page:

![image](https://user-images.githubusercontent.com/5217170/46045074-2cb4fa00-c0e2-11e8-81bc-33a8205fbd03.png)

Until we can get a proc-macro's docs (and ideally also its source span) across crates, i believe this is the best way forward.

5 years agoRollup merge of #54645 - tromey:android-gdb-version, r=alexcrichton
kennytm [Sat, 29 Sep 2018 05:21:21 +0000 (13:21 +0800)]
Rollup merge of #54645 - tromey:android-gdb-version, r=alexcrichton

Compute Android gdb version in compiletest

compiletest has special code for running gdb for Android targets.  In
particular it computes a different path to gdb.  However, this gdb is
not used for the version test, which results in some tests being run
when they should not be.  You can see this in #54004.

This patch moves the special case to analyze_gdb and a new helper
function to decide whether the case applies.  This causes the version
check to work properly.

Note that the bulk of the runtest.rs change is just reindentation
caused by moving from a "match" to an "if" -- but there is a (small)
change buried in there.

5 years agoRollup merge of #54635 - neoeinstein:seek-docs, r=alexcrichton
kennytm [Sat, 29 Sep 2018 05:21:18 +0000 (13:21 +0800)]
Rollup merge of #54635 - neoeinstein:seek-docs, r=alexcrichton

Improve docs for std::io::Seek

Fixes #54562

5 years agoRollup merge of #54604 - alexreg:self_in_typedefs-help, r=estebank
kennytm [Sat, 29 Sep 2018 05:21:17 +0000 (13:21 +0800)]
Rollup merge of #54604 - alexreg:self_in_typedefs-help, r=estebank

Added help message for `self_in_typedefs` feature gate

Fixes #54563.

CC @Centril @estebank @leonardo-m

5 years agoRollup merge of #54598 - pthariensflame:patch-1, r=sfackler
kennytm [Sat, 29 Sep 2018 05:21:16 +0000 (13:21 +0800)]
Rollup merge of #54598 - pthariensflame:patch-1, r=sfackler

Remove useless lifetimes from `Pin` `impl`s.

These were evidently left in by accident when the new API was switched over to.

5 years agoRollup merge of #54590 - alexcrichton:inline-never-rust-panic, r=dtolnay
kennytm [Sat, 29 Sep 2018 05:21:15 +0000 (13:21 +0800)]
Rollup merge of #54590 - alexcrichton:inline-never-rust-panic, r=dtolnay

std: Don't let `rust_panic` get inlined

It's meant for breakpoints, so if it gets inlined we can't set a
breakpoint on it easily!

Will hopefully help fix at least one aspect of https://github.com/rust-lang/rust/issues/49013

5 years agoFix Once perf regression
Aleksey Kladov [Sat, 29 Sep 2018 08:07:48 +0000 (11:07 +0300)]
Fix Once perf regression

Because `call_once` is generic, but `is_completed` is not, we need
`#[inline]` annotation to allow LLVM to inline `is_completed` into
`call_once` in downstream crates.

5 years agoadd MaybeUninit
Jorge Aparicio [Sun, 19 Aug 2018 13:51:35 +0000 (15:51 +0200)]
add MaybeUninit

5 years agoRevert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"
Ralf Jung [Tue, 25 Sep 2018 13:07:27 +0000 (15:07 +0200)]
Revert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"

This reverts commit c6e3d7fa3113aaa64602507f39d4627c427742ff, reversing
changes made to 4591a245c7eec9f70d668982b1383cd2a6854af5.

5 years agoAuto merge of #54576 - froydnj:non-x86-abi-adjustment, r=alexcrichton
bors [Sat, 29 Sep 2018 07:23:00 +0000 (07:23 +0000)]
Auto merge of #54576 - froydnj:non-x86-abi-adjustment, r=alexcrichton

ignore {std,fast,vector,this}call on non-x86 windows

MSVC ignores these keywords for C/C++ and uses the standard system
calling convention.  Rust should do so as well.

Fixes #54569.

5 years agoRollup merge of #54567 - tromey:paths-in-stamp-hashes, r=Mark-Simulacrum
kennytm [Sat, 29 Sep 2018 05:21:12 +0000 (13:21 +0800)]
Rollup merge of #54567 - tromey:paths-in-stamp-hashes, r=Mark-Simulacrum

Include path in stamp hash for debuginfo tests

The debuginfo tests are exposed to the environment in a couple of
ways: the path to the gdb executable matters, as does the Python path
used when loading lldb.

This patch incorporates these paths into the hash that is written to
the stamp file, so that changing the path will cause the tests to be
re-run.

5 years agoRollup merge of #54564 - alexcrichton:new-notes, r=kennytm
kennytm [Sat, 29 Sep 2018 05:21:10 +0000 (13:21 +0800)]
Rollup merge of #54564 - alexcrichton:new-notes, r=kennytm

Add 1.29.1 release notes

Forward-port of #54397, should have included it earlier!

5 years agoAuto merge of #54278 - eddyb:spanned-generic-predicates, r=nikomatsakis
bors [Sat, 29 Sep 2018 03:42:38 +0000 (03:42 +0000)]
Auto merge of #54278 - eddyb:spanned-generic-predicates, r=nikomatsakis

rustc: keep a Span for each predicate in ty::GenericPredicates.

This should allow finer-grained diagnostics, including migration suggestions for #54090.
(Note that I haven't changed most of the users of `predicates_of` to use the new spans)

r? @nikomatsakis

5 years agoAuto merge of #53013 - zackmdavis:infer_outlints, r=nikomatsakis
bors [Sat, 29 Sep 2018 01:09:07 +0000 (01:09 +0000)]
Auto merge of #53013 - zackmdavis:infer_outlints, r=nikomatsakis

in which inferable outlives-requirements are linted

RFC 2093 (tracking issue #44493) lets us leave off these
commonsensically inferable `T: 'a` outlives requirements. (A separate
feature-gate was split off for the case of 'static lifetimes, for
which questions still remain.) Detecting these was requested as an
idioms-2018 lint.

Resolves #52042, an item under the fabulous metaïssue #52047.

It's plausible that this shouldn't land until after `infer_outlives_requirements` has been stabilized ([final comment period started](https://github.com/rust-lang/rust/issues/44493#issuecomment-408852946) 4 days ago), but I think there's also a strong case to not-wait in order to maximize the time that [Edition Preview 2](https://internals.rust-lang.org/t/rust-2018-release-schedule-and-extended-beta/8076) users have to kick at it. (It's allow by default, so there's no impact unless you explicitly turn it or the rust-2018-idioms group up to `warn` or higher.)

Questions—

 * Is `explicit-outlives-requirements` a good name? (I chose it as an [RFC 344](https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#lints)-compliant "inversion" of the feature-gate name, `infer_outlives_requirements`, but I could imagine someone arguing that the word `struct` should be part of the name somewhere, for specificity.)

 * Are there any false-positives or false-negatives? @nikomatsakis [said that](https://github.com/rust-lang/rust/issues/52042#issuecomment-406409795) getting this right would be "fairly hard", which makes me nervous that I'm missing something. The UI test in the initial submission of this pull request just exercises the examples [given in the Edition Guide](https://rust-lang-nursery.github.io/edition-guide/2018/transitioning/ownership-and-lifetimes/struct-inference.html).

![infer_outlints](https://user-images.githubusercontent.com/1076988/43625740-6bf43dca-96a3-11e8-9dcf-793ac83d424d.png)

r? @alexcrichton

5 years agorustc_typeck: don't lint non-extern-prelude extern crate's in Rust 2018.
Eduard-Mihai Burtescu [Fri, 28 Sep 2018 19:54:18 +0000 (22:54 +0300)]
rustc_typeck: don't lint non-extern-prelude extern crate's in Rust 2018.

5 years agoAuto merge of #54643 - Xanewok:fix-rls, r=kennytm
bors [Fri, 28 Sep 2018 20:30:17 +0000 (20:30 +0000)]
Auto merge of #54643 - Xanewok:fix-rls, r=kennytm

Fix RLS toolstate after #54356 merge

Fixes toolstate regression caused by https://github.com/rust-lang/rust/pull/54356.

The `save::process_crate` now needs to be passed an additional `&Input`, this change contains the RLS equivalent of [this](https://github.com/rust-lang/rust/pull/54356/files#diff-707a0eda6b2f1a0537abc3d23133748cR983).

r? @kennytm (or @nrc if you're not away yet)

5 years agorustc_resolve: move extern_prelude from Resolver to Session.
Eduard-Mihai Burtescu [Fri, 28 Sep 2018 19:17:59 +0000 (22:17 +0300)]
rustc_resolve: move extern_prelude from Resolver to Session.

5 years agoCompute Android gdb version in compiletest
Tom Tromey [Fri, 28 Sep 2018 16:32:59 +0000 (10:32 -0600)]
Compute Android gdb version in compiletest

compiletest has special code for running gdb for Android targets.  In
particular it computes a different path to gdb.  However, this gdb is
not used for the version test, which results in some tests being run
when they should not be.  You can see this in #54004.

This patch moves the special case to analyze_gdb and a new helper
function to decide whether the case applies.  This causes the version
check to work properly.

Note that the bulk of the runtest.rs change is just reindentation
caused by moving from a "match" to an "if" -- but there is a (small)
change buried in there.

5 years agoFix RLS toolstate after #54356 merge
Igor Matuszewski [Fri, 28 Sep 2018 14:39:24 +0000 (16:39 +0200)]
Fix RLS toolstate after #54356 merge

5 years agorustc: keep a Span for each predicate in ty::GenericPredicates.
Eduard-Mihai Burtescu [Sun, 16 Sep 2018 17:15:49 +0000 (20:15 +0300)]
rustc: keep a Span for each predicate in ty::GenericPredicates.

5 years agoImprove docs for std::io::Seek
Marcus Griep [Fri, 28 Sep 2018 12:01:31 +0000 (08:01 -0400)]
Improve docs for std::io::Seek

Fixes #54562

5 years agoAuto merge of #54356 - Xanewok:save-analysis-invocation, r=nrc
bors [Fri, 28 Sep 2018 11:48:48 +0000 (11:48 +0000)]
Auto merge of #54356 - Xanewok:save-analysis-invocation, r=nrc

Emit used rustc invocation in the save-analysis file

Blocked on https://github.com/nrc/rls-data/pull/19. (I'm guessing it won't pass CI due to an out-of-tree git dependency)

This should allow RLS to recreate a Rust compilation build plan from the save-analysis files alone, which should be useful when fetching those from external build systems, most notably Buck now.

Also this includes some more potentially useful compilation-specific options (e.g. sysroot or the actual path to extern crates) but that's not required for the build plan bits.

cc @jsgf @alexcrichton

r? @nrc

5 years agoAuto merge of #54568 - levex:issue-54130, r=nagisa
bors [Fri, 28 Sep 2018 09:17:28 +0000 (09:17 +0000)]
Auto merge of #54568 - levex:issue-54130, r=nagisa

codegen_llvm: check inline assembly constraints with LLVM

---%<---
Hey all,

As issue #54130 highlights, constraints are not checked and passing bad constraints to LLVM can crash it since a `Verify()` call is placed inside an assertion (see: `src/llvm/lib/IR/InlineAsm.cpp:39`).

As this is my first PR to the Rust compiler (woot! :tada:), there might be better ways of achieving this result. In particular, I am not too happy about generating an error in codegen; it would be much nicer if we did it earlier. However, @rkruppe [noted on IRC](https://botbot.me/mozilla/rustc/2018-09-25/?msg=104791581&page=1) that this should be fine for an unstable feature and a much better solution than the _status quo_, which is an ICE.

Thanks!
--->%---

LLVM provides a way of checking whether the constraints and the actual
inline assembly make sense. This commit introduces a check before
emitting code for the inline assembly. If LLVM rejects the inline
assembly (or its constraints), then the compiler emits an error E0668
("malformed inline assembly").

Fixes: #54130
Signed-off-by: Levente Kurusa \<lkurusa@acm.org\>
5 years agoAuto merge of #54338 - orium:fix-macro-inc-comp, r=nrc
bors [Fri, 28 Sep 2018 06:40:32 +0000 (06:40 +0000)]
Auto merge of #54338 - orium:fix-macro-inc-comp, r=nrc

Use full name to identify a macro in a `FileName`.

Before this two macros with same name would be indistinguishable inside a `FileName`.  This caused a bug in incremental compilation (see #53097) since two different macros would map out to the same `StableFilemapId`.

Fixes #53097.

r? @nrc

5 years agoUpdate ui lines
Josh Stone [Wed, 26 Sep 2018 23:45:09 +0000 (16:45 -0700)]
Update ui lines

5 years agoBump to 1.31.0 and bootstrap from 1.30 beta
Josh Stone [Wed, 26 Sep 2018 21:26:46 +0000 (14:26 -0700)]
Bump to 1.31.0 and bootstrap from 1.30 beta

5 years agoin which inferable outlives-requirements are linted
Zack M. Davis [Sun, 26 Aug 2018 19:22:04 +0000 (12:22 -0700)]
in which inferable outlives-requirements are linted

RFC 2093 (tracking issue #44493) lets us leave off
commonsensically inferable `T: 'a` outlives requirements. (A separate
feature-gate was split off for the case of 'static lifetimes, for
which questions still remain.) Detecting these was requested as an
idioms-2018 lint.

It turns out that issuing a correct, autofixable suggestion here is
somewhat subtle in the presence of other bounds and generic
parameters. Basically, we want to handle these three cases:

 • One outlives-bound. We want to drop the bound altogether, including
   the colon—

   MyStruct<'a, T: 'a>
                 ^^^^ help: remove this bound

 • An outlives bound first, followed by a trait bound. We want to
   delete the outlives bound and the following plus sign (and
   hopefully get the whitespace right, too)—

   MyStruct<'a, T: 'a + MyTrait>
                   ^^^^^ help: remove this bound

 • An outlives bound after a trait bound. We want to delete the
   outlives lifetime and the preceding plus sign—

   MyStruct<'a, T: MyTrait + 'a>
                          ^^^^^ help: remove this bound

This gets (slightly) even more complicated in the case of where
clauses, where we want to drop the where clause altogether if there's
just the one bound. Hopefully the comments are enough to explain
what's going on!

A script (in Python, sorry) was used to generate the
hopefully-sufficiently-exhaustive UI test input. Some of these are
split off into a different file because rust-lang-nursery/rustfix#141
(and, causally upstream of that, #53934) prevents them from being
`run-rustfix`-tested.

We also make sure to include a UI test of a case (copied from RFC
2093) where the outlives-bound can't be inferred. Special thanks to
Niko Matsakis for pointing out the `inferred_outlives_of` query,
rather than blindly stripping outlives requirements as if we weren't a
production compiler and didn't care.

This concerns #52042.

5 years agoAuto merge of #54547 - AstralSorcerer:issue-54028, r=eddyb
bors [Fri, 28 Sep 2018 02:28:25 +0000 (02:28 +0000)]
Auto merge of #54547 - AstralSorcerer:issue-54028, r=eddyb

Rely only on base alignment and offset for computing field alignment

Fix #54028
r? @eddyb

5 years agoUse rls-data 0.18.1
Igor Matuszewski [Tue, 25 Sep 2018 06:32:49 +0000 (08:32 +0200)]
Use rls-data 0.18.1

5 years agoAlso remap absolute source names in save-analysis
Igor Matuszewski [Mon, 24 Sep 2018 14:53:49 +0000 (16:53 +0200)]
Also remap absolute source names in save-analysis

5 years agoMinimize final diff
Igor Matuszewski [Mon, 24 Sep 2018 14:38:54 +0000 (16:38 +0200)]
Minimize final diff

5 years agoRemap only source files in the command line
Igor Matuszewski [Mon, 24 Sep 2018 14:28:53 +0000 (16:28 +0200)]
Remap only source files in the command line

5 years agoEmit only necessary compilation options in save-analysis
Igor Matuszewski [Sat, 22 Sep 2018 21:19:39 +0000 (23:19 +0200)]
Emit only necessary compilation options in save-analysis

This is `command`, `directory` and `output` file.

5 years agoMove `filename_for_metadata` to codegen_utils
Igor Matuszewski [Sat, 22 Sep 2018 20:24:32 +0000 (22:24 +0200)]
Move `filename_for_metadata` to codegen_utils

This function isn't strictly tied to LLVM (it's more of a utility) and
it's now near an analogous, almost identical `filename_for_input` (for
rlibs and so forth).
Also this means not depending on the backend when one wants to know the
accurate .rmeta output filename.

5 years agoEmit used rustc invocation in the save-analysis file
Igor Matuszewski [Tue, 11 Sep 2018 14:39:07 +0000 (16:39 +0200)]
Emit used rustc invocation in the save-analysis file

5 years agoAuto merge of #54530 - pnkfelix:issue-54047-migrate-ui-run-pass-back-to-run-pass...
bors [Thu, 27 Sep 2018 23:46:21 +0000 (23:46 +0000)]
Auto merge of #54530 - pnkfelix:issue-54047-migrate-ui-run-pass-back-to-run-pass, r=alexcrichton

Migrate `src/test/ui/run-pass/*` back to `src/test/run-pass/`.

Moves all the tests from `src/test/ui/run-pass/**` back to `src/test/run-pass/`.

This should have no impact on our overall testing completeness due to PR #54223

Fix #54047

5 years agoEnable NLL compare mode for more tests
Matthew Jasper [Thu, 27 Sep 2018 21:30:04 +0000 (22:30 +0100)]
Enable NLL compare mode for more tests

These tests were disabled due to NLL bugs that have since been fixed.

5 years agoignore {std,fast,vector,this}call on non-x86 windows
Nathan Froyd [Tue, 25 Sep 2018 20:37:31 +0000 (16:37 -0400)]
ignore {std,fast,vector,this}call on non-x86 windows

MSVC ignores these keywords for C/C++ and uses the standard system
calling convention.  Rust should do so as well.

Fixes #54569.

5 years agoAuto merge of #54468 - matthewjasper:fix-polonius, r=nikomatsakis
bors [Thu, 27 Sep 2018 19:26:59 +0000 (19:26 +0000)]
Auto merge of #54468 - matthewjasper:fix-polonius, r=nikomatsakis

[NLL] Get Polonius borrow check to work in simple cases

* Restores the generation of outlives facts from subtyping.
* Restore liveness facts.
* Generate invalidates facts at the start point of each location,
  where we check for errors.
* Add a small test for simple cases (previously these cases have compiled, and more recently ICEd).

Closes #54212
cc #53142 (will need test)

### Known limitations

* Two phase borrows aren't implemented for Polonius yet
* Invalidation facts haven't been updated for some of the recent changes to make `Drop` terminators access fewer things.
* Fact generation is not as optimized as it could be.
* Around 30 tests fail in compare mode, often tests that are ignored in nll compare mode

r? @nikomatsakis

5 years agoAllow `unused_variables` lint to placate test failure exposed by macos builders.
Felix S. Klock II [Thu, 27 Sep 2018 19:00:21 +0000 (21:00 +0200)]
Allow `unused_variables` lint to placate test failure exposed by macos builders.

5 years agoAuto merge of #54533 - ljedrz:cleanup_librustc_typeck_check, r=davidtwco
bors [Thu, 27 Sep 2018 16:54:28 +0000 (16:54 +0000)]
Auto merge of #54533 - ljedrz:cleanup_librustc_typeck_check, r=davidtwco

A few cleanups and minor improvements to typeck/check

- turn a `loop` into a `while let`
- turn a `push_back` loop into an `extend`
- turn a few `push` loops into collected iterators
- prefer `vec![x; n]` to `(0..n).map(|_| x).collect()`
- combine two loops doing the same thing on 2 data sets using `chain`
- use `unwrap_or` where applicable and readable
- add a `potentially_plural_count` helper function to simplify several `format!()` calls
- prefer `to_owned` to `to_string` for string literals
- change `match` to `if let` where only one branch matters
- a few other minor improvements
- whitespace fixes

5 years agocheck for proc-macros in "all items"
QuietMisdreavus [Thu, 27 Sep 2018 15:22:29 +0000 (10:22 -0500)]
check for proc-macros in "all items"

5 years agoshow "all items" link even if crate doesn't have a version
QuietMisdreavus [Thu, 27 Sep 2018 14:12:13 +0000 (09:12 -0500)]
show "all items" link even if crate doesn't have a version

5 years agoadd attributes/derives to "all items" page
QuietMisdreavus [Thu, 27 Sep 2018 14:04:38 +0000 (09:04 -0500)]
add attributes/derives to "all items" page

5 years agoAuto merge of #54355 - pnkfelix:issue-22323-regression-test, r=davidtwco
bors [Thu, 27 Sep 2018 12:35:36 +0000 (12:35 +0000)]
Auto merge of #54355 - pnkfelix:issue-22323-regression-test, r=davidtwco

NLL: regression test for "dropck: track order of destruction for r-value temporaries"

Once this lands, we can remove the E-needstest from #22323.

(We shouldn't close the bug itself, however, because we are leaving the NLL-fixed-by-NLL bugs open until NLL is turned on by default.)

5 years agoAllow more lints that signalled on the arm-android test run.
Felix S. Klock II [Thu, 27 Sep 2018 11:06:16 +0000 (13:06 +0200)]
Allow more lints that signalled on the arm-android test run.

5 years agoAuto merge of #52319 - tinco:issue_12590, r=pnkfelix
bors [Thu, 27 Sep 2018 09:51:12 +0000 (09:51 +0000)]
Auto merge of #52319 - tinco:issue_12590, r=pnkfelix

Track whether module declarations are inline (fixes #12590)

To track whether module declarations are inline I added a field `inline: bool` to `ast::Mod`. The main use case is for pretty to know whether it should render the items associated with the module, but perhaps there are use cases for this information to not be forgotten in the AST.

5 years agoA few cleanups and minor improvements to typeck
ljedrz [Wed, 19 Sep 2018 11:51:51 +0000 (13:51 +0200)]
A few cleanups and minor improvements to typeck

5 years agoAllow some lints that only fired on 32-bit and/or Windows.
Felix S. Klock II [Thu, 27 Sep 2018 08:14:57 +0000 (10:14 +0200)]
Allow some lints that only fired on 32-bit and/or Windows.

5 years agoDon't have two adjacent "see also" sentences
Tobias Bucher [Thu, 27 Sep 2018 07:49:12 +0000 (09:49 +0200)]
Don't have two adjacent "see also" sentences

5 years agoAuto merge of #54581 - petrochenkov:cfgattr, r=alexcrichton
bors [Thu, 27 Sep 2018 07:16:27 +0000 (07:16 +0000)]
Auto merge of #54581 - petrochenkov:cfgattr, r=alexcrichton

Accept trailing comma in `cfg_attr`

Fixes https://github.com/rust-lang/rust/issues/54463 (stable-to-beta regression)

5 years agoUpdated stderr test files.
Alexander Regueiro [Thu, 27 Sep 2018 03:13:25 +0000 (04:13 +0100)]
Updated stderr test files.

5 years agoAdded help message for feature gate.
Alexander Regueiro [Thu, 27 Sep 2018 01:32:55 +0000 (02:32 +0100)]
Added help message for feature gate.

5 years agoAuto merge of #54526 - nnethercote:shrink-StatementKind, r=nagisa
bors [Wed, 26 Sep 2018 23:22:48 +0000 (23:22 +0000)]
Auto merge of #54526 - nnethercote:shrink-StatementKind, r=nagisa

Shrink `StatementKind`

`StatementKind` occurs in significant amounts in Massif profiles.

5 years agoGate const core::mem::needs_drop behind const_needs_drop
Michael Bradshaw [Wed, 26 Sep 2018 21:46:14 +0000 (14:46 -0700)]
Gate const core::mem::needs_drop behind const_needs_drop

5 years agouse the closure def-id in returns, but closure-base def-id in locals
Niko Matsakis [Wed, 26 Sep 2018 20:37:31 +0000 (16:37 -0400)]
use the closure def-id in returns, but closure-base def-id in locals

Using the `closure_base_def_id` indiscriminantely, as we were doing
before, winds up "going wrong" if the closure type includes the `impl
Trait` from the parent. The problem arises because the return value
for closures is inferred and meant to treat the return
type *opaquely*, so we don't want to be "desugaring" it into the
underlying type.

5 years agoGet Polonius borrow check to work in simple cases
Matthew Jasper [Wed, 26 Sep 2018 19:41:14 +0000 (20:41 +0100)]
Get Polonius borrow check to work in simple cases

* Restores the generation of outlives facts from subtyping.
* Restore liveness facts.
* Generate invalidates facts at the start point of each location,
  where we check for errors.
* Add a small test for simple cases.

5 years agoRemove useless lifetimes from `Pin` `impl`s.
Alexander Ronald Altman [Wed, 26 Sep 2018 21:03:05 +0000 (16:03 -0500)]
Remove useless lifetimes from `Pin` `impl`s.

5 years agoAuto merge of #54561 - matthiaskrgr:clippy_up, r=kennytm
bors [Wed, 26 Sep 2018 20:47:45 +0000 (20:47 +0000)]
Auto merge of #54561 - matthiaskrgr:clippy_up, r=kennytm

update clippy submodule to a72e786c

5 years agoadd derive macros' helper attributes to doc output
QuietMisdreavus [Wed, 26 Sep 2018 16:29:41 +0000 (11:29 -0500)]
add derive macros' helper attributes to doc output

5 years agoAuto merge of #54453 - nikomatsakis:nll-issue-53121-shred-outlives, r=pnkfelix
bors [Wed, 26 Sep 2018 18:16:55 +0000 (18:16 +0000)]
Auto merge of #54453 - nikomatsakis:nll-issue-53121-shred-outlives, r=pnkfelix

rework how we handle outlives relationships

When we encounter an outlives relationship involving a projection, we use to over-constrain in some cases with region constraints. We also used to evaluate whether the where-clauses in the environment might apply **before** running inference.

We now avoid doing both of those things:

- If there are where-clauses in the environment that might be useful, we add no constraints.
- After inference is done, we check if we wound up inferring values compatible with the where-clause, and make use of them if so.

I realize now that this PR includes some meandering commits and refactorings from when I expected to go in a different direction. If desired, I could try to remove some of those.

Fixes #53121
Fixes #53789

r? @pnkfelix

5 years agoMake core::mem::needs_drop a const fn
Michael Bradshaw [Wed, 26 Sep 2018 14:55:57 +0000 (07:55 -0700)]
Make core::mem::needs_drop a const fn

5 years agoupdate clippy submodule to a72e786c
Matthias Krüger [Tue, 25 Sep 2018 15:42:47 +0000 (17:42 +0200)]
update clippy submodule to a72e786c

Fixes clippy build.

5 years agoAuto merge of #51946 - japaric:emit-stack-sizes, r=nikomatsakis
bors [Wed, 26 Sep 2018 15:40:37 +0000 (15:40 +0000)]
Auto merge of #51946 - japaric:emit-stack-sizes, r=nikomatsakis

[eRFC] add -Z emit-stack-sizes

# What

This PR exposes LLVM's ability to report the stack usage of each function through the unstable /
experimental `-Z emit-stack-sizes` flag.

# Motivation

The end goal is to enable whole program analysis of stack usage to prove absence of stack overflows
at compile time. Such property is important in systems that lack a MMU / MPU and where stack
overflows can corrupt memory. And in systems that have protection against stack overflows such proof
can be used to opt out of runtime checks (e.g. stack probes or the MPU).

Such analysis requires the call graph of the program, which can be obtained from MIR, and the stack
usage of each function in the program. Precise information about the later later can only be
obtained from LLVM as it depends on the optimization level and optimization options like LTO.

This PR does **not** attempt to add the ability to perform such whole program analysis to rustc;
it simply does the minimal amount of work to enable such analysis to be implemented out of tree.

# Implementation

This PR exposes a way to set LLVM's `EmitStackSizeSection` option from the command line. The option
is documented [here]; the documentation is copied below for convenience and posteriority:

[here]: https://llvm.org/docs/CodeGenerator.html#emitting-function-stack-size-information

> A section containing metadata on function stack sizes will be emitted when
> TargetLoweringObjectFile::StackSizesSection is not null, and TargetOptions::EmitStackSizeSection
> is set (-stack-size-section). The section will contain an array of pairs of function symbol values
> (pointer size) and stack sizes (unsigned LEB128). The stack size values only include the space
> allocated in the function prologue. Functions with dynamic stack allocations are not included.

Where the LLVM feature is not available (e.g. LLVM version < 6.0) or can't be applied (e.g. the
output format doesn't support sections e.g. .wasm files) the flag does nothing -- i.e. no error or
warning is emitted.

# Example usage

``` console
$ cargo new --bin hello && cd $_

$ cat >src/main.rs <<'EOF'
use std::{mem, ptr};

fn main() {
    registers();
    stack();
}

#[inline(never)]
fn registers() {
    unsafe {
        // values loaded into registers
        ptr::read_volatile(&(0u64, 1u64));
    }
}

#[inline(never)]
fn stack() {
    unsafe {
        // array allocated on the stack
        let array: [i32; 4] = mem::uninitialized();
        for elem in &array {
            ptr::read_volatile(&elem);
        }
    }
}
EOF

$ # we need a custom linking step to preserve the .stack_sizes section
$ # (see unresolved questions for a solution that doesn't require custom linking)
$ cat > keep-stack-sizes.x <<'EOF'
SECTIONS
{
  .stack_sizes :
  {
    KEEP(*(.stack_sizes));
  }
}
EOF

$ cargo rustc --release -- \
    -Z emit-stack-sizes \
    -C link-arg=-Wl,-Tkeep-stack-sizes.x \
    -C link-arg=-N

$ size -A target/release/hello | grep stack_sizes
.stack_sizes    117   185136
```

Then a tool like [`stack-sizes`] can be used to print the information in human readable format

[`stack-sizes`]: https://github.com/japaric/stack-sizes/#stack-sizes

``` console
$ stack-sizes target/release/hello
address                 size    name
0x000000000004b0        0       core::array::<impl core::iter::traits::IntoIterator for &'a [T; _]>::into_iter::ha50e6661c0ec84aa
0x000000000004c0        8       std::rt::lang_start::ha02aea783e0e1b3e
0x000000000004f0        8       std::rt::lang_start::{{closure}}::h5115b527d5244952
0x00000000000500        8       core::ops::function::FnOnce::call_once::h6bfa1076da82b0fb
0x00000000000510        0       core::ptr::drop_in_place::hb4de82e57787bc70
0x00000000000520        8       hello::main::h08bb6cec0556bd66
0x00000000000530        0       hello::registers::h9d058a5d765ec1d2
0x00000000000540        24      hello::stack::h88c8cb66adfdc6f3
0x00000000000580        8       main
0x000000000005b0        0       __rust_alloc
0x000000000005c0        0       __rust_dealloc
0x000000000005d0        0       __rust_realloc
0x000000000005e0        0       __rust_alloc_zeroed
```

# Stability

Like `-Z sanitize` this is a re-export of an LLVM feature. To me knowledge, we don't have a policy
about stabilization of such features as they are incompatible with, or demand extra implementation
effort from, alternative backends (e.g. cranelift). As such this feature will remain experimental /
unstable for the foreseeable future.

# Unresolved questions

## Section name

Should we rename the `.stack_sizes` section to `.debug_stacksizes`?

With the former name linkers will strip the section unless told otherwise using a linker script,
which means getting this information requires both knowledge about linker scripts and a custom
linker invocation (see example above).

If we use the `.debug_stacksizes` name (I believe) linkers will always keep the section, which means
`-Z emit-stack-sizes` is the only thing required to get the stack usage information.

# ~TODOs~

~Investigate why this doesn't work with the `thumb` targets. I get the LLVM error shown below:~

``` console
$ cargo new --lib foo && cd $_

$ echo '#![no_std] pub fn foo() {}' > src/lib.rs

$ cargo rustc --target thumbv7m-none-eabi -- -Z emit-stack-sizes
LLVM ERROR: unsupported relocation on symbol
```

~which sounds like it might be related to the `relocation-model` option. Maybe `relocation-model =
static` is not supported for some reason?~

This fixed itself after the LLVM upgrade.

---

r? @nikomatsakis
cc @rust-lang/compiler @perlindgren @whitequark

5 years agostd: Don't let `rust_panic` get inlined
Alex Crichton [Wed, 26 Sep 2018 14:48:43 +0000 (07:48 -0700)]
std: Don't let `rust_panic` get inlined

It's meant for breakpoints, so if it gets inlined we can't set a
breakpoint on it easily!

5 years agofixup! codegen_llvm: check inline assembly constraints with LLVM
Levente Kurusa [Wed, 26 Sep 2018 14:23:10 +0000 (16:23 +0200)]
fixup! codegen_llvm: check inline assembly constraints with LLVM

5 years agodon't run the test on macOS
Jorge Aparicio [Wed, 26 Sep 2018 14:22:52 +0000 (16:22 +0200)]
don't run the test on macOS

5 years agoadd declaration blocks to attribute/derive pages
QuietMisdreavus [Wed, 26 Sep 2018 14:18:58 +0000 (09:18 -0500)]
add declaration blocks to attribute/derive pages

5 years agorustc_driver/test.rs: rustfmt
Niko Matsakis [Tue, 25 Sep 2018 17:58:32 +0000 (13:58 -0400)]
rustc_driver/test.rs: rustfmt

5 years agofix rustc_driver tests
Niko Matsakis [Tue, 25 Sep 2018 17:58:22 +0000 (13:58 -0400)]
fix rustc_driver tests

5 years agopacify the mercilous tidy.
Niko Matsakis [Tue, 25 Sep 2018 15:32:58 +0000 (11:32 -0400)]
pacify the mercilous tidy.

5 years agorustfmt `error_reporting/mod.rs` and `dropck.rs`
Niko Matsakis [Tue, 25 Sep 2018 15:32:39 +0000 (11:32 -0400)]
rustfmt `error_reporting/mod.rs` and `dropck.rs`

Pacify the mercilous tidy.

5 years agoupdate tests and add stderr files
Niko Matsakis [Mon, 24 Sep 2018 19:36:50 +0000 (15:36 -0400)]
update tests and add stderr files

5 years agoconvert from an `UnlessNll` flag to a `SuppressRegionErrors` flag
Niko Matsakis [Mon, 24 Sep 2018 17:05:10 +0000 (13:05 -0400)]
convert from an `UnlessNll` flag to a `SuppressRegionErrors` flag

Hopefully this will help clarify the behavior in the various borrowck
modes

5 years agomake NLL handle `IfEq` bounds by using SCC normalization
Niko Matsakis [Fri, 21 Sep 2018 23:26:24 +0000 (19:26 -0400)]
make NLL handle `IfEq` bounds by using SCC normalization