From e2ecce77fb5bbbeec169c55e41c5a51daccb5bfb Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 19 Oct 2023 16:06:43 +0000 Subject: [PATCH 1/5] s/Generator/Coroutine/ --- tests/fail/generator-pinned-moved.rs | 16 ++++++++-------- tests/fail/generator-pinned-moved.stderr | 6 +++--- tests/pass/generator.rs | 14 +++++++------- .../generators-self-referential.rs | 6 +++--- tests/pass/track-caller-attribute.rs | 14 +++++++------- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tests/fail/generator-pinned-moved.rs b/tests/fail/generator-pinned-moved.rs index 33348ace9c..5a1dbc8a0e 100644 --- a/tests/fail/generator-pinned-moved.rs +++ b/tests/fail/generator-pinned-moved.rs @@ -2,11 +2,11 @@ #![feature(generators, generator_trait)] use std::{ - ops::{Generator, GeneratorState}, + ops::{Coroutine, CoroutineState}, pin::Pin, }; -fn firstn() -> impl Generator { +fn firstn() -> impl Coroutine { static move || { let mut num = 0; let num = &mut num; @@ -17,26 +17,26 @@ fn firstn() -> impl Generator { } } -struct GeneratorIteratorAdapter(G); +struct CoroutineIteratorAdapter(G); -impl Iterator for GeneratorIteratorAdapter +impl Iterator for CoroutineIteratorAdapter where - G: Generator, + G: Coroutine, { type Item = G::Yield; fn next(&mut self) -> Option { let me = unsafe { Pin::new_unchecked(&mut self.0) }; match me.resume(()) { - GeneratorState::Yielded(x) => Some(x), - GeneratorState::Complete(_) => None, + CoroutineState::Yielded(x) => Some(x), + CoroutineState::Complete(_) => None, } } } fn main() { let mut generator_iterator_2 = { - let mut generator_iterator = Box::new(GeneratorIteratorAdapter(firstn())); + let mut generator_iterator = Box::new(CoroutineIteratorAdapter(firstn())); generator_iterator.next(); // pin it Box::new(*generator_iterator) // move it diff --git a/tests/fail/generator-pinned-moved.stderr b/tests/fail/generator-pinned-moved.stderr index 8ad0ce8cc3..7465ec2bc8 100644 --- a/tests/fail/generator-pinned-moved.stderr +++ b/tests/fail/generator-pinned-moved.stderr @@ -9,7 +9,7 @@ LL | *num += 1; help: ALLOC was allocated here: --> $DIR/generator-pinned-moved.rs:LL:CC | -LL | let mut generator_iterator = Box::new(GeneratorIteratorAdapter(firstn())); +LL | let mut generator_iterator = Box::new(CoroutineIteratorAdapter(firstn())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: --> $DIR/generator-pinned-moved.rs:LL:CC @@ -18,12 +18,12 @@ LL | }; // *deallocate* generator_iterator | ^ = note: BACKTRACE (of the first span): = note: inside closure at $DIR/generator-pinned-moved.rs:LL:CC -note: inside ` as std::iter::Iterator>::next` +note: inside ` as std::iter::Iterator>::next` --> $DIR/generator-pinned-moved.rs:LL:CC | LL | match me.resume(()) { | ^^^^^^^^^^^^^ - = note: inside `> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC + = note: inside `> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside `main` --> $DIR/generator-pinned-moved.rs:LL:CC | diff --git a/tests/pass/generator.rs b/tests/pass/generator.rs index 2009960345..a1d3e9462b 100644 --- a/tests/pass/generator.rs +++ b/tests/pass/generator.rs @@ -5,8 +5,8 @@ use std::fmt::Debug; use std::mem::ManuallyDrop; use std::ops::{ - Generator, - GeneratorState::{self, *}, + Coroutine, + CoroutineState::{self, *}, }; use std::pin::Pin; use std::ptr; @@ -15,7 +15,7 @@ use std::sync::atomic::{AtomicUsize, Ordering}; fn basic() { fn finish(mut amt: usize, self_referential: bool, mut t: T) -> T::Return where - T: Generator, + T: Coroutine, { // We are not moving the `t` around until it gets dropped, so this is okay. let mut t = unsafe { Pin::new_unchecked(&mut t) }; @@ -27,10 +27,10 @@ fn basic() { let _ = unsafe { ManuallyDrop::new(ptr::read(t.as_mut().get_unchecked_mut())) }; } match state { - GeneratorState::Yielded(y) => { + CoroutineState::Yielded(y) => { amt -= y; } - GeneratorState::Complete(ret) => { + CoroutineState::Complete(ret) => { assert_eq!(amt, 0); return ret; } @@ -134,9 +134,9 @@ fn basic() { } fn smoke_resume_arg() { - fn drain + Unpin, R, Y>( + fn drain + Unpin, R, Y>( gen: &mut G, - inout: Vec<(R, GeneratorState)>, + inout: Vec<(R, CoroutineState)>, ) where Y: Debug + PartialEq, G::Return: Debug + PartialEq, diff --git a/tests/pass/stacked-borrows/generators-self-referential.rs b/tests/pass/stacked-borrows/generators-self-referential.rs index b71912882d..d727cf6e88 100644 --- a/tests/pass/stacked-borrows/generators-self-referential.rs +++ b/tests/pass/stacked-borrows/generators-self-referential.rs @@ -3,11 +3,11 @@ #![feature(generators, generator_trait)] use std::{ - ops::{Generator, GeneratorState}, + ops::{Coroutine, CoroutineState}, pin::Pin, }; -fn firstn() -> impl Generator { +fn firstn() -> impl Coroutine { static move || { let mut num = 0; let num = &mut num; @@ -27,7 +27,7 @@ fn main() { let mut generator_iterator = firstn(); let mut pin = unsafe { Pin::new_unchecked(&mut generator_iterator) }; let mut sum = 0; - while let GeneratorState::Yielded(x) = pin.as_mut().resume(()) { + while let CoroutineState::Yielded(x) = pin.as_mut().resume(()) { sum += x; } assert_eq!(sum, 3); diff --git a/tests/pass/track-caller-attribute.rs b/tests/pass/track-caller-attribute.rs index 1b0226e61b..bf59617d80 100644 --- a/tests/pass/track-caller-attribute.rs +++ b/tests/pass/track-caller-attribute.rs @@ -4,7 +4,7 @@ #![feature(generator_trait)] #![feature(generators)] -use std::ops::{Generator, GeneratorState}; +use std::ops::{Coroutine, CoroutineState}; use std::panic::Location; use std::pin::Pin; @@ -212,21 +212,21 @@ fn test_closure() { fn test_generator() { #[track_caller] - fn mono_generator>( + fn mono_generator>( val: Pin<&mut F>, ) -> (&'static str, String, Loc) { match val.resume("Mono".to_string()) { - GeneratorState::Yielded(val) => val, + CoroutineState::Yielded(val) => val, _ => unreachable!(), } } #[track_caller] fn dyn_generator( - val: Pin<&mut dyn Generator>, + val: Pin<&mut dyn Coroutine>, ) -> (&'static str, String, Loc) { match val.resume("Dyn".to_string()) { - GeneratorState::Yielded(val) => val, + CoroutineState::Yielded(val) => val, _ => unreachable!(), } } @@ -241,7 +241,7 @@ fn test_generator() { let (dyn_ret, dyn_arg, dyn_loc) = dyn_generator(pinned.as_mut()); assert_eq!(dyn_ret, "first"); assert_eq!(dyn_arg, "Dyn".to_string()); - // The `Generator` trait does not have `#[track_caller]` on `resume`, so + // The `Coroutine` trait does not have `#[track_caller]` on `resume`, so // this will not match. assert_ne!(dyn_loc.file(), file!()); @@ -258,7 +258,7 @@ fn test_generator() { let non_tracked_generator = || { yield Location::caller(); }; let non_tracked_line = line!() - 1; // This is the line of the generator, not its caller let non_tracked_loc = match Box::pin(non_tracked_generator).as_mut().resume(()) { - GeneratorState::Yielded(val) => val, + CoroutineState::Yielded(val) => val, _ => unreachable!(), }; assert_eq!(non_tracked_loc.file(), file!()); From 3a6ee88719f5810b1796cefd61b9d1acbf29fa31 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 19 Oct 2023 21:46:28 +0000 Subject: [PATCH 2/5] s/generator/coroutine/ --- src/helpers.rs | 2 +- tests/fail/generator-pinned-moved.rs | 14 +++++----- tests/fail/generator-pinned-moved.stderr | 10 +++---- tests/pass/{generator.rs => coroutine.rs} | 10 +++---- tests/pass/move-data-across-await-point.rs | 2 +- .../generators-self-referential.rs | 6 ++-- tests/pass/stacked-borrows/stacked-borrows.rs | 2 +- tests/pass/track-caller-attribute.rs | 28 +++++++++---------- tests/pass/tree_borrows/tree-borrows.rs | 2 +- 9 files changed, 38 insertions(+), 38 deletions(-) rename tests/pass/{generator.rs => coroutine.rs} (94%) diff --git a/src/helpers.rs b/src/helpers.rs index 0dc472bc48..690c6619ab 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -492,7 +492,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { // `Variants::Multiple`. match v.layout.variants { Variants::Multiple { .. } => { - // A multi-variant enum, or generator, or so. + // A multi-variant enum, or coroutine, or so. // Treat this like a union: without reading from memory, // we cannot determine the variant we are in. Reading from // memory would be subject to Stacked Borrows rules, leading diff --git a/tests/fail/generator-pinned-moved.rs b/tests/fail/generator-pinned-moved.rs index 5a1dbc8a0e..005ae7e913 100644 --- a/tests/fail/generator-pinned-moved.rs +++ b/tests/fail/generator-pinned-moved.rs @@ -1,5 +1,5 @@ //@compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows -#![feature(generators, generator_trait)] +#![feature(coroutines, coroutine_trait)] use std::{ ops::{Coroutine, CoroutineState}, @@ -35,12 +35,12 @@ where } fn main() { - let mut generator_iterator_2 = { - let mut generator_iterator = Box::new(CoroutineIteratorAdapter(firstn())); - generator_iterator.next(); // pin it + let mut coroutine_iterator_2 = { + let mut coroutine_iterator = Box::new(CoroutineIteratorAdapter(firstn())); + coroutine_iterator.next(); // pin it - Box::new(*generator_iterator) // move it - }; // *deallocate* generator_iterator + Box::new(*coroutine_iterator) // move it + }; // *deallocate* coroutine_iterator - generator_iterator_2.next(); // and use moved value + coroutine_iterator_2.next(); // and use moved value } diff --git a/tests/fail/generator-pinned-moved.stderr b/tests/fail/generator-pinned-moved.stderr index 7465ec2bc8..547b63f7e2 100644 --- a/tests/fail/generator-pinned-moved.stderr +++ b/tests/fail/generator-pinned-moved.stderr @@ -9,25 +9,25 @@ LL | *num += 1; help: ALLOC was allocated here: --> $DIR/generator-pinned-moved.rs:LL:CC | -LL | let mut generator_iterator = Box::new(CoroutineIteratorAdapter(firstn())); +LL | let mut coroutine_iterator = Box::new(CoroutineIteratorAdapter(firstn())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: --> $DIR/generator-pinned-moved.rs:LL:CC | -LL | }; // *deallocate* generator_iterator +LL | }; // *deallocate* coroutine_iterator | ^ = note: BACKTRACE (of the first span): = note: inside closure at $DIR/generator-pinned-moved.rs:LL:CC -note: inside ` as std::iter::Iterator>::next` +note: inside ` as std::iter::Iterator>::next` --> $DIR/generator-pinned-moved.rs:LL:CC | LL | match me.resume(()) { | ^^^^^^^^^^^^^ - = note: inside `> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC + = note: inside `> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside `main` --> $DIR/generator-pinned-moved.rs:LL:CC | -LL | generator_iterator_2.next(); // and use moved value +LL | coroutine_iterator_2.next(); // and use moved value | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/pass/generator.rs b/tests/pass/coroutine.rs similarity index 94% rename from tests/pass/generator.rs rename to tests/pass/coroutine.rs index a1d3e9462b..49bfa92a05 100644 --- a/tests/pass/generator.rs +++ b/tests/pass/coroutine.rs @@ -1,6 +1,6 @@ //@revisions: stack tree //@[tree]compile-flags: -Zmiri-tree-borrows -#![feature(generators, generator_trait, never_type)] +#![feature(coroutines, coroutine_trait, never_type)] use std::fmt::Debug; use std::mem::ManuallyDrop; @@ -21,8 +21,8 @@ fn basic() { let mut t = unsafe { Pin::new_unchecked(&mut t) }; loop { let state = t.as_mut().resume(()); - // Test if the generator is valid (according to type invariants). - // For self-referential generators however this is UB! + // Test if the coroutine is valid (according to type invariants). + // For self-referential coroutines however this is UB! if !self_referential { let _ = unsafe { ManuallyDrop::new(ptr::read(t.as_mut().get_unchecked_mut())) }; } @@ -86,7 +86,7 @@ fn basic() { yield 1; }); - // also test self-referential generators + // also test self-referential coroutines assert_eq!( finish(5, true, static || { let mut x = 5; @@ -145,7 +145,7 @@ fn smoke_resume_arg() { for (input, out) in inout { assert_eq!(gen.as_mut().resume(input), out); - // Test if the generator is valid (according to type invariants). + // Test if the coroutine is valid (according to type invariants). let _ = unsafe { ManuallyDrop::new(ptr::read(gen.as_mut().get_unchecked_mut())) }; } } diff --git a/tests/pass/move-data-across-await-point.rs b/tests/pass/move-data-across-await-point.rs index 489fae66ff..5990d66fbd 100644 --- a/tests/pass/move-data-across-await-point.rs +++ b/tests/pass/move-data-across-await-point.rs @@ -15,7 +15,7 @@ async fn data_moved_async() { // `raw_pointer` points to the original location where the Vec was stored in the caller. // `data` is where that Vec (to be precise, its ptr+capacity+len on-stack data) // got moved to. Those will usually not be the same since the Vec got moved twice - // (into the function call, and then into the generator upvar). + // (into the function call, and then into the coroutine upvar). assert_ne!(raw_pointer, raw_pointer2); unsafe { // This writes into the `x` in `data_moved_async`, re-initializing it. diff --git a/tests/pass/stacked-borrows/generators-self-referential.rs b/tests/pass/stacked-borrows/generators-self-referential.rs index d727cf6e88..c4b15c8758 100644 --- a/tests/pass/stacked-borrows/generators-self-referential.rs +++ b/tests/pass/stacked-borrows/generators-self-referential.rs @@ -1,6 +1,6 @@ // See https://github.com/rust-lang/unsafe-code-guidelines/issues/148: // this fails when Stacked Borrows is strictly applied even to `!Unpin` types. -#![feature(generators, generator_trait)] +#![feature(coroutines, coroutine_trait)] use std::{ ops::{Coroutine, CoroutineState}, @@ -24,8 +24,8 @@ fn firstn() -> impl Coroutine { } fn main() { - let mut generator_iterator = firstn(); - let mut pin = unsafe { Pin::new_unchecked(&mut generator_iterator) }; + let mut coroutine_iterator = firstn(); + let mut pin = unsafe { Pin::new_unchecked(&mut coroutine_iterator) }; let mut sum = 0; while let CoroutineState::Yielded(x) = pin.as_mut().resume(()) { sum += x; diff --git a/tests/pass/stacked-borrows/stacked-borrows.rs b/tests/pass/stacked-borrows/stacked-borrows.rs index d2ba184184..dd3ee36f98 100644 --- a/tests/pass/stacked-borrows/stacked-borrows.rs +++ b/tests/pass/stacked-borrows/stacked-borrows.rs @@ -223,7 +223,7 @@ fn wide_raw_ptr_in_tuple() { fn not_unpin_not_protected() { // `&mut !Unpin`, at least for now, does not get `noalias` nor `dereferenceable`, so we also // don't add protectors. (We could, but until we have a better idea for where we want to go with - // the self-referential-generator situation, it does not seem worth the potential trouble.) + // the self-referential-coroutine situation, it does not seem worth the potential trouble.) use std::marker::PhantomPinned; pub struct NotUnpin(i32, PhantomPinned); diff --git a/tests/pass/track-caller-attribute.rs b/tests/pass/track-caller-attribute.rs index bf59617d80..d88bcc9885 100644 --- a/tests/pass/track-caller-attribute.rs +++ b/tests/pass/track-caller-attribute.rs @@ -1,8 +1,8 @@ #![feature(core_intrinsics)] #![feature(stmt_expr_attributes)] #![feature(closure_track_caller)] -#![feature(generator_trait)] -#![feature(generators)] +#![feature(coroutine_trait)] +#![feature(coroutines)] use std::ops::{Coroutine, CoroutineState}; use std::panic::Location; @@ -210,9 +210,9 @@ fn test_closure() { assert_eq!(non_tracked_loc.column(), 33); } -fn test_generator() { +fn test_coroutine() { #[track_caller] - fn mono_generator>( + fn mono_coroutine>( val: Pin<&mut F>, ) -> (&'static str, String, Loc) { match val.resume("Mono".to_string()) { @@ -222,7 +222,7 @@ fn test_generator() { } #[track_caller] - fn dyn_generator( + fn dyn_coroutine( val: Pin<&mut dyn Coroutine>, ) -> (&'static str, String, Loc) { match val.resume("Dyn".to_string()) { @@ -232,32 +232,32 @@ fn test_generator() { } #[rustfmt::skip] - let generator = #[track_caller] |arg: String| { + let coroutine = #[track_caller] |arg: String| { yield ("first", arg.clone(), Location::caller()); yield ("second", arg.clone(), Location::caller()); }; - let mut pinned = Box::pin(generator); - let (dyn_ret, dyn_arg, dyn_loc) = dyn_generator(pinned.as_mut()); + let mut pinned = Box::pin(coroutine); + let (dyn_ret, dyn_arg, dyn_loc) = dyn_coroutine(pinned.as_mut()); assert_eq!(dyn_ret, "first"); assert_eq!(dyn_arg, "Dyn".to_string()); // The `Coroutine` trait does not have `#[track_caller]` on `resume`, so // this will not match. assert_ne!(dyn_loc.file(), file!()); - let (mono_ret, mono_arg, mono_loc) = mono_generator(pinned.as_mut()); + let (mono_ret, mono_arg, mono_loc) = mono_coroutine(pinned.as_mut()); let mono_line = line!() - 1; assert_eq!(mono_ret, "second"); - // The generator ignores the argument to the second `resume` call + // The coroutine ignores the argument to the second `resume` call assert_eq!(mono_arg, "Dyn".to_string()); assert_eq!(mono_loc.file(), file!()); assert_eq!(mono_loc.line(), mono_line); assert_eq!(mono_loc.column(), 42); #[rustfmt::skip] - let non_tracked_generator = || { yield Location::caller(); }; - let non_tracked_line = line!() - 1; // This is the line of the generator, not its caller - let non_tracked_loc = match Box::pin(non_tracked_generator).as_mut().resume(()) { + let non_tracked_coroutine = || { yield Location::caller(); }; + let non_tracked_line = line!() - 1; // This is the line of the coroutine, not its caller + let non_tracked_loc = match Box::pin(non_tracked_coroutine).as_mut().resume(()) { CoroutineState::Yielded(val) => val, _ => unreachable!(), }; @@ -272,5 +272,5 @@ fn main() { test_trait_obj(); test_trait_obj2(); test_closure(); - test_generator(); + test_coroutine(); } diff --git a/tests/pass/tree_borrows/tree-borrows.rs b/tests/pass/tree_borrows/tree-borrows.rs index 89752bffe9..d45be91afc 100644 --- a/tests/pass/tree_borrows/tree-borrows.rs +++ b/tests/pass/tree_borrows/tree-borrows.rs @@ -315,7 +315,7 @@ fn wide_raw_ptr_in_tuple() { fn not_unpin_not_protected() { // `&mut !Unpin`, at least for now, does not get `noalias` nor `dereferenceable`, so we also // don't add protectors. (We could, but until we have a better idea for where we want to go with - // the self-referential-generator situation, it does not seem worth the potential trouble.) + // the self-referential-coroutine situation, it does not seem worth the potential trouble.) use std::marker::PhantomPinned; pub struct NotUnpin(i32, PhantomPinned); From 6a56bb06dd1a7cca0af2ac79e504a2bcffbc30be Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 20 Oct 2023 10:06:08 +0000 Subject: [PATCH 3/5] Rename lots of files that had `generator` in their name --- .../fail/{generator-pinned-moved.rs => coroutine-pinned-moved.rs} | 0 ...enerator-pinned-moved.stderr => coroutine-pinned-moved.stderr} | 0 ...nerators-self-referential.rs => coroutine-self-referential.rs} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename tests/fail/{generator-pinned-moved.rs => coroutine-pinned-moved.rs} (100%) rename tests/fail/{generator-pinned-moved.stderr => coroutine-pinned-moved.stderr} (100%) rename tests/pass/stacked-borrows/{generators-self-referential.rs => coroutine-self-referential.rs} (100%) diff --git a/tests/fail/generator-pinned-moved.rs b/tests/fail/coroutine-pinned-moved.rs similarity index 100% rename from tests/fail/generator-pinned-moved.rs rename to tests/fail/coroutine-pinned-moved.rs diff --git a/tests/fail/generator-pinned-moved.stderr b/tests/fail/coroutine-pinned-moved.stderr similarity index 100% rename from tests/fail/generator-pinned-moved.stderr rename to tests/fail/coroutine-pinned-moved.stderr diff --git a/tests/pass/stacked-borrows/generators-self-referential.rs b/tests/pass/stacked-borrows/coroutine-self-referential.rs similarity index 100% rename from tests/pass/stacked-borrows/generators-self-referential.rs rename to tests/pass/stacked-borrows/coroutine-self-referential.rs From f4f4d038edcb93dec61f5e3d1591ae7994835ed6 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 20 Oct 2023 16:29:05 +0000 Subject: [PATCH 4/5] bless miri --- tests/fail/coroutine-pinned-moved.stderr | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/fail/coroutine-pinned-moved.stderr b/tests/fail/coroutine-pinned-moved.stderr index 547b63f7e2..919fa87f9d 100644 --- a/tests/fail/coroutine-pinned-moved.stderr +++ b/tests/fail/coroutine-pinned-moved.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/generator-pinned-moved.rs:LL:CC + --> $DIR/coroutine-pinned-moved.rs:LL:CC | LL | *num += 1; | ^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,25 +7,25 @@ LL | *num += 1; = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information help: ALLOC was allocated here: - --> $DIR/generator-pinned-moved.rs:LL:CC + --> $DIR/coroutine-pinned-moved.rs:LL:CC | LL | let mut coroutine_iterator = Box::new(CoroutineIteratorAdapter(firstn())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/generator-pinned-moved.rs:LL:CC + --> $DIR/coroutine-pinned-moved.rs:LL:CC | LL | }; // *deallocate* coroutine_iterator | ^ = note: BACKTRACE (of the first span): - = note: inside closure at $DIR/generator-pinned-moved.rs:LL:CC -note: inside ` as std::iter::Iterator>::next` - --> $DIR/generator-pinned-moved.rs:LL:CC + = note: inside closure at $DIR/coroutine-pinned-moved.rs:LL:CC +note: inside ` as std::iter::Iterator>::next` + --> $DIR/coroutine-pinned-moved.rs:LL:CC | LL | match me.resume(()) { | ^^^^^^^^^^^^^ - = note: inside `> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC + = note: inside `> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside `main` - --> $DIR/generator-pinned-moved.rs:LL:CC + --> $DIR/coroutine-pinned-moved.rs:LL:CC | LL | coroutine_iterator_2.next(); // and use moved value | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ From dd5446a4d86311a617f53eaa94c4eb5e14d21ca2 Mon Sep 17 00:00:00 2001 From: The Miri Conjob Bot Date: Sat, 21 Oct 2023 05:14:07 +0000 Subject: [PATCH 5/5] Preparing for merge from rustc --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index 5d972fdd27..bc3882bcf2 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -029d00c4a3176a705e0092de3e1739f8b7c32010 +249624b5043013d18c00f0401ca431c1a6baa8cd