Skip to content

Rollup of 11 pull requests - #66141

Merged
bors merged 28 commits into
rust-lang:masterfrom
Centril:rollup-n2fcvp9
Nov 6, 2019
Merged

Rollup of 11 pull requests#66141
bors merged 28 commits into
rust-lang:masterfrom
Centril:rollup-n2fcvp9

Conversation

@Centril

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

Mark-Simulacrumand others added 28 commits November 1, 2019 22:24
Part of rust-lang#47319.
This just adds type parameter name to type mismatch error message, so
e.g. the following:
```
expected enum `std::option::Option`, found type parameter
```
becomes
```
expected enum `std::option::Option`, found type parameter `T`
```
Fixesrust-lang#47319.
Shows the type parameter definition(s) on type mismatch errors so the
context is clearer. Pretty much changes the following:
```
LL | bar1(t);
| ^
| |
| expected enum `std::option::Option`, found type parameter `T`
```
into:
```
LL | fn foo1<T>(t: T) {
| - this type parameter
LL | bar1(t);
| ^
| |
| expected enum `std::option::Option`, found type parameter `T`
```
Update the tests to reflect changes to how type mismatch errors are
reported (two previous commits).
Type parameters are referenced in the error message after the previous
few commits (using span label). But when the main error message already
references the very same type parameter it becomes clumsy. Do not show
the additional label in this case as per code review comment by
@estebank.
Also this contains a small style fix.
Handling issue rust-lang#66105 in Rust repo.
`evaluate an constant expression` to `evaluate a constant expression`
When `break;` has a type mismatch because the `Destination` points at a tail
expression with an obligation flowing from a return type, point at the
return type.
Fixrust-lang#39968.
…trochenkov
Remove `PartialEq` and `Eq` from the `SpecialDerives`.
Now that PR rust-lang#65519 landed, this is the follow-on work of removing `PartialEq` and `Eq` from the set of `SpecialDerives` .
…tion, r=estebank
Show type parameter name and definition in type mismatch error messages
Fixesrust-lang#47319
r? estebank
…, r=alexcrichton
Move has_panic_handler to query
Moves us off of a global Once instead re-querying the lang item each time. The conditions on when we set it to true change a little (previously we'd make sure a few more lang items were `Some`) but I think they in practice don't matter, we won't compile later on if we don't have them.
syntax: Avoid span arithmetic for delimiter tokens
The +/-1 logic is from the time where the whole group had a single span and the delimiter spans had to be calculated from it.
Now the delimiters have their own spans which are constructed by lexer or proc macro API and can be used directly.
If those spans are not perfect, then it should be fixed by tweaking the corresponding lexer logic rather than by trying to add or substract `1` from the span boundaries.
Fixesrust-lang#62524
r? @estebank
use silent emitter for rustdoc highlighting pass
Partially addresses rust-lang#63284.
let caller of check_ptr_access_align control the error message
This is needed for rust-lang/miri#1031
Do not ICE with a precision flag in formatting str and no format arguments
Fixrust-lang#66065.
…tril
Detect `::` -> `:` typo when involving turbofish
Fixrust-lang#65569.
Tweak type mismatch caused by break on tail expr
When `break;` has a type mismatch because the `Destination` points at a tail
expression with an obligation flowing from a return type, point at the
return type.
Fixrust-lang#39968.
Fix typo in explanation of `E0080`
Handling issue rust-lang#66105 in Rust repo.
`evaluate an constant expression` to `evaluate a constant expression`
…erister
rustc: remove "GlobalMetaData" dead code from hir::map::definitions.
Spotted while refactoring uses of `DefIndex` and/or `LocalDefId`.
r? @michaelwoerister
@CentrilCentril added the rollup A PR which is a rollup label Nov 6, 2019
@Centril

Copy link
Copy Markdown
ContributorAuthor

@bors r+ p=11 rollup=never

@bors

bors commented Nov 6, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 35a5ffc has been approved by Centril

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 6, 2019
@bors

bors commented Nov 6, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 35a5ffc with merge e4931ea...

bors added a commit that referenced this pull request Nov 6, 2019
Rollup of 11 pull requests
Successful merges:
- #65892 (Remove `PartialEq` and `Eq` from the `SpecialDerives`.)
- #66014 (Show type parameter name and definition in type mismatch error messages )
- #66027 (Move has_panic_handler to query)
- #66054 (syntax: Avoid span arithmetic for delimiter tokens)
- #66068 (use silent emitter for rustdoc highlighting pass)
- #66081 (let caller of check_ptr_access_align control the error message)
- #66093 (Do not ICE with a precision flag in formatting str and no format arguments)
- #66098 (Detect `::` -> `:` typo when involving turbofish)
- #66101 (Tweak type mismatch caused by break on tail expr)
- #66106 (Fix typo in explanation of `E0080`)
- #66115 (rustc: remove "GlobalMetaData" dead code from hir::map::definitions.)
Failed merges:
r? @ghost
@bors

bors commented Nov 6, 2019

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: Centril
Pushing e4931ea to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Nov 6, 2019
@bors
bors merged commit 35a5ffc into rust-lang:masterNov 6, 2019
@rust-highfive

Copy link
Copy Markdown
Contributor

📣 Toolstate changed by #66141!

Tested on commit e4931ea.
Direct link to PR: #66141

💔 clippy-driver on windows: test-pass → test-fail (cc @mcarton@oli-obk@Manishearth@flip1995@yaahc@phansch@llogiq, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → test-fail (cc @mcarton@oli-obk@Manishearth@flip1995@yaahc@phansch@llogiq, @rust-lang/infra).

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

12 participants

@Centril@bors@rust-highfive@Mark-Simulacrum@dkadashev@petrochenkov@euclio@RalfJung@estebank@JOE1994@pnkfelix@eddyb