]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #1141 - RalfJung:lint-adjust, r=RalfJung
authorbors <bors@rust-lang.org>
Mon, 6 Jan 2020 10:39:24 +0000 (10:39 +0000)
committerbors <bors@rust-lang.org>
Mon, 6 Jan 2020 10:39:24 +0000 (10:39 +0000)
remove no-longer-needed allow(const_err)

rust-version
src/bin/miri-rustc-tests.rs
src/bin/miri.rs
src/eval.rs
src/helpers.rs
src/lib.rs
src/machine.rs
src/shims/foreign_items.rs
src/shims/intrinsics.rs
src/shims/panic.rs

index 71bc3b30f412b53eb0ec31d15b7af3ce2a7f6322..44bed6b73d1a5a85e2fa653b96e66ad317a3ff41 100644 (file)
@@ -1 +1 @@
-0ec370670220b712b042ee09aab067ec7e5878d5
+093241deae70ba38413aff823b31c23731debf14
index 19816fe008f5d12e8e0b12c80d3f21b73647db29..f3b271c3595296daefae90dfe88da67b9bbb0c26 100644 (file)
@@ -7,7 +7,7 @@
 extern crate rustc_errors;
 extern crate rustc_interface;
 extern crate rustc_metadata;
-extern crate syntax;
+extern crate rustc_span;
 
 use std::io;
 use std::io::Write;
@@ -40,7 +40,7 @@ fn after_analysis<'tcx>(
                 impl<'tcx, 'hir> itemlikevisit::ItemLikeVisitor<'hir> for Visitor<'tcx> {
                     fn visit_item(&mut self, i: &'hir hir::Item) {
                         if let hir::ItemKind::Fn(.., body_id) = i.kind {
-                            if i.attrs.iter().any(|attr| attr.check_name(syntax::symbol::sym::test))
+                            if i.attrs.iter().any(|attr| attr.check_name(rustc_span::symbol::sym::test))
                             {
                                 let config = MiriConfig {
                                     validate: true,
index 1af79b259613d913e5ba10352a4908fc803c5071..17c5fc20608e253f09e3b636f38b6c2f9ec467c9 100644 (file)
@@ -12,7 +12,7 @@
 extern crate rustc_errors;
 extern crate rustc_interface;
 extern crate rustc_metadata;
-extern crate syntax;
+extern crate rustc_span;
 
 use std::convert::TryFrom;
 use std::env;
index 0cc302b967b2998e7dce393e26355569c2f78b28..1968111307e77aacff7abdf03ad3b71bfd243f5b 100644 (file)
@@ -47,7 +47,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
     config: MiriConfig,
 ) -> InterpResult<'tcx, (InterpCx<'mir, 'tcx, Evaluator<'tcx>>, MPlaceTy<'tcx, Tag>)> {
     let mut ecx = InterpCx::new(
-        tcx.at(syntax::source_map::DUMMY_SP),
+        tcx.at(rustc_span::source_map::DUMMY_SP),
         ty::ParamEnv::reveal_all(),
         Evaluator::new(config.communicate),
         MemoryExtra::new(
index 18b433a0e4a50a7a1a92c7a58ed368893979700a..17d74d2ef757c6ea1156160f11eaca361585fa52 100644 (file)
@@ -8,7 +8,7 @@
     layout::{self, LayoutOf, Size, TyLayout},
     List, TyCtxt,
 };
-use syntax::source_map::DUMMY_SP;
+use rustc_span::source_map::DUMMY_SP;
 
 use rand::RngCore;
 
index 32d2bda719ea020e868cabec564f28ed545ab1e1..2ddcdf8ff7776a679127f177836a5eb83cafa6b4 100644 (file)
@@ -10,6 +10,7 @@
 extern crate syntax;
 #[macro_use]
 extern crate rustc;
+extern crate rustc_span;
 extern crate rustc_data_structures;
 extern crate rustc_mir;
 extern crate rustc_target;
index 37253a260de7f848b9b13ca9d2a12bbe5d01f7de..4c1446c82c748869c990e51a47c8f627a2ba1556 100644 (file)
@@ -14,7 +14,8 @@
     layout::{LayoutOf, Size},
     Ty, TyCtxt,
 };
-use syntax::{attr, source_map::Span, symbol::sym};
+use rustc_span::{source_map::Span, symbol::sym};
+use syntax::attr;
 
 use crate::*;
 
@@ -182,6 +183,7 @@ fn enforce_validity(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool {
     #[inline(always)]
     fn find_mir_or_eval_fn(
         ecx: &mut InterpCx<'mir, 'tcx, Self>,
+        _span: Span,
         instance: ty::Instance<'tcx>,
         args: &[OpTy<'tcx, Tag>],
         ret: Option<(PlaceTy<'tcx, Tag>, mir::BasicBlock)>,
index 07e3b7d7582650d37f0cb66b0a069bcb483034e4..6ad16c6f676470ec514f9ad437089d7605d00900 100644 (file)
@@ -5,8 +5,8 @@
 use rustc::ty;
 use rustc::ty::layout::{Align, LayoutOf, Size};
 use rustc_apfloat::Float;
+use rustc_span::symbol::sym;
 use syntax::attr;
-use syntax::symbol::sym;
 
 use crate::*;
 
@@ -961,7 +961,7 @@ fn emulate_foreign_item(
                 // lpBuffer : ptr to buffer that receives contents of the env_var as a null-terminated string.
                 // Return `# of chars` stored in the buffer pointed to by lpBuffer, excluding null-terminator.
                 // Return 0 upon failure.
-                
+
                 // This is not the env var you are looking for.
                 this.set_last_error(Scalar::from_u32(203))?; // ERROR_ENVVAR_NOT_FOUND
                 this.write_null(dest)?;
index 37aee1f5652c1a9c7e80694b3f1362937c995822..a7aec53c37deb54a6208e213e5e3686de23790c4 100644 (file)
@@ -5,7 +5,7 @@
 use rustc::ty;
 use rustc::ty::layout::{self, Align, LayoutOf, Size};
 use rustc_apfloat::Float;
-use syntax::source_map::Span;
+use rustc_span::source_map::Span;
 
 use crate::*;
 
index f242f41f6f96ff2ea630149ceac34092faab3606..950a23aa59caca6e18af9dbcfba56b017d209715 100644 (file)
@@ -14,7 +14,7 @@
 use rustc::mir;
 use rustc::ty::{self, layout::LayoutOf};
 use rustc_target::spec::PanicStrategy;
-use syntax::source_map::Span;
+use rustc_span::source_map::Span;
 
 use crate::*;
 
@@ -187,15 +187,12 @@ fn assert_panic(
                 let msg = msg.description();
                 let msg = this.allocate_str(msg, MiriMemoryKind::Env.into());
 
-                // Second arg: Caller location.
-                let location = this.alloc_caller_location_for_span(span);
-
                 // Call the lang item.
                 let panic = this.tcx.lang_items().panic_fn().unwrap();
                 let panic = ty::Instance::mono(this.tcx.tcx, panic);
                 this.call_function(
                     panic,
-                    &[msg.to_ref(), location.ptr.into()],
+                    &[msg.to_ref()],
                     None,
                     StackPopCleanup::Goto { ret: None, unwind },
                 )?;