Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect return type error diagnostic #59403

Closed
wants to merge 53 commits into from

Conversation

pmccarter
Copy link
Contributor

Fixes #58982

This fixes the case by highlighting the previous return site span only when the coercion target is a type variable (eg when return type is impl Trait determined by the function body).

bors and others added 30 commits January 17, 2019 21:47
Prepare beta 1.33.0, take 2

This PR includes the usual changes for a new beta, and suppresses a few lints on libcore: those lints are false positives caused by an internal attribute (rustc_layout_scalar_valid_range_start) and only happen on stage0.

r? @Mark-Simulacrum

*Note: recreated to avoid issues with the old PR.*
…ulacrum

Update beta to released compiler
…roalbini

beta: Update RLS version to 1.33

We missed the 1.32 stable release for version bump, let's make it less confusing and backport a version bump for the current 1.33 beta.

rust-lang/rls#1239

r? @pietroalbini

cc @nrc
Issue 57762 points out a compiler crash when the compiler was built
using a stock LLVM 7.  LLVM 7 was released without a necessary fix for
a bug in the DWARF discriminant code.

This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.

Closes rust-lang#57762
Address the review comments by simplifying the version check to
just "< 8".
…albini

[beta] Rollup backports

* rust-lang#57857: Fix Android CI failing to download SDKs
* rust-lang#57840: Fix issue 57762
* rust-lang#57698: Fix typo bug in DepGraph::try_mark_green().

r? @ghost
Fixes rust-lang#57262

Signed-off-by: Marc-Antoine Perennou <[email protected]>
[beta] rustbuild: fix build with rust 1.33

Fixes rust-lang#57262
The borrow place *must* be a place that we track borrows for, otherwise
we will likely ICE.
…albini

[beta] Rollup backports

Cherry-picked:

* rust-lang#58008: Pass correct arguments to places_conflict
* rust-lang#58007: Don't panic when accessing enum variant ctor using `Self` in match
* rust-lang#57978: Fix bug in integer range matching
* rust-lang#57862: Build the standard library for thumbv7neon-unknown-linux-gnueabihf in CI
* rust-lang#57659: Fix release manifest generation

r? @ghost
[beta] Fix `attempted .def_id() on invalid def: NonMacroAttr(Builtin)`

backport of the fix so we can get update the bootstrap compiler to a compiler that has this fix. It's very hard to do development on stage 0/1 since resolve errors often end up with an ICE before outputting any useful diagnostics.

cc @rust-lang/compiler @rust-lang/infra I would like to fast-track this backport as it severly hampers @varkor's and my rustc developments. The ICE never happens for successful compiles, only if there are errors.

Since it is very minimalistic and can easily be reverted if desired I think/hope we can skip the usual beta nomination + beta accepted steps
Currently it just unconditionally allocates it in the arena.

For a "Clean Check" build of the the `packed-simd` benchmark, this
change reduces both the `max-rss` and `faults` counts by 59%; it
slightly (~3%) increases the instruction counts but the `wall-time` is
unchanged.

For the same builds of a few other benchmarks, `max-rss` and `faults`
drop by 1--5%, but instruction counts and `wall-time` changes are in the
noise.

Fixes rust-lang#57432, fixes rust-lang#57829.
This commit fixes a bug introduced by rust-lang#55937 which started checking user
type annotations for associated type patterns. Where lowering a
associated constant expression would previously return a
`PatternKind::Constant`, it now returns a `PatternKind::AscribeUserType`
with a `PatternKind::Constant` inside, this commit unwraps that to
access the constant pattern inside and behaves as before.
In particular, the table entries (associated with type-variables
created during the probe) must persist as long as the candidates
assembled during the probe. If you make a nested probe without
creating a nested `ProbeContext`, the table entries are popped at the
end of the nested probe, while the type-variables would leak out via
the assembled candidates attached to `self` (the outer
`ProbeContext`). This causes an ICE (*if you are lucky*)!
These aren't fixed by this PR, but were broken in a few older attempts
at it. Make sure they don't regress.
nikomatsakis and others added 17 commits February 22, 2019 16:43
This set of diffs was produced by combing through
b68fad6 and seeing where the
`leak_check` used to be invoked and how.
One surprise: old-lub-glb-object.rs, may indicate a bug
This preserves the error you currently get on stable for the
old-lub-glb-object.rs test.
Incorporates a bunch of the documentation-related comments that came up when discussing `Pin` stabilization.
Cherry-picked (and squashed) from rust-lang#58227.
…lbini

[stable] Rust 1.33.0 release

r? @ghost
cc @rust-lang/release
…imulacrum

Revert abort on unwinding through FFI on stable

This is entirely done to allow us more time for discussion about what behavior we want to specify here.
@rust-highfive
Copy link
Contributor

r? @matthewjasper

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive
Copy link
Contributor

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against stable. Please double check that you specified the right target!

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 24, 2019
Copy link
Contributor

@matthewjasper matthewjasper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be rebased and retargeted on master?

@matthewjasper matthewjasper added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 25, 2019
@pmccarter
Copy link
Contributor Author

@matthewjasper as far as I can tell this only applies to the stable branch (you can check the playground linked from the issue).

@matthewjasper
Copy link
Contributor

matthewjasper commented Mar 27, 2019

In that case there just needs to be a test added for this (on master). Stable will be fixed with the next release.

edit: actually, liveness-forgot-ret appears to be sufficient for this.

@bors
Copy link
Collaborator

bors commented Apr 8, 2019

☔ The latest upstream changes (presumably #59737) made this pull request unmergeable. Please resolve the merge conflicts.

@kennytm
Copy link
Member

kennytm commented Apr 8, 2019

A new stable has been branched off and will be released in 3 days. Let's just close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.