]> git.lizzy.rs Git - rust.git/blobdiff - src/shims/backtrace.rs
Auto merge of #2141 - saethlin:early-diagnostics-ice, r=RalfJung
[rust.git] / src / shims / backtrace.rs
index 2ec4bbb32e02939c5cd5f2ea024b47ab5cfdcfd6..339aa4d57e2201b4c909659bc570ceefc6e9184b 100644 (file)
@@ -15,7 +15,7 @@ fn handle_miri_backtrace_size(
         dest: &PlaceTy<'tcx, Tag>,
     ) -> InterpResult<'tcx> {
         let this = self.eval_context_mut();
-        let &[ref flags] = this.check_shim(abi, Abi::Rust, link_name, args)?;
+        let [flags] = this.check_shim(abi, Abi::Rust, link_name, args)?;
 
         let flags = this.read_scalar(flags)?.to_u64()?;
         if flags != 0 {
@@ -77,7 +77,7 @@ fn handle_miri_get_backtrace(
             // storage for pointers is allocated by miri
             // deallocating the slice is undefined behavior with a custom global allocator
             0 => {
-                let &[_flags] = this.check_shim(abi, Abi::Rust, link_name, args)?;
+                let [_flags] = this.check_shim(abi, Abi::Rust, link_name, args)?;
 
                 let alloc = this.allocate(array_layout, MiriMemoryKind::Rust.into())?;
 
@@ -95,7 +95,7 @@ fn handle_miri_get_backtrace(
             }
             // storage for pointers is allocated by the caller
             1 => {
-                let &[_flags, ref buf] = this.check_shim(abi, Abi::Rust, link_name, args)?;
+                let [_flags, buf] = this.check_shim(abi, Abi::Rust, link_name, args)?;
 
                 let buf_place = this.deref_operand(buf)?;
 
@@ -124,7 +124,7 @@ fn resolve_frame_pointer(
 
         let ptr = this.read_pointer(ptr)?;
         // Take apart the pointer, we need its pieces.
-        let (alloc_id, offset, ptr) = this.ptr_get_alloc_id(ptr)?;
+        let (alloc_id, offset, _tag) = this.ptr_get_alloc_id(ptr)?;
 
         let fn_instance =
             if let Some(GlobalAlloc::Function(instance)) = this.tcx.get_global_alloc(alloc_id) {
@@ -150,7 +150,7 @@ fn handle_miri_resolve_frame(
         dest: &PlaceTy<'tcx, Tag>,
     ) -> InterpResult<'tcx> {
         let this = self.eval_context_mut();
-        let &[ref ptr, ref flags] = this.check_shim(abi, Abi::Rust, link_name, args)?;
+        let [ptr, flags] = this.check_shim(abi, Abi::Rust, link_name, args)?;
 
         let flags = this.read_scalar(flags)?.to_u64()?;
 
@@ -233,7 +233,7 @@ fn handle_miri_resolve_frame_names(
     ) -> InterpResult<'tcx> {
         let this = self.eval_context_mut();
 
-        let &[ref ptr, ref flags, ref name_ptr, ref filename_ptr] =
+        let [ptr, flags, name_ptr, filename_ptr] =
             this.check_shim(abi, Abi::Rust, link_name, args)?;
 
         let flags = this.read_scalar(flags)?.to_u64()?;