about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-03-04 15:04:28 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2020-03-04 15:04:28 +0100
commit9ab2af56aa4a8b6f11a4275671fd7947c0251a0b (patch)
treed82bdd0d9b951eec11095a167b481118005928cb
parentdc1165300d7d63040904012d09a2556222c8aedd (diff)
downloadrust-9ab2af56aa4a8b6f11a4275671fd7947c0251a0b.tar.gz
rust-9ab2af56aa4a8b6f11a4275671fd7947c0251a0b.zip
Rustup to rustc 1.43.0-nightly (4ad624882 2020-03-03)
-rw-r--r--build_sysroot/alloc_system/lib.rs16
-rw-r--r--example/mini_core_hello_world.rs2
-rw-r--r--example/std_example.rs2
-rw-r--r--example/subslice-patterns-const-eval.rs2
-rw-r--r--rust-toolchain2
-rw-r--r--src/allocator.rs2
-rw-r--r--src/archive.rs2
-rw-r--r--src/base.rs4
-rw-r--r--src/constant.rs4
-rw-r--r--src/lib.rs4
10 files changed, 19 insertions, 21 deletions
diff --git a/build_sysroot/alloc_system/lib.rs b/build_sysroot/alloc_system/lib.rs
index c9815853de1..abfcf301a53 100644
--- a/build_sysroot/alloc_system/lib.rs
+++ b/build_sysroot/alloc_system/lib.rs
@@ -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"))]
diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs
index 489ceea83ea..382ba99538d 100644
--- a/example/mini_core_hello_world.rs
+++ b/example/mini_core_hello_world.rs
@@ -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]
diff --git a/example/std_example.rs b/example/std_example.rs
index 3332c025e17..baf9a9c526e 100644
--- a/example/std_example.rs
+++ b/example/std_example.rs
@@ -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();
diff --git a/example/subslice-patterns-const-eval.rs b/example/subslice-patterns-const-eval.rs
index ec3614bb34a..2cb84786f56 100644
--- a/example/subslice-patterns-const-eval.rs
+++ b/example/subslice-patterns-const-eval.rs
@@ -4,8 +4,6 @@
 
 // run-pass
 
-#![feature(slice_patterns)]
-
 #[derive(PartialEq, Debug, Clone)]
 struct N(u8);
 
diff --git a/rust-toolchain b/rust-toolchain
index e2e4b45c0d3..5b13884152f 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1 +1 @@
-nightly-2020-02-29
+nightly-2020-03-04
diff --git a/src/allocator.rs b/src/allocator.rs
index 8405096f32b..eeead3050d8 100644
--- a/src/allocator.rs
+++ b/src/allocator.rs
@@ -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 {
diff --git a/src/archive.rs b/src/archive.rs
index 803a1ef0dab..19ca3ea7703 100644
--- a/src/archive.rs
+++ b/src/archive.rs
@@ -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| {
diff --git a/src/base.rs b/src/base.rs
index 963354e4218..ddd3c3cef07 100644
--- a/src/base.rs
+++ b/src/base.rs
@@ -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() {
diff --git a/src/constant.rs b/src/constant.rs
index 3da096655f5..e82ddaaf749 100644
--- a/src/constant.rs
+++ b/src/constant.rs
@@ -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,
diff --git a/src/lib.rs b/src/lib.rs
index 1d27e99e32f..85e0fb047e4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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;