Commit graph

26 commits

Author SHA1 Message Date
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00
Manish Goregaokar
9be1099107
Rollup merge of #74141 - euclio:typos, r=steveklabnik
libstd/libcore: fix various typos
2020-07-23 00:42:01 -07:00
Mark Rousskov
647d9b525f apply bootstrap cfgs 2020-07-16 19:36:49 -04:00
Ralf Jung
ff5e1078fc assign tracking issue 2020-07-12 12:48:43 +02:00
Andy Russell
133e91da62
libstd/libcore: fix various typos 2020-07-09 10:57:11 -04:00
Ralf Jung
5f5c98bd8a add (unchecked) indexing methods to raw pointers and NonNull 2020-07-05 19:15:30 +02:00
Ralf Jung
c478b5473d add as_ptr method to raw slices 2020-07-05 18:41:29 +02:00
LeSeulArtichaut
a1623ff3b6 Deny unsafe ops in unsafe fns, part 6
And final part!!!
2020-06-30 19:28:51 +02:00
Eric Huss
9bb414faff Fix ptr doc warnings. 2020-06-23 16:25:01 -07:00
Manish Goregaokar
ae38698e7f
Rollup merge of #73398 - oli-obk:const_raw_ptr_cmp, r=varkor,RalfJung,nagisa
A way forward for pointer equality in const eval

r? @varkor on the first commit and @RalfJung on the second commit

cc #53020
2020-06-23 00:33:54 -07:00
Ralf Jung
467415d50c deprecate wrapping_offset_from 2020-06-21 13:50:06 +02:00
Oliver Scherer
98e97a46e2 Address review comments 2020-06-20 14:58:15 +02:00
Oliver Scherer
e09b620339 Add fuzzy pointer comparison intrinsics 2020-06-19 18:13:41 +02:00
Lzu Tao
fff822fead Migrate to numeric associated consts 2020-06-10 01:35:47 +00:00
Joe Richey
9b3dfd8ea9 core: Make pointer offset methods "const fn"
Signed-off-by: Joe Richey <joerichey@google.com>
2020-05-25 13:09:02 -07:00
Steve Klabnik
aea0186fe5 make many ptr functions must_use
https://djugei.github.io/bad-at-unsafe/ describes an error a user had when trying to use offset:

> At first I just assumed that the .add() and .offset() methods on pointers would mutate the pointer. They do not. Instead they return a new pointer, which gets dropped silently if you don't use it. Unlike for example Result, which is must_use annotated.
2020-05-17 10:35:57 -05:00
LeSeulArtichaut
d61debac64 Document unsafety for *const T and *mut T 2020-05-01 19:49:56 +02:00
Mark Rousskov
93eed402ad Bump bootstrap compiler 2020-04-25 09:25:33 -04:00
Matthias Schiffer
dfd68441be
ptr: add tracking issue for len() method on raw slices 2020-04-14 21:34:27 +02:00
Matthias Schiffer
2a29f8f89d
ptr: introduce len() method on raw slices
It is already possible to extract the pointer part of a raw slice by a
simple cast, but retrieving the length is not possible without relying
on the representation of the raw slice when it is not valid to convert
the raw slice into a slice reference (i.e. the pointer is null or
unaligned).

Introduce a len() method on raw slices to add this missing feature.
2020-04-14 18:49:29 +02:00
Matthias Schiffer
43612e21a6
ptr: implement "const_slice_ptr" and "mut_slice_ptr" lang items 2020-04-14 18:49:29 +02:00
Linus Färnstrand
c0ec0a27b3 Replace max/min_value() with MAX/MIN assoc consts 2020-04-03 09:33:10 +02:00
Matthias Krüger
136ad015b6 fix various typos 2020-03-06 15:19:31 +01:00
jumbatm
f6faf0b2e7 Clean up const-hack from #63810 2019-12-27 23:21:27 +10:00
Mark Rousskov
a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Christoph Schmidler
12d65c28a6 Split up ptr/mod.rs in libcore, one with implementation detail for const ptr and the other with mut ptr 2019-12-19 09:01:26 +01:00