Skip to content

Commit 6d4ef31

Browse files
committed
Auto merge of #2568 - oli-obk:josh, r=RalfJung
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 🥳
2 parents 4023c87 + 6deaa61 commit 6d4ef31

File tree

6 files changed

+53
-2
lines changed

6 files changed

+53
-2
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,28 @@ see <https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html>.
275275

276276
With this, you should now have a working development setup! See
277277
[above](#building-and-testing-miri) for how to proceed working on Miri.
278+
279+
280+
### Fetching the latest changes from the rustc repo
281+
282+
Run the josh proxy locally
283+
284+
```
285+
docker run -p 8000:8000 -e JOSH_REMOTE=https://github.com -v josh-vol:/data/git joshproject/josh-proxy:latest
286+
```
287+
288+
Register the josh proxy as a remote
289+
290+
```
291+
git remote add josh http://localhost:8000/rust-lang/rust.git:/src/tools/miri.git
292+
```
293+
294+
Fetch (takes ca 5-10 min the first time)
295+
296+
```
297+
git fetch josh
298+
git checkout josh/master
299+
git switch -c josh_sync
300+
```
301+
302+
Now push `josh_sync` to your own miri fork and open a PR with it.

cargo-miri/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg_attr(bootstrap, feature(let_else))]
12
#![allow(clippy::useless_format, clippy::derive_partial_eq_without_eq, rustc::internal)]
23

34
#[macro_use]

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
acb8934fd57b3c2740c4abac0a5728c2c9b1423b
1+
21265dd0d209e7b682f249a3a45034f02d32650b

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#![feature(is_some_with)]
1111
#![feature(nonzero_ops)]
1212
#![feature(local_key_cell_methods)]
13+
#![cfg_attr(bootstrap, feature(let_else))]
1314
// Configure clippy and other lints
1415
#![allow(
1516
clippy::collapsible_else_if,

tests/fail/concurrency/windows_join_detached.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
99
= note: BACKTRACE:
1010
= note: inside `std::sys::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/PLATFORM/thread.rs:LL:CC
11-
= note: inside `std::thread::JoinInner::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
11+
= note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
1212
= note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
1313
note: inside `main` at $DIR/windows_join_detached.rs:LL:CC
1414
--> $DIR/windows_join_detached.rs:LL:CC

tests/pass/issues/issue-miri-2433.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#![feature(type_alias_impl_trait)]
2+
3+
trait T {
4+
type Item;
5+
}
6+
7+
type Alias<'a> = impl T<Item = &'a ()>;
8+
9+
struct S;
10+
impl<'a> T for &'a S {
11+
type Item = &'a ();
12+
}
13+
14+
fn filter_positive<'a>() -> Alias<'a> {
15+
&S
16+
}
17+
18+
fn with_positive(fun: impl Fn(Alias<'_>)) {
19+
fun(filter_positive());
20+
}
21+
22+
fn main() {
23+
with_positive(|_| ());
24+
}

0 commit comments

Comments
 (0)