Commit Graph

78535 Commits

Author SHA1 Message Date
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
30d950231e Add missing error codes in libsyntax-ext asm 2018-05-15 14:29:57 +02: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
Guillaume Gomez
934e37aeb4
Rollup merge of #50632 - GuillaumeGomez:minification, r=ollie27
Add minification process

r? @QuietMisdreavus
2018-05-15 14:26:59 +02:00
Guillaume Gomez
91c648b9c1
Rollup merge of #50613 - kennytm:update-toolstate-with-highfive, r=alexcrichton
Migrate the toolstate update bot to rust-highfive

Rationale: Only members of the rust-lang organization can mention its teams. That means #50434 has no effect if we are still using @kennytm-githubbot.
2018-05-15 14:26:57 +02:00
Guillaume Gomez
30c0b56e8f
Rollup merge of #50594 - sanxiyn:man-print, r=steveklabnik
Update the man page with additional --print options

`\:` is a `groff` for `<wbr>` to get better line breaking.
2018-05-15 14:26:56 +02:00
Guillaume Gomez
d4bd85d68e
Rollup merge of #50399 - nrc:alias, r=eddyb
save-analysis: handle aliasing imports a bit more nicely

r? @eddyb
2018-05-15 14:26:55 +02:00
Guillaume Gomez
7a9eb836a9
Rollup merge of #49767 - ecstatic-morse:ptr-docs, r=steveklabnik
Rewrite docs for `std::ptr`

This PR attempts to resolve #29371.

This is a fairly major rewrite of the `std::ptr` docs, and deserves a fair bit of scrutiny. It adds links to the GNU libc docs for various instrinsics, adds internal links to types and functions referenced in the docs, adds new, more complex examples for many functions, and introduces a common template for discussing unsafety of functions in `std::ptr`.

All functions in `std::ptr` (with the exception of `ptr::eq`) are unsafe because they either read from or write to a raw pointer. The "Safety" section now informs that the function is unsafe because it dereferences a raw pointer and requires that any pointer to be read by the function points to "a valid vaue of type `T`".

Additionally, each function imposes some subset of the following conditions on its arguments.

* The pointer points to valid memory.
* The pointer points to initialized memory.
* The pointer is properly aligned.

These requirements are discussed in the "Undefined Behavior" section along with the  consequences of using functions that perform bitwise copies without requiring `T: Copy`. I don't love my new descriptions of the consequences of making such copies. Perhaps the old ones were good enough?

Some issues which still need to be addressed before this is merged:
- [ ] The new docs assert that `drop_in_place` is equivalent to calling `read` and discarding the value. Is this correct?
- [ ] Do `write_bytes` and `swap_nonoverlapping` require properly aligned pointers?
- [ ] The new example for `drop_in_place` is a lackluster.
- [ ] Should these docs rigorously define what `valid` memory is? Or should is that the job of the reference? Should we link to the reference?
- [ ] Is it correct to require that pointers that will be read from refer to "valid values of type `T`"?
- [x] I can't imagine ever using `{read,write}_volatile` with non-`Copy` types.  Should I just link to {read,write} and say that the same issues with non-`Copy` types apply?
- [x] `write_volatile` doesn't link back to `read_volatile`.
- [ ] Update docs for the unstable [`swap_nonoverlapping`](https://github.com/rust-lang/rust/issues/42818)
- [ ] Update docs for the unstable [unsafe pointer methods RFC](https://github.com/rust-lang/rfcs/pull/1966)

Looking forward to your feedback.

r? @steveklabnik
2018-05-15 14:26:54 +02:00
Matthew Jasper
dc8ce4c139 Update existing tests for trivial bounds changes 2018-05-15 11:43:59 +01:00
Matthew Jasper
9b0dfe184e Add tests for trivial bounds 2018-05-15 11:43:59 +01:00
Matthew Jasper
dabb820b00 Add trivial bounds lint 2018-05-15 11:43:59 +01:00
Matthew Jasper
27183a9030 Feature gate trivial bounds 2018-05-15 11:43:57 +01:00
Matthew Jasper
d0ec8ea1cc Implement RFC 2056 - trivial constraints 2018-05-15 11:37:33 +01:00
bors
eca0da5985 Auto merge of #50351 - varkor:vestigial-never-conversion, r=nikomatsakis
Remove vestigial diverging !-coercion

Such conversions are no longer permitted. Fixes #50350.

r? @nikomatsakis
2018-05-15 10:34:45 +00:00
Oliver Schneider
0370c38895
Don't inject clippy into the rls anymore 2018-05-15 11:34:24 +02:00
Nick Cameron
a10577ca53 save-analysis: handle aliasing imports a bit more nicely 2018-05-15 20:34:17 +12:00
bors
0b17da2d7b Auto merge of #50748 - steveklabnik:remove-simd-note, r=alexcrichton
Update stdsimd module

to include a19ca1cd91
2018-05-15 08:19:06 +00:00
bobtwinkles
3b36fa8c3f Get closer to successful compilation 2018-05-14 23:15:56 -07:00
bors
d5ecf70fd6 Auto merge of #50259 - GuillaumeGomez:improve-results, r=ollie27
Rustdoc improvements

Fixes #50658. (last commit)

A lot of small improvements.

r? @QuietMisdreavus
2018-05-15 05:39:35 +00:00
bobtwinkles
f03518bfad Framework and rough implementation for invalidates facts
this probably doesn't compile and definitely doesn't work
2018-05-14 20:49:02 -07:00
bors
d711dc9d57 Auto merge of #50011 - varkor:partialord-opt-ii, r=Manishearth
Ensure derive(PartialOrd) is no longer accidentally exponential

Previously, two comparison operations would be generated for each field, each of which could delegate to another derived PartialOrd. Now we use ordering and optional chaining to ensure each pair of fields is only compared once, addressing https://github.com/rust-lang/rust/issues/49650#issuecomment-379467572.

Closes #49505.

r? @Manishearth (sorry for changing it again so soon!)

Close #50755
2018-05-15 03:14:46 +00:00
bors
308b7b05c3 Auto merge of #50705 - oli-obk:clippy, r=kennytm
Update clippy

r? @Manishearth

@bors p=1
2018-05-15 00:35:47 +00:00
Vadim Petrochenkov
d1b027421e Turn deprecation lint legacy_imports into a hard error 2018-05-15 02:25:04 +03:00
John Paul Adrian Glaubitz
df2bbf7960 ci: Add Dockerfile for dist-sparc64-linux 2018-05-15 00:19:30 +02:00