Skip to content

Rollup of 12 pull requests #66138

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

Closed
wants to merge 30 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
692ae3d
Move has_panic_handler to query
Mark-Simulacrum Oct 28, 2019
6a30ce6
Add type parameter name to type mismatch error messages
dkadashev Oct 31, 2019
036f182
Show type param definitions in type mismatch errors
dkadashev Oct 31, 2019
4e10b75
Update tests
dkadashev Nov 1, 2019
774e60b
Prettify mismatched types error message in a special case
dkadashev Nov 2, 2019
0aee0dd
rename Memory::get methods to get_raw to indicate their unchecked nature
RalfJung Nov 2, 2019
90f891d
syntax: Avoid span arithmetics for delimiter tokens
petrochenkov Nov 3, 2019
d06a4de
use silent emitter for rustdoc highlighting pass
euclio Nov 3, 2019
b4dde36
let caller of check_ptr_access_align control the error message
RalfJung Nov 4, 2019
3bbfc73
Detect `::` -> `:` typo when involving turbofish
estebank Nov 5, 2019
f28126e
Fix typo in explanation of `E0080`
JOE1994 Nov 5, 2019
7d7fbcb
Remove `PartialEq` and `Eq` from the `SpecialDerives`.
pnkfelix Oct 28, 2019
0dfe0ed
Review feedback: Remove more stuff! Simplify simplify simplify!
pnkfelix Oct 30, 2019
9924361
Review feedback: alpha-rename field from `copy_derives` to `container…
pnkfelix Nov 4, 2019
a8ccbf5
Account for typo in turbofish and suggest `::`
estebank Nov 5, 2019
2595332
rustc: remove "GlobalMetaData" dead code from hir::map::definitions.
eddyb Nov 5, 2019
bbd7f5c
Do not ICE whith a precision flag in formatting str and no format arg…
estebank Nov 4, 2019
b0f258b
Tweak type mismatch caused by break on tail expr
estebank Nov 5, 2019
ae95e24
Rollup merge of #65892 - pnkfelix:trim-special-derives, r=petrochenkov
Centril Nov 5, 2019
da83cd0
Rollup merge of #66014 - dkadashev:47319-type-param-def-location, r=e…
Centril Nov 5, 2019
979fede
Rollup merge of #66027 - Mark-Simulacrum:panic-handler-query, r=alexc…
Centril Nov 5, 2019
af52264
Rollup merge of #66043 - RalfJung:memory-get-raw, r=cramertj
Centril Nov 5, 2019
de02742
Rollup merge of #66054 - petrochenkov:delspan, r=estebank
Centril Nov 5, 2019
580dbb5
Rollup merge of #66068 - euclio:null-emitter, r=estebank
Centril Nov 5, 2019
1ca07d9
Rollup merge of #66081 - RalfJung:ptr-offset, r=zackmdavis
Centril Nov 5, 2019
c17de6b
Rollup merge of #66093 - estebank:fmt-ice, r=Centril
Centril Nov 5, 2019
defb251
Rollup merge of #66098 - estebank:path-asciption-typo, r=Centril
Centril Nov 5, 2019
ef04a62
Rollup merge of #66101 - estebank:break-tail-e0308, r=Centril
Centril Nov 5, 2019
945be0c
Rollup merge of #66106 - JOE1994:master, r=GuillaumeGomez
Centril Nov 5, 2019
b173d97
Rollup merge of #66115 - eddyb:global-meta-what, r=michaelwoerister
Centril Nov 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add type parameter name to type mismatch error messages
Part of #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`
```
  • Loading branch information
dkadashev committed Nov 2, 2019
commit 6a30ce639f9eeba7d085721d219553635f32c280
2 changes: 1 addition & 1 deletion src/librustc/ty/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ impl<'tcx> ty::TyS<'tcx> {
ty::Infer(ty::FreshFloatTy(_)) => "fresh floating-point type".into(),
ty::Projection(_) => "associated type".into(),
ty::UnnormalizedProjection(_) => "non-normalized associated type".into(),
ty::Param(_) => "type parameter".into(),
ty::Param(p) => format!("type parameter `{}`", p).into(),
ty::Opaque(..) => "opaque type".into(),
ty::Error => "type error".into(),
}
Expand Down