about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-10-24 15:48:44 +0200
committerGitHub <noreply@github.com>2021-10-24 15:48:44 +0200
commitc16ee19dd4d81d3b1150d67cfb4ea84c826f4c36 (patch)
tree1e6fc487449390e55fda1753491e6bf6eefd2ba4 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parentb8376050127b3d1806ae88e6916ddaf330ca699c (diff)
parent5f390cfb722cf95b0df81f9563bf97b1663cff9e (diff)
downloadrust-c16ee19dd4d81d3b1150d67cfb4ea84c826f4c36.tar.gz
rust-c16ee19dd4d81d3b1150d67cfb4ea84c826f4c36.zip
Rollup merge of #90162 - WaffleLapkin:const_array_slice_from_ref_mut, r=oli-obk
Mark `{array, slice}::{from_ref, from_mut}` as const fn

This PR marks the following APIs as `const`:
```rust
// core::array
pub const fn from_ref<T>(s: &T) -> &[T; 1];
pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1];

// core::slice
pub const fn from_ref<T>(s: &T) -> &[T];
pub const fn from_mut<T>(s: &mut T) -> &mut [T];
```

Note that `from_ref` methods require `const_raw_ptr_deref` feature (which seems totally fine, since it's being stabilized, see #89551), `from_mut` methods require `const_mut_refs` (which seems fine too since this PR marks `from_mut` functions as const unstable).

r? ````@oli-obk````
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions