From 7cd5fc3de327b9db96918cc895676f2d94c0a44d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 29 May 2022 14:06:35 +0200 Subject: [PATCH] rustup --- rust-version | 2 +- src/helpers.rs | 2 +- src/shims/dlsym.rs | 2 +- src/shims/posix/dlsym.rs | 2 +- src/shims/posix/linux/dlsym.rs | 2 +- src/shims/posix/macos/dlsym.rs | 2 +- src/shims/windows/dlsym.rs | 2 +- src/stacked_borrows.rs | 4 ++-- src/stacked_borrows/diagnostics.rs | 8 ++++---- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rust-version b/rust-version index 0024b676d7..8da4cbec7f 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -68314177e70017c08f6cdf295631bb508f9f85bc +0f06824013761ed6829887019033f1001e68f623 diff --git a/src/helpers.rs b/src/helpers.rs index 24c471a8b0..5a76e15465 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -849,7 +849,7 @@ where throw_ub_format!("incorrect number of arguments: got {}, expected {}", args.len(), N) } -pub fn isolation_abort_error(name: &str) -> InterpResult<'static> { +pub fn isolation_abort_error<'tcx>(name: &str) -> InterpResult<'tcx> { throw_machine_stop!(TerminationInfo::UnsupportedInIsolation(format!( "{} not available when isolation is enabled", name, diff --git a/src/shims/dlsym.rs b/src/shims/dlsym.rs index d83a309c3e..05296d3a4e 100644 --- a/src/shims/dlsym.rs +++ b/src/shims/dlsym.rs @@ -15,7 +15,7 @@ pub enum Dlsym { impl Dlsym { // Returns an error for unsupported symbols, and None if this symbol // should become a NULL pointer (pretend it does not exist). - pub fn from_str(name: &[u8], target_os: &str) -> InterpResult<'static, Option> { + pub fn from_str<'tcx>(name: &[u8], target_os: &str) -> InterpResult<'tcx, Option> { let name = &*String::from_utf8_lossy(name); Ok(match target_os { "linux" | "macos" => posix::Dlsym::from_str(name, target_os)?.map(Dlsym::Posix), diff --git a/src/shims/posix/dlsym.rs b/src/shims/posix/dlsym.rs index 0ea441e00e..339110467c 100644 --- a/src/shims/posix/dlsym.rs +++ b/src/shims/posix/dlsym.rs @@ -14,7 +14,7 @@ pub enum Dlsym { impl Dlsym { // Returns an error for unsupported symbols, and None if this symbol // should become a NULL pointer (pretend it does not exist). - pub fn from_str(name: &str, target_os: &str) -> InterpResult<'static, Option> { + pub fn from_str<'tcx>(name: &str, target_os: &str) -> InterpResult<'tcx, Option> { Ok(match target_os { "linux" => linux::Dlsym::from_str(name)?.map(Dlsym::Linux), "macos" => macos::Dlsym::from_str(name)?.map(Dlsym::MacOs), diff --git a/src/shims/posix/linux/dlsym.rs b/src/shims/posix/linux/dlsym.rs index a2d6570fe8..72e8c7f16f 100644 --- a/src/shims/posix/linux/dlsym.rs +++ b/src/shims/posix/linux/dlsym.rs @@ -8,7 +8,7 @@ pub enum Dlsym {} impl Dlsym { // Returns an error for unsupported symbols, and None if this symbol // should become a NULL pointer (pretend it does not exist). - pub fn from_str(name: &str) -> InterpResult<'static, Option> { + pub fn from_str<'tcx>(name: &str) -> InterpResult<'tcx, Option> { Ok(match &*name { "__pthread_get_minstack" => None, "getrandom" => None, // std falls back to syscall(SYS_getrandom, ...) when this is NULL. diff --git a/src/shims/posix/macos/dlsym.rs b/src/shims/posix/macos/dlsym.rs index 9369548992..2e97b7918e 100644 --- a/src/shims/posix/macos/dlsym.rs +++ b/src/shims/posix/macos/dlsym.rs @@ -14,7 +14,7 @@ pub enum Dlsym { impl Dlsym { // Returns an error for unsupported symbols, and None if this symbol // should become a NULL pointer (pretend it does not exist). - pub fn from_str(name: &str) -> InterpResult<'static, Option> { + pub fn from_str<'tcx>(name: &str) -> InterpResult<'tcx, Option> { Ok(match name { "getentropy" => Some(Dlsym::getentropy), _ => throw_unsup_format!("unsupported macOS dlsym: {}", name), diff --git a/src/shims/windows/dlsym.rs b/src/shims/windows/dlsym.rs index b5408e492c..fb0c334b3d 100644 --- a/src/shims/windows/dlsym.rs +++ b/src/shims/windows/dlsym.rs @@ -15,7 +15,7 @@ pub enum Dlsym { impl Dlsym { // Returns an error for unsupported symbols, and None if this symbol // should become a NULL pointer (pretend it does not exist). - pub fn from_str(name: &str) -> InterpResult<'static, Option> { + pub fn from_str<'tcx>(name: &str) -> InterpResult<'tcx, Option> { Ok(match name { "GetSystemTimePreciseAsFileTime" => None, "NtWriteFile" => Some(Dlsym::NtWriteFile), diff --git a/src/stacked_borrows.rs b/src/stacked_borrows.rs index 30a9cc265d..d492a565a7 100644 --- a/src/stacked_borrows.rs +++ b/src/stacked_borrows.rs @@ -227,11 +227,11 @@ impl GlobalStateInner { } /// Error reporting -pub fn err_sb_ub( +pub fn err_sb_ub<'tcx>( msg: String, help: Option, history: Option, -) -> InterpError<'static> { +) -> InterpError<'tcx> { err_machine_stop!(TerminationInfo::ExperimentalUb { msg, help, diff --git a/src/stacked_borrows/diagnostics.rs b/src/stacked_borrows/diagnostics.rs index f3692cdeeb..5400e9abe5 100644 --- a/src/stacked_borrows/diagnostics.rs +++ b/src/stacked_borrows/diagnostics.rs @@ -195,7 +195,7 @@ impl AllocHistory { } /// Report a descriptive error when `new` could not be granted from `derived_from`. - pub fn grant_error( + pub fn grant_error<'tcx>( &self, derived_from: SbTag, new: Item, @@ -203,7 +203,7 @@ impl AllocHistory { alloc_range: AllocRange, error_offset: Size, stack: &Stack, - ) -> InterpError<'static> { + ) -> InterpError<'tcx> { let action = format!( "trying to reborrow {:?} for {:?} permission at {}[{:#x}]", derived_from, @@ -219,7 +219,7 @@ impl AllocHistory { } /// Report a descriptive error when `access` is not permitted based on `tag`. - pub fn access_error( + pub fn access_error<'tcx>( &self, access: AccessKind, tag: SbTag, @@ -227,7 +227,7 @@ impl AllocHistory { alloc_range: AllocRange, error_offset: Size, stack: &Stack, - ) -> InterpError<'static> { + ) -> InterpError<'tcx> { let action = format!( "attempting a {} using {:?} at {}[{:#x}]", access,