28 Commits

Author SHA1 Message Date
Lzu Tao
6c1b447f2e Remove unneeded fn main blocks from docs 2019-10-01 11:55:46 +00:00
Alexander Regueiro
b0006dff10 A few cosmetic improvements to code & comments in liballoc and libcore 2019-09-06 16:02:25 +01:00
Simon Sapin
9bd70834b0
Doc nit
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-08-17 21:40:35 +02:00
Simon Sapin
ba0328327c Doc nits
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-08-17 15:42:05 +02:00
Simon Sapin
7b02b9f8ec Add new_uninit and assume_init on Box, Rc, and Arc 2019-08-16 17:11:18 +02:00
Mazdak Farrokhzad
e9615f2487
Rollup merge of #63297 - RalfJung:ptr_offset, r=dtolnay
Improve pointer offset method docs

Cc @rkruppe @gnzlbg
2019-08-12 10:58:13 +02:00
Ralf Jung
0dc9e2a565 improve wrapping_ docs 2019-08-05 18:55:56 +02:00
Ralf Jung
aa72b1d3e3 note about stack-allocated variables being allocated objects 2019-08-05 18:41:33 +02:00
Ralf Jung
1f018636e3 improve align_offset docs 2019-08-05 18:38:10 +02:00
Bruce Mitchener
86633b6389 Fix typos in doc comments. 2019-08-02 01:36:36 +07:00
Mazdak Farrokhzad
b5bea2565e
Rollup merge of #61965 - phil-opp:patch-4, r=scottmcm
Remove mentions of removed `offset_to` method from `align_offset` docs

The `offset_to` method was deleted in https://github.com/rust-lang/rust/pull/52814.

The replacement for the removed method is `wrapping_offset_from`. However, neither method takes an `usize` as argument, so I don't think that it makes sense to mention them.
2019-07-30 05:37:30 +02:00
Vadim Petrochenkov
676d282dd3 Deny unused_lifetimes through rustbuild 2019-07-28 18:47:02 +03:00
Mazdak Farrokhzad
7dafdd21b1
Rollup merge of #62788 - fakenine:normalize_use_of_backticks_compiler_messages_p9, r=Centril
normalize use of backticks in compiler messages for libcore/ptr

https://github.com/rust-lang/rust/issues/60532
2019-07-22 15:32:15 +02:00
Samy Kacimi
886fb218ed
normalize use of backticks in compiler messages for libcore/ptr
https://github.com/rust-lang/rust/issues/60532
2019-07-18 23:33:16 +02:00
Philipp Oppermann
c9c73f5d25 Refer to add method instead of offset
The `align_offset` method returns an `usize`, so using `add` makes more sense than using `offset`, which takes an `isize`.
2019-07-17 17:25:43 +02:00
Simon Sapin
8040c54b08 Stabilize <*mut _>::cast and <*const _>::cast
FCP: https://github.com/rust-lang/rust/issues/60602#issuecomment-511146402
2019-07-16 08:51:53 +02:00
Freyskeyd
bc322af444
doc(ptr): add example for {read,write}_unaligned
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
2019-07-09 16:55:00 +02:00
Mazdak Farrokhzad
d3569ddf32
Rollup merge of #62323 - Centril:clarify-read-unaligned, r=RalfJung
Clarify unaligned fields in ptr::{read,write}_unaligned

r? @RalfJung
2019-07-05 13:53:07 +02:00
Mark Rousskov
8a7dded1a2 Switch master to 1.38 2019-07-04 11:26:57 -04:00
Mazdak Farrokhzad
54527db7b0
ptr::{read,write}_unaligned: use no_run and reword slightly. 2019-07-04 09:54:37 +02:00
Mazdak Farrokhzad
bee964c502 Clarify unaligned fields in ptr::read_unaligned. 2019-07-04 05:32:38 +02:00
Ralf Jung
6225607e67 remove bogus example from drop_in_place 2019-07-03 20:14:59 +02:00
Julien Cretin
b8106b59d2 Fix meta-variable binding errors in macros
The errors are either:
- The meta-variable used in the right-hand side is not bound (or defined) in the
  left-hand side.
- The meta-variable used in the right-hand side does not repeat with the same
  kleene operator as its binder in the left-hand side. Either it does not repeat
  enough, or it uses a different operator somewhere.

This change should have no semantic impact.
2019-06-23 01:30:41 +02:00
Philipp Oppermann
fed12fad70
Remove mentions of removed offset_to method 2019-06-19 18:46:12 +02:00
Oliver Scherer
8b21b075f7 Add functions to build raw slices 2019-06-19 09:21:44 +02:00
Ralf Jung
00bae8774c note some safety concerns of raw-ptr-to-ref casts 2019-06-14 10:47:32 +02:00
Mark Rousskov
bea2e55efa Utilize cfg(bootstrap) over cfg(stage0)
Also removes stage1, stage2 cfgs being passed to rustc to ensure that
stage1 and stage2 are only differentiated as a group (i.e., only through
not bootstrap).
2019-06-05 17:57:58 -06:00
Ralf Jung
c2e7eb6ff0 split core::ptr module into multiple files 2019-05-25 09:03:45 +02:00