Skip to content

Commit

Permalink
Auto merge of rust-lang#2568 - oli-obk:josh, r=RalfJung
Browse files Browse the repository at this point in the history
Merge rustc changes back into the miri repo

This uses https://github.com/josh-project/josh (RIIR ftw)

The first time it looks a bit odd with the merges and so, all future syncs will work just like the instructions say. I'll add instructions for the sync from miri to rustc, too, starting to do that right now.

Initial cache building now takes 5 mins 🥳
  • Loading branch information
bors committed Sep 27, 2022
2 parents 4023c87 + 6deaa61 commit 6d4ef31
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 2 deletions.
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,28 @@ see <https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html>.

With this, you should now have a working development setup! See
[above](#building-and-testing-miri) for how to proceed working on Miri.


### Fetching the latest changes from the rustc repo

Run the josh proxy locally

```
docker run -p 8000:8000 -e JOSH_REMOTE=https://github.com -v josh-vol:/data/git joshproject/josh-proxy:latest
```

Register the josh proxy as a remote

```
git remote add josh http://localhost:8000/rust-lang/rust.git:/src/tools/miri.git
```

Fetch (takes ca 5-10 min the first time)

```
git fetch josh
git checkout josh/master
git switch -c josh_sync
```

Now push `josh_sync` to your own miri fork and open a PR with it.
1 change: 1 addition & 0 deletions cargo-miri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(bootstrap, feature(let_else))]
#![allow(clippy::useless_format, clippy::derive_partial_eq_without_eq, rustc::internal)]

#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
acb8934fd57b3c2740c4abac0a5728c2c9b1423b
21265dd0d209e7b682f249a3a45034f02d32650b
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#![feature(is_some_with)]
#![feature(nonzero_ops)]
#![feature(local_key_cell_methods)]
#![cfg_attr(bootstrap, feature(let_else))]
// Configure clippy and other lints
#![allow(
clippy::collapsible_else_if,
Expand Down
2 changes: 1 addition & 1 deletion tests/fail/concurrency/windows_join_detached.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::sys::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/PLATFORM/thread.rs:LL:CC
= note: inside `std::thread::JoinInner::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
= note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
= note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
note: inside `main` at $DIR/windows_join_detached.rs:LL:CC
--> $DIR/windows_join_detached.rs:LL:CC
Expand Down
24 changes: 24 additions & 0 deletions tests/pass/issues/issue-miri-2433.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#![feature(type_alias_impl_trait)]

trait T {
type Item;
}

type Alias<'a> = impl T<Item = &'a ()>;

struct S;
impl<'a> T for &'a S {
type Item = &'a ();
}

fn filter_positive<'a>() -> Alias<'a> {
&S
}

fn with_positive(fun: impl Fn(Alias<'_>)) {
fun(filter_positive());
}

fn main() {
with_positive(|_| ());
}

0 comments on commit 6d4ef31

Please sign in to comment.