Skip to content

Commit

Permalink
Auto merge of rust-lang#76964 - RalfJung:rollup-ybn06fs, r=RalfJung
Browse files Browse the repository at this point in the history
Rollup of 15 pull requests

Successful merges:

 - rust-lang#76722 (Test and fix Send and Sync traits of BTreeMap artefacts)
 - rust-lang#76766 (Extract some intrinsics out of rustc_codegen_llvm)
 - rust-lang#76800 (Don't generate bootstrap usage unless it's needed)
 - rust-lang#76809 (simplfy condition in ItemLowerer::with_trait_impl_ref())
 - rust-lang#76815 (Fix wording in mir doc)
 - rust-lang#76818 (Don't compile regex at every function call.)
 - rust-lang#76821 (Remove redundant nightly features)
 - rust-lang#76823 (black_box: silence unused_mut warning when building with cfg(miri))
 - rust-lang#76825 (use `array_windows` instead of `windows` in the compiler)
 - rust-lang#76827 (fix array_windows docs)
 - rust-lang#76828 (use strip_prefix over starts_with and manual slicing based on pattern length (clippy::manual_strip))
 - rust-lang#76840 (Move to intra doc links in core/src/future)
 - rust-lang#76845 (Use intra docs links in core::{ascii, option, str, pattern, hash::map})
 - rust-lang#76853 (Use intra-doc links in library/core/src/task/wake.rs)
 - rust-lang#76871 (support panic=abort in Miri)

Failed merges:

r? `@ghost`
  • Loading branch information
bors committed Sep 20, 2020
2 parents 5e449b9 + e5be14c commit 41507ed
Show file tree
Hide file tree
Showing 51 changed files with 862 additions and 697 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
html_root_url = "https://doc.rust-lang.org/nightly/",
test(no_crate_inject, attr(deny(warnings)))
)]
#![feature(core_intrinsics)]
#![feature(dropck_eyepatch)]
#![feature(new_uninit)]
#![feature(maybe_uninit_slice)]
Expand All @@ -24,7 +23,6 @@ use smallvec::SmallVec;
use std::alloc::Layout;
use std::cell::{Cell, RefCell};
use std::cmp;
use std::intrinsics;
use std::marker::{PhantomData, Send};
use std::mem::{self, MaybeUninit};
use std::ptr;
Expand Down Expand Up @@ -122,7 +120,7 @@ impl<T> TypedArena<T> {

unsafe {
if mem::size_of::<T>() == 0 {
self.ptr.set(intrinsics::arith_offset(self.ptr.get() as *mut u8, 1) as *mut T);
self.ptr.set((self.ptr.get() as *mut u8).wrapping_offset(1) as *mut T);
let ptr = mem::align_of::<T>() as *mut T;
// Don't drop the object. This `write` is equivalent to `forget`.
ptr::write(ptr, object);
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
//! This API is completely unstable and subject to change.

#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
#![feature(bool_to_option)]
#![feature(box_syntax)]
#![feature(const_fn)] // For the `transmute` in `P::new`
#![feature(const_panic)]
#![feature(const_fn_transmute)]
#![feature(crate_visibility_modifier)]
#![feature(label_break_value)]
#![feature(nll)]
#![feature(or_patterns)]
#![feature(try_trait)]
#![feature(unicode_internals)]
#![recursion_limit = "256"]

#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub(super) struct ItemLowerer<'a, 'lowering, 'hir> {
impl ItemLowerer<'_, '_, '_> {
fn with_trait_impl_ref(&mut self, impl_ref: &Option<TraitRef>, f: impl FnOnce(&mut Self)) {
let old = self.lctx.is_in_trait_impl;
self.lctx.is_in_trait_impl = if let &None = impl_ref { false } else { true };
self.lctx.is_in_trait_impl = impl_ref.is_some();
f(self);
self.lctx.is_in_trait_impl = old;
}
Expand Down

0 comments on commit 41507ed

Please sign in to comment.