Skip to content

Commit 76ae2f5

Browse files
committed
Auto merge of rust-lang#2702 - RalfJung:rustup, r=RalfJung
Rustup No changes happened on the rustc side, but I want to do a push next and would rather make josh's life easier by integrating some recent history first.
2 parents 9f30f00 + 55aa540 commit 76ae2f5

File tree

6 files changed

+23
-20
lines changed

6 files changed

+23
-20
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,13 @@ needed.
296296

297297
### Exporting changes to the rustc repo
298298

299+
Keep in mind that pushing is the most complicated job that josh has to do --
300+
pulling just filters the rustc history, but pushing needs to construct a new
301+
rustc history that would filter to the given Miri history! To avoid problems, it
302+
is a good idea to always pull immediately before you push. In particular, you
303+
should never do two josh pushes without an intermediate pull; that can lead to
304+
duplicated commits.
305+
299306
Josh needs to be running, as described above. We will use the josh proxy to push
300307
to your fork of rustc. Run the following in the Miri repo, assuming we are on an
301308
up-to-date master branch:

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7477c1f4f7d6bef037d523099b240d22aa1b63a0
1+
454784afba5bf35b5ff14ada0e31265ad1d75e73

src/helpers.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ const UNIX_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = {
7676
/// Gets an instance for a path.
7777
///
7878
/// A `None` namespace indicates we are looking for a module.
79-
fn try_resolve_did<'tcx>(
80-
tcx: TyCtxt<'tcx>,
81-
path: &[&str],
82-
namespace: Option<Namespace>,
83-
) -> Option<DefId> {
79+
fn try_resolve_did(tcx: TyCtxt<'_>, path: &[&str], namespace: Option<Namespace>) -> Option<DefId> {
8480
/// Yield all children of the given item, that have the given name.
8581
fn find_children<'tcx: 'a, 'a>(
8682
tcx: TyCtxt<'tcx>,

src/shims/os_str.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ pub enum PathConversion {
1818
}
1919

2020
#[cfg(unix)]
21-
pub fn os_str_to_bytes<'a, 'tcx>(os_str: &'a OsStr) -> InterpResult<'tcx, &'a [u8]> {
21+
pub fn os_str_to_bytes<'tcx>(os_str: &OsStr) -> InterpResult<'tcx, &[u8]> {
2222
Ok(os_str.as_bytes())
2323
}
2424

2525
#[cfg(not(unix))]
26-
pub fn os_str_to_bytes<'a, 'tcx>(os_str: &'a OsStr) -> InterpResult<'tcx, &'a [u8]> {
26+
pub fn os_str_to_bytes<'tcx>(os_str: &OsStr) -> InterpResult<'tcx, &[u8]> {
2727
// On non-unix platforms the best we can do to transform bytes from/to OS strings is to do the
2828
// intermediate transformation into strings. Which invalidates non-utf8 paths that are actually
2929
// valid.
@@ -34,11 +34,11 @@ pub fn os_str_to_bytes<'a, 'tcx>(os_str: &'a OsStr) -> InterpResult<'tcx, &'a [u
3434
}
3535

3636
#[cfg(unix)]
37-
pub fn bytes_to_os_str<'a, 'tcx>(bytes: &'a [u8]) -> InterpResult<'tcx, &'a OsStr> {
37+
pub fn bytes_to_os_str<'tcx>(bytes: &[u8]) -> InterpResult<'tcx, &OsStr> {
3838
Ok(OsStr::from_bytes(bytes))
3939
}
4040
#[cfg(not(unix))]
41-
pub fn bytes_to_os_str<'a, 'tcx>(bytes: &'a [u8]) -> InterpResult<'tcx, &'a OsStr> {
41+
pub fn bytes_to_os_str<'tcx>(bytes: &[u8]) -> InterpResult<'tcx, &OsStr> {
4242
let s = std::str::from_utf8(bytes)
4343
.map_err(|_| err_unsup_format!("{:?} is not a valid utf-8 string", bytes))?;
4444
Ok(OsStr::new(s))

src/shims/unix/fs.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,8 +1911,8 @@ struct FileMetadata {
19111911
}
19121912

19131913
impl FileMetadata {
1914-
fn from_path<'tcx, 'mir>(
1915-
ecx: &mut MiriInterpCx<'mir, 'tcx>,
1914+
fn from_path<'tcx>(
1915+
ecx: &mut MiriInterpCx<'_, 'tcx>,
19161916
path: &Path,
19171917
follow_symlink: bool,
19181918
) -> InterpResult<'tcx, Option<FileMetadata>> {
@@ -1922,8 +1922,8 @@ impl FileMetadata {
19221922
FileMetadata::from_meta(ecx, metadata)
19231923
}
19241924

1925-
fn from_fd<'tcx, 'mir>(
1926-
ecx: &mut MiriInterpCx<'mir, 'tcx>,
1925+
fn from_fd<'tcx>(
1926+
ecx: &mut MiriInterpCx<'_, 'tcx>,
19271927
fd: i32,
19281928
) -> InterpResult<'tcx, Option<FileMetadata>> {
19291929
let option = ecx.machine.file_handler.handles.get(&fd);
@@ -1936,8 +1936,8 @@ impl FileMetadata {
19361936
FileMetadata::from_meta(ecx, metadata)
19371937
}
19381938

1939-
fn from_meta<'tcx, 'mir>(
1940-
ecx: &mut MiriInterpCx<'mir, 'tcx>,
1939+
fn from_meta<'tcx>(
1940+
ecx: &mut MiriInterpCx<'_, 'tcx>,
19411941
metadata: Result<std::fs::Metadata, std::io::Error>,
19421942
) -> InterpResult<'tcx, Option<FileMetadata>> {
19431943
let metadata = match metadata {

src/stacked_borrows/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -663,12 +663,12 @@ impl Stacks {
663663
}
664664

665665
#[inline(always)]
666-
pub fn before_memory_write<'tcx, 'mir, 'ecx>(
666+
pub fn before_memory_write<'tcx>(
667667
&mut self,
668668
alloc_id: AllocId,
669669
tag: ProvenanceExtra,
670670
range: AllocRange,
671-
machine: &'ecx mut MiriMachine<'mir, 'tcx>,
671+
machine: &mut MiriMachine<'_, 'tcx>,
672672
) -> InterpResult<'tcx> {
673673
trace!(
674674
"write access with tag {:?}: {:?}, size {}",
@@ -684,12 +684,12 @@ impl Stacks {
684684
}
685685

686686
#[inline(always)]
687-
pub fn before_memory_deallocation<'tcx, 'mir, 'ecx>(
687+
pub fn before_memory_deallocation<'tcx>(
688688
&mut self,
689689
alloc_id: AllocId,
690690
tag: ProvenanceExtra,
691691
range: AllocRange,
692-
machine: &'ecx mut MiriMachine<'mir, 'tcx>,
692+
machine: &mut MiriMachine<'_, 'tcx>,
693693
) -> InterpResult<'tcx> {
694694
trace!("deallocation with tag {:?}: {:?}, size {}", tag, alloc_id, range.size.bytes());
695695
let dcx = DiagnosticCxBuilder::dealloc(machine, tag);

0 commit comments

Comments
 (0)