Skip to content

Commit a4e13b7

Browse files
authored
Fix a typo in the GAT post (#1044)
1 parent 8aa514b commit a4e13b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

posts/2022-10-28-gats-stabilization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn main() {
6767

6868
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`.
6969

70-
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:
70+
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:
7171

7272
```rust
7373
error[E0597]: `array` does not live long enough

0 commit comments

Comments
 (0)