From fed7e2c935f0ca1498333c365e87fefa0439d530 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 25 Dec 2022 14:16:10 +0100 Subject: [PATCH 1/2] use cargo-install to install josh-proxy --- src/tools/miri/CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/miri/CONTRIBUTING.md b/src/tools/miri/CONTRIBUTING.md index 6efaefdefff..5b538691de1 100644 --- a/src/tools/miri/CONTRIBUTING.md +++ b/src/tools/miri/CONTRIBUTING.md @@ -233,14 +233,14 @@ You can also directly run Miri on a Rust source file: ## Advanced topic: Syncing with the rustc repo We use the [`josh` proxy](https://github.com/josh-project/josh) to transmit changes between the -rustc and Miri repositories. The eaisest way to run josh is via docker: +rustc and Miri repositories. ```sh -docker pull joshproject/josh-proxy:latest -docker run -it -p 8000:8000 -e JOSH_REMOTE=https://github.com -e JOSH_EXTRA_OPTS=--no-background -v josh-vol:/data/git joshproject/josh-proxy:latest +cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r22.12.06 +josh-proxy --local=$HOME/.cache/josh --remote=https://github.com --no-background ``` -This sets up a local volume `josh-vol` for josh's cache. +This uses a directory `$HOME/.cache/josh` as a cache, to speed up repeated pulling/pushing. ### Importing changes from the rustc repo From 92b6562a2577461b0ea115996ba8845704734ff1 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 25 Dec 2022 14:18:41 +0100 Subject: [PATCH 2/2] enable some warnings that rustc bootstrap enables --- src/tools/miri/miri | 2 +- src/tools/miri/src/shims/unix/linux/fd/epoll.rs | 2 +- src/tools/miri/src/shims/unix/linux/fd/event.rs | 2 +- src/tools/miri/src/shims/unix/linux/fd/socketpair.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/miri/miri b/src/tools/miri/miri index a259576ed42..0c0bbbc7020 100755 --- a/src/tools/miri/miri +++ b/src/tools/miri/miri @@ -243,7 +243,7 @@ if [ -z "$CARGO_PROFILE_DEV_OPT_LEVEL" ]; then export CARGO_PROFILE_DEV_OPT_LEVEL=2 fi # Enable rustc-specific lints (ignored without `-Zunstable-options`). -export RUSTFLAGS="-Zunstable-options -Wrustc::internal $RUSTFLAGS" +export RUSTFLAGS="-Zunstable-options -Wrustc::internal -Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros $RUSTFLAGS" # We set the rpath so that Miri finds the private rustc libraries it needs. export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR $RUSTFLAGS" diff --git a/src/tools/miri/src/shims/unix/linux/fd/epoll.rs b/src/tools/miri/src/shims/unix/linux/fd/epoll.rs index eb86773e6b6..e33673fecf6 100644 --- a/src/tools/miri/src/shims/unix/linux/fd/epoll.rs +++ b/src/tools/miri/src/shims/unix/linux/fd/epoll.rs @@ -36,7 +36,7 @@ impl FileDescriptor for Epoll { Ok(self) } - fn dup<'tcx>(&mut self) -> io::Result> { + fn dup(&mut self) -> io::Result> { Ok(Box::new(self.clone())) } diff --git a/src/tools/miri/src/shims/unix/linux/fd/event.rs b/src/tools/miri/src/shims/unix/linux/fd/event.rs index e87ff56bee3..239eb462a1d 100644 --- a/src/tools/miri/src/shims/unix/linux/fd/event.rs +++ b/src/tools/miri/src/shims/unix/linux/fd/event.rs @@ -21,7 +21,7 @@ impl FileDescriptor for Event { "event" } - fn dup<'tcx>(&mut self) -> io::Result> { + fn dup(&mut self) -> io::Result> { Ok(Box::new(Event { val: self.val })) } diff --git a/src/tools/miri/src/shims/unix/linux/fd/socketpair.rs b/src/tools/miri/src/shims/unix/linux/fd/socketpair.rs index 036d3a2e31e..f9e56b4a2b4 100644 --- a/src/tools/miri/src/shims/unix/linux/fd/socketpair.rs +++ b/src/tools/miri/src/shims/unix/linux/fd/socketpair.rs @@ -15,7 +15,7 @@ impl FileDescriptor for SocketPair { "socketpair" } - fn dup<'tcx>(&mut self) -> io::Result> { + fn dup(&mut self) -> io::Result> { Ok(Box::new(SocketPair)) }