Shotaro Yamada
7eefe2b473
Fix rustdoc panic with impl Trait
in type parameters
2018-05-16 11:03:02 +09:00
bors
e44fc6c52d
Auto merge of #48523 - varkor:generics-ty-generalisations, r=nikomatsakis
...
The Great Generics Generalisation: Ty Edition
Part of the generic parameter refactoring effort, split off from https://github.com/rust-lang/rust/pull/48149 . Contains the `ty`-relative refactoring.
r? @eddyb
2018-05-15 23:03:04 +00:00
bors
f0fdaba04e
Auto merge of #50767 - oli-obk:rls_clippy, r=kennytm
...
Don't inject clippy into the rls anymore
r? @kennytm
sorry about breaking nightlies.
The issue is that the `[patch.crates-io]` doesn't work if the versions differ. So every time we update clippy, we can only update it to the verison that rls is depending on.
I'm disabling the injection of clippy into rls for now. I'm not sure how to do this properly. We could
* add a version check, so rls only builds clippy if its dependency clippy is the same as the submodule clippy
* do something crazy like auto-patching the Cargo.toml of the rls tool repo to just use a path dependency on clippy
* build crates-io clippy instead of submodule clippy and gate clippy injection on that
* that's somewhat automatic, and is essentially what is necessary right now, but done manually
* make clippy 0.1.* instead of 0.0.* and update patch versions for nightly updates and minor version updates for `clippy_lints` api changes.
* not sure how semver-great this is
2018-05-15 20:18:13 +00:00
varkor
5be2bdb498
One must always remember to clean up after themselves
2018-05-15 14:52:53 +01:00
varkor
5ea91ac531
Collapse Substs::identity_for_item in collect
2018-05-15 14:22:25 +01:00
varkor
39a68e9069
Clean up dropck_outlives PhantomData handling
2018-05-15 14:22:25 +01:00
varkor
0a9371ab77
Add mk_param_from_def
2018-05-15 14:22:25 +01:00
varkor
e9c28b2564
Use Kind instead of UnpackedKind in Substs methods
2018-05-15 14:22:25 +01:00
varkor
3ae2468261
Clean up shared subst code
2018-05-15 14:22:11 +01:00
varkor
d9190da982
Refactor Substs methods on generic parameters
2018-05-15 14:22:11 +01:00
varkor
030f10f752
Clean up generic param handling
2018-05-15 14:21:32 +01:00
varkor
25bf73d31c
Update bad-annotation error message
2018-05-15 14:21:32 +01:00
varkor
b575c18992
Refactoring generic counting loops
2018-05-15 14:21:32 +01:00
varkor
fe1f651e4c
Review refactoring
2018-05-15 14:21:32 +01:00
varkor
fd8e284a20
Rename param_counts to own_counts
2018-05-15 14:21:32 +01:00
varkor
365c8c3704
Remove GenericParamDef::to_type
2018-05-15 14:21:32 +01:00
varkor
007de2f896
Lift pure_wrt_drop to GenericParamDef
2018-05-15 14:21:32 +01:00
varkor
9200bdee26
Refactor generic params loops
2018-05-15 14:21:32 +01:00
varkor
18f77e25e9
Fix rebase fallout
2018-05-15 14:21:32 +01:00
varkor
9f9d4beda6
Rename RegionParamDef to LifetimeParamDef
2018-05-15 14:21:32 +01:00
varkor
4bed895cab
Pull common parameters into GenericParamDef
...
This leads to a lot of simplifications, as most code doesn't actually need to know about the specific lifetime/type data; rather, it's concerned with properties like name, index and def_id.
2018-05-15 14:21:32 +01:00
varkor
5e89312a22
Inline get_type
2018-05-15 14:21:32 +01:00
varkor
fc27c2eb38
Fix typo in late-bound region testing message
2018-05-15 14:21:31 +01:00
varkor
d62fc236f9
Refactor to address comments
2018-05-15 14:21:31 +01:00
varkor
df1c256a2b
Replace type_param_to_index with param_def_id_to_index
2018-05-15 14:21:31 +01:00
varkor
7b45a892a4
Use GenericParamCount instead of FxHashMap
2018-05-15 14:21:31 +01:00
varkor
a17896a3b6
Place Self at the start of ty::Generics' param lists
2018-05-15 14:21:03 +01:00
varkor
6f257bf26f
Correct variable renaming fallout
2018-05-15 14:21:03 +01:00
varkor
0b8b14f6f5
Eliminate ty::Generics::types()
...
And with one final incanation, the specific kind iterators were banished from ty::Generics, never to be seen again!
2018-05-15 14:21:03 +01:00
varkor
d557ff983f
Eliminate ty::Generics::lifetimes()
...
Begone lazy lifetime code!
2018-05-15 14:21:03 +01:00
varkor
b75f421ee9
Generalise more cases of explicit iteration of specific kinds
2018-05-15 14:21:03 +01:00
varkor
4a6c946368
Generalise cases of explicit iteration of specific kinds
2018-05-15 14:21:03 +01:00
varkor
cadf96e8e1
Fix tidy errors caused by renaming
2018-05-15 14:20:19 +01:00
varkor
06f0a7c89f
Rename TypeParameterDef -> TypeParamDef and RegionParameterDef -> RegionParamDef
2018-05-15 14:20:19 +01:00
varkor
178a8f1139
Rename GenericParam to GenericParamDef
2018-05-15 14:20:19 +01:00
varkor
15d2759d90
Rename has_type_parameters
to requires_monomorphization
2018-05-15 14:20:19 +01:00
varkor
a9622dc5c6
Fix generics type parameter handling in miri
2018-05-15 14:20:19 +01:00
varkor
5b4e2b7fbc
Inline Generics::own_count
2018-05-15 14:20:19 +01:00
varkor
e5825c29c3
Prefer iterator to vec
2018-05-15 14:20:19 +01:00
varkor
e9e3d5703b
Rename ty::GenericParameterDef to GenericParam
2018-05-15 14:20:19 +01:00
varkor
63553547e5
Rename ty::Generics::parameters to params
2018-05-15 14:20:19 +01:00
varkor
de1c29c95e
Reduce parent_params to parent_count
2018-05-15 14:20:19 +01:00
varkor
fe0c119e7d
Consolidate ty::Generics
2018-05-15 14:20:19 +01:00
bors
27acb9b3c0
Auto merge of #50769 - GuillaumeGomez:rollup, r=GuillaumeGomez
...
Rollup of 11 pull requests
Successful merges:
- #49767 (Rewrite docs for `std::ptr`)
- #50399 (save-analysis: handle aliasing imports a bit more nicely)
- #50594 (Update the man page with additional --print options)
- #50613 (Migrate the toolstate update bot to rust-highfive)
- #50632 (Add minification process)
- #50685 (ci: Add Dockerfile for dist-sparc64-linux)
- #50691 (rustdoc: Add support for pub(restricted))
- #50712 (Improve eager type resolution error message)
- #50720 (Add “Examples” section header in f32/f64 doc comments.)
- #50733 (Hyperlink DOI against preferred resolver)
- #50745 (Uncapitalize "You")
Failed merges:
2018-05-15 13:14:08 +00:00
Guillaume Gomez
4066d2235d
Rollup merge of #50745 - kraai:patch-1, r=kennytm
...
Uncapitalize "You"
2018-05-15 14:27:06 +02:00
Guillaume Gomez
8902fc2687
Rollup merge of #50733 - katrinleinweber:patch-secure-DOI, r=kennytm
...
Hyperlink DOI against preferred resolver
Hello :-) The DOI foundation recommends [this new, secure resolver](https://www.doi.org/doi_handbook/3_Resolution.html#3.8 ). Accordingly, this PR updates a DOI link.
2018-05-15 14:27:05 +02:00
Guillaume Gomez
9c4843ff91
Rollup merge of #50720 - frewsxcv:frewsxcv-examples, r=QuietMisdreavus
...
Add “Examples” section header in f32/f64 doc comments.
This is recommend by [RFC 0505] and as far as I know, the only primitive
types without this heading.
[RFC 0505]: c892139be6/text/0505-api-comment-conventions.md (using-markdown)
2018-05-15 14:27:04 +02:00
Guillaume Gomez
7c7941dc26
Rollup merge of #50712 - leodasvacas:improve-eager-resolution-error-message, r=estebank
...
Improve eager type resolution error message
This PR improves the span of eager resolution type errors referring to indexing and field access to use the base span rather than the whole expression.
Also a "note: type must be known at this point" is added where in the past we emitted the "type must be known at this context" error, so that early failures can be differentiated and will hopefully be less surprising.
Fixes #50692 (or at least does the best we can for the moment)
r? @estebank
2018-05-15 14:27:02 +02:00
Guillaume Gomez
6dc4971cf8
Rollup merge of #50691 - ollie27:rustdoc_pub_restricted, r=QuietMisdreavus
...
rustdoc: Add support for pub(restricted)
This is useful when using `--document-private-items`.
r? @QuietMisdreavus
2018-05-15 14:27:01 +02:00
Guillaume Gomez
eb83606b86
Rollup merge of #50685 - glaubitz:sparc64-linux, r=alexcrichton
...
ci: Add Dockerfile for dist-sparc64-linux
This addresses https://github.com/rust-lang/rust/issues/47903 .
2018-05-15 14:27:00 +02:00