Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 15 pull requests #77191

Closed
wants to merge 36 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4bfdcea
Add regression test
JulianKnodt Sep 2, 2020
26d6081
Relax promises about condition variable.
m-ou-se Sep 19, 2020
3e08354
Correct file path after some restructures in compiler
tesuji Sep 20, 2020
4387480
Add unstably const support for assume intrinsic
tesuji Sep 20, 2020
4b6a482
Fix dest prop miscompilation around references
jonas-schievink Sep 22, 2020
928a29f
Bless mir-opt tests
jonas-schievink Sep 22, 2020
438d229
dead_code: look at trait impls even if they don't contain items
lcnr Sep 22, 2020
9f27f37
Include libunwind in the rust-src component.
ehuss Sep 23, 2020
631c688
Make [].as_[mut_]ptr_range() (unstably) const.
m-ou-se Sep 23, 2020
b5d47bf
clarify that `changelog-seen = 1` goes to the beginning of config.toml
matthiaskrgr Sep 23, 2020
df004df
Re-download LLVM on submodule updates only
Mark-Simulacrum Sep 23, 2020
ef95430
Adjust support expectations for downloaded LLVMs
Mark-Simulacrum Sep 23, 2020
4de836e
Install std for non-host targets
Mark-Simulacrum Sep 24, 2020
382d724
move test to intergrated test in library/core
tesuji Sep 24, 2020
1857184
remove enum name from ImplSource variants
lcnr Sep 24, 2020
1d3717d
Removing erroneous semicolon
austinkeeley Sep 25, 2020
1e64d98
BTreeMap: refactor correct_childrens_parent_links
ssomers Aug 9, 2020
3965524
BTreeMap: introduce edge methods similar to those of keys and values
ssomers Aug 9, 2020
55fa8af
BTreeMap: various tweaks
ssomers Aug 9, 2020
54c9c94
Allow multiple allow_internal_unstable attributes
bugadani Sep 25, 2020
606ed2a
Remove extra space from vec drawing
pickfire Sep 25, 2020
b4ba7aa
Rollup merge of #76257 - JulianKnodt:i75777, r=Dylan-DPC
jonas-schievink Sep 25, 2020
8880ff4
Rollup merge of #76932 - fusion-engineering-forks:condvar-promise, r=…
jonas-schievink Sep 25, 2020
b7585c5
Rollup merge of #76973 - lzutao:unstably-const-assume, r=oli-obk
jonas-schievink Sep 25, 2020
1652288
Rollup merge of #77005 - ssomers:btree_cleanup_3, r=Mark-Simulacrum
jonas-schievink Sep 25, 2020
a010758
Rollup merge of #77066 - jonas-schievink:dest-prop-borrow, r=oli-obk
jonas-schievink Sep 25, 2020
cc4ec0b
Rollup merge of #77073 - lcnr:ty-trait-param, r=matthewjasper
jonas-schievink Sep 25, 2020
272d4ab
Rollup merge of #77086 - ehuss:src-libunwind, r=Mark-Simulacrum
jonas-schievink Sep 25, 2020
6af9d3c
Rollup merge of #77097 - fusion-engineering-forks:slice-ptr-range-con…
jonas-schievink Sep 25, 2020
3744e1c
Rollup merge of #77106 - matthiaskrgr:changelog_seen, r=Mark-Simulacrum
jonas-schievink Sep 25, 2020
6fca5cc
Rollup merge of #77126 - Mark-Simulacrum:llvm-less-often, r=alexcrichton
jonas-schievink Sep 25, 2020
2e7840e
Rollup merge of #77146 - Mark-Simulacrum:xpyinstall, r=alexcrichton
jonas-schievink Sep 25, 2020
a3be921
Rollup merge of #77155 - lcnr:ImplSource, r=ecstatic-morse
jonas-schievink Sep 25, 2020
3506bdf
Rollup merge of #77176 - austinkeeley:intrinsics-documentatation-erro…
jonas-schievink Sep 25, 2020
49bc727
Rollup merge of #77183 - bugadani:issue-77088, r=varkor
jonas-schievink Sep 25, 2020
4e2c52f
Rollup merge of #77189 - pickfire:patch-5, r=Mark-Simulacrum
jonas-schievink Sep 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
@@ -433,8 +433,9 @@ impl<T> [T] {
/// assert_eq!(x, &[3, 4, 6]);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
pub const fn as_mut_ptr(&mut self) -> *mut T {
self as *mut [T] as *mut T
}

@@ -469,8 +470,9 @@ impl<T> [T] {
///
/// [`as_ptr`]: #method.as_ptr
#[unstable(feature = "slice_ptr_range", issue = "65807")]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[inline]
pub fn as_ptr_range(&self) -> Range<*const T> {
pub const fn as_ptr_range(&self) -> Range<*const T> {
let start = self.as_ptr();
// SAFETY: The `add` here is safe, because:
//
@@ -510,8 +512,9 @@ impl<T> [T] {
///
/// [`as_mut_ptr`]: #method.as_mut_ptr
#[unstable(feature = "slice_ptr_range", issue = "65807")]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[inline]
pub fn as_mut_ptr_range(&mut self) -> Range<*mut T> {
pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> {
let start = self.as_mut_ptr();
// SAFETY: See as_ptr_range() above for why `add` here is safe.
let end = unsafe { start.add(self.len()) };