Commit Graph

20 Commits

Author SHA1 Message Date
Mark Rousskov 28e5e93fc2 drop some const unstables, due to revert no longer possible 2021-05-03 14:35:18 -04:00
Albin Hedman db9a53b5d7
Constify mem::transmute_copy 2021-03-15 20:45:57 +01:00
Albin Hedman 45988ee438
Constify mem::replace and ptr::replace 2021-03-15 20:45:43 +01:00
Albin Hedman 64e2248794
Constify mem::swap and ptr::swap[_nonoverlapping] 2021-03-15 20:45:22 +01:00
Mara Bos bf27819f37 Don't implement mem::replace with mem::swap. 2021-03-11 19:04:47 +01:00
Joshua Nelson 9a75f4fed1 Convert primitives to use intra-doc links 2021-02-25 20:31:53 -05:00
Joshua Nelson 3733275854 Update the bootstrap compiler
Note this does not change `core::derive` since it was merged after the
beta bump.
2021-02-20 17:19:30 -05:00
Konrad Borowski 15701f7531 Add doc aliases for "delete"
This patch adds doc aliases for "delete". The added aliases are
supposed to reference usages `delete` in other programming
languages.

- `HashMap::remove`, `BTreeMap::remove` -> `Map#delete` and `delete`
  keyword in JavaScript.

- `HashSet::remove`, `BTreeSet::remove` -> `Set#delete` in JavaScript.

- `mem::drop` -> `delete` keyword in C++.

- `fs::remove_file`, `fs::remove_dir`, `fs::remove_dir_all`
  -> `File#delete` in Java, `File#delete` and `Dir#delete` in Ruby.

Before this change, searching for "delete" in documentation
returned no results.
2021-01-31 11:07:37 +01:00
Camelid bbf175df3c Make `size_of_val` and `min_align_of_val` intrinsics unsafe 2021-01-04 19:23:55 -08:00
Camelid 0506789014 Remove many unnecessary manual link resolves from library
Now that #76934 has merged, we can remove a lot of these! E.g, this is
no longer necessary:

    [`Vec<T>`]: Vec
2020-12-31 11:54:32 -08:00
Mara Bos 067f1b7030
Rollup merge of #80491 - RalfJung:dangling-of-val, r=oli-obk
Miri: make size/align_of_val work for dangling raw ptrs

This is needed for https://github.com/rust-lang/rust/issues/80365#issuecomment-752128105.

r? `@oli-obk`
2020-12-30 20:56:56 +00:00
Ralf Jung f76bae9244 CTFE: test size/align_of_val_raw on dangling pointers 2020-12-30 14:29:33 +01:00
Tomasz Miąsko 5718cc2f9b Make forget intrinsic safe 2020-12-29 00:00:00 +00:00
Ralf Jung 95aac4487d transmute_copy: explain that alignment is handled correctly 2020-10-11 23:59:32 +02:00
Michael Howell cd159fd7f9 Uplift drop-bounds lint from clippy 2020-10-01 12:06:33 -07:00
Camelid 58310ce94b Use intra-doc links in `core::mem` 2020-09-14 15:14:21 -07:00
Scott McMurray f3024073f9 Suggest `mem::forget` if `mem::ManuallyDrop::new` isn't used
I think this communicates the intent better, and is shorter anyway.
2020-08-25 09:40:53 -07:00
Ryan Scheel e720f4237a
See also X-Link mem::{swap, take, replace} 2020-08-01 22:56:25 -07:00
Dylan MacKenzie 9caf0b5222 Make `{align,size}_of_val` `const` 2020-07-29 16:50:15 -07:00
mark 2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00