Rustup to rustc 1.43.0-nightly (4ad624882 2020-03-03)

This commit is contained in:
bjorn3 2020-03-04 15:04:28 +01:00
parent dc1165300d
commit 9ab2af56aa
10 changed files with 19 additions and 21 deletions

@ -72,12 +72,14 @@ pub struct System;
#[unstable(feature = "allocator_api", issue = "32838")]
unsafe impl AllocRef for System {
#[inline]
unsafe fn alloc(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocErr> {
NonNull::new(GlobalAlloc::alloc(self, layout)).ok_or(AllocErr)
unsafe fn alloc(&mut self, layout: Layout) -> Result<(NonNull<u8>, usize), AllocErr> {
NonNull::new(GlobalAlloc::alloc(self, layout)).ok_or(AllocErr).map(|p| (p, layout.size()))
}
#[inline]
unsafe fn alloc_zeroed(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocErr> {
NonNull::new(GlobalAlloc::alloc_zeroed(self, layout)).ok_or(AllocErr)
unsafe fn alloc_zeroed(&mut self, layout: Layout) -> Result<(NonNull<u8>, usize), AllocErr> {
NonNull::new(GlobalAlloc::alloc_zeroed(self, layout))
.ok_or(AllocErr)
.map(|p| (p, layout.size()))
}
#[inline]
unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: Layout) {
@ -87,8 +89,10 @@ unsafe impl AllocRef for System {
unsafe fn realloc(&mut self,
ptr: NonNull<u8>,
layout: Layout,
new_size: usize) -> Result<NonNull<u8>, AllocErr> {
NonNull::new(GlobalAlloc::realloc(self, ptr.as_ptr(), layout, new_size)).ok_or(AllocErr)
new_size: usize) -> Result<(NonNull<u8>, usize), AllocErr> {
NonNull::new(GlobalAlloc::realloc(self, ptr.as_ptr(), layout, new_size))
.ok_or(AllocErr)
.map(|p| (p, layout.size()))
}
}
#[cfg(any(windows, unix, target_os = "cloudabi", target_os = "redox"))]

@ -1,7 +1,7 @@
// Adapted from https://github.com/sunfishcode/mir2cranelift/blob/master/rust-examples/nocore-hello-world.rs
#![feature(
no_core, unboxed_closures, start, lang_items, box_syntax, slice_patterns, never_type, linkage,
no_core, unboxed_closures, start, lang_items, box_syntax, never_type, linkage,
extern_types, thread_local
)]
#![no_core]

@ -84,7 +84,7 @@ fn main() {
let empty: [i32; 0] = [];
assert!(empty.is_sorted());
println!("{:?}", unsafe { std::intrinsics::caller_location() });
println!("{:?}", std::intrinsics::caller_location());
unsafe {
test_simd();

@ -4,8 +4,6 @@
// run-pass
#![feature(slice_patterns)]
#[derive(PartialEq, Debug, Clone)]
struct N(u8);

@ -1 +1 @@
nightly-2020-02-29
nightly-2020-03-04

@ -10,7 +10,7 @@
use crate::prelude::*;
use syntax::expand::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS};
use rustc_ast::expand::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS};
/// Returns whether an allocator shim was created
pub fn codegen(tcx: TyCtxt<'_>, module: &mut Module<impl Backend + 'static>) -> bool {

@ -94,7 +94,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
));
}
fn add_native_library(&mut self, name: syntax::ast::Name) {
fn add_native_library(&mut self, name: rustc_ast::ast::Name) {
let location = find_library(name, &self.config.lib_search_paths, self.config.sess);
self.add_archive(location.clone(), |_| false)
.unwrap_or_else(|e| {

@ -555,7 +555,7 @@ fn trans_stmt<'tcx>(
| StatementKind::AscribeUserType(..) => {}
StatementKind::InlineAsm(asm) => {
use syntax::ast::Name;
use rustc_ast::ast::Name;
let InlineAsm {
asm,
outputs: _,
@ -568,7 +568,7 @@ fn trans_stmt<'tcx>(
clobbers, // Vec<Name>
volatile, // bool
alignstack, // bool
dialect: _, // syntax::ast::AsmDialect
dialect: _, // rustc_ast::ast::AsmDialect
asm_str_style: _,
} = asm;
match &*asm_code.as_str() {

@ -439,10 +439,6 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for TransPlaceInterpreter {
panic!();
}
fn find_foreign_static(_: TyCtxt<'tcx>, _: DefId) -> InterpResult<'tcx, Cow<'tcx, Allocation>> {
panic!();
}
fn binary_ptr_op(
_: &InterpCx<'mir, 'tcx, Self>,
_: mir::BinOp,

@ -17,7 +17,7 @@ extern crate rustc_mir;
extern crate rustc_session;
extern crate rustc_span;
extern crate rustc_target;
extern crate syntax;
extern crate rustc_ast;
use std::any::Any;
@ -67,7 +67,7 @@ mod prelude {
pub use std::collections::{HashMap, HashSet};
pub use std::convert::{TryFrom, TryInto};
pub use syntax::ast::{FloatTy, IntTy, UintTy};
pub use rustc_ast::ast::{FloatTy, IntTy, UintTy};
pub use rustc_span::{Pos, Span};
pub use rustc::bug;