diff --git a/posts/2022-10-28-gats-stabilization.md b/posts/2022-10-28-gats-stabilization.md index 62e2402f1..bf8d8238c 100644 --- a/posts/2022-10-28-gats-stabilization.md +++ b/posts/2022-10-28-gats-stabilization.md @@ -67,7 +67,7 @@ fn main() { Here, imagine we wanted to have a `LendingIterator` where the items are overlapping slices of an array. We also have a function `print_items` that prints every item of a `LendingIterator`, as long as they implement `Debug`. This all seems innocent enough, but the above code doesn't compile — even though it should. Without going into details here, the `for<'a> I::Item<'a>: Debug` currently implies that `I::Item<'a>` must outlive `'static`. -This is not really a nice bug. And of all the ones we'll mention today, this will likely be the one that is most limiting, annoying, and tough to figure out. This pops up much more often with GATs, but can be found with code that doesn't use GATs at all. Unfortunately, fixing this requires some refactorings to the compiler that isn't a short-term project. It is on the horizon though. The good news is that, in the meantime, we are least working on improving the error message you get from this code. This is what it will look like in the upcoming stabilization: +This is not really a nice bug. And of all the ones we'll mention today, this will likely be the one that is most limiting, annoying, and tough to figure out. This pops up much more often with GATs, but can be found with code that doesn't use GATs at all. Unfortunately, fixing this requires some refactorings to the compiler that isn't a short-term project. It is on the horizon though. The good news is that, in the meantime, we are working on improving the error message you get from this code. This is what it will look like in the upcoming stabilization: ```rust error[E0597]: `array` does not live long enough @@ -274,4 +274,4 @@ To conclude things, all the various people involved in getting this stabilizatio [Iterator]: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html [tracking issue]: https://github.com/rust-lang/rust/issues/44265 [stabilization pull request]: https://github.com/rust-lang/rust/pull/96709 -[chumsky_blog_post]: https://smallcultfollowing.com/babysteps/blog/2022/06/27/many-modes-a-gats-pattern/ \ No newline at end of file +[chumsky_blog_post]: https://smallcultfollowing.com/babysteps/blog/2022/06/27/many-modes-a-gats-pattern/