diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d965ae8fc..cb47588535 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -275,3 +275,28 @@ see . 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. diff --git a/cargo-miri/src/main.rs b/cargo-miri/src/main.rs index 331c4c9c2b..da891ef077 100644 --- a/cargo-miri/src/main.rs +++ b/cargo-miri/src/main.rs @@ -1,3 +1,4 @@ +#![cfg_attr(bootstrap, feature(let_else))] #![allow(clippy::useless_format, clippy::derive_partial_eq_without_eq, rustc::internal)] #[macro_use] diff --git a/rust-version b/rust-version index 78b9a110aa..7a76ff7339 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -acb8934fd57b3c2740c4abac0a5728c2c9b1423b +21265dd0d209e7b682f249a3a45034f02d32650b diff --git a/src/lib.rs b/src/lib.rs index 0fe21c9243..401b03fe7b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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, diff --git a/tests/fail/concurrency/windows_join_detached.stderr b/tests/fail/concurrency/windows_join_detached.stderr index 78c75611d3..20f34cf104 100644 --- a/tests/fail/concurrency/windows_join_detached.stderr +++ b/tests/fail/concurrency/windows_join_detached.stderr @@ -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 diff --git a/tests/pass/issues/issue-miri-2433.rs b/tests/pass/issues/issue-miri-2433.rs new file mode 100644 index 0000000000..a8281d30ba --- /dev/null +++ b/tests/pass/issues/issue-miri-2433.rs @@ -0,0 +1,24 @@ +#![feature(type_alias_impl_trait)] + +trait T { + type Item; +} + +type Alias<'a> = impl T; + +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(|_| ()); +}