# Rust 1.67 lifetime error; compiles with 1.66 -- what changed?

**URL:** <https://users.rust-lang.org/t/rust-1-67-lifetime-error-compiles-with-1-66-what-changed/88483>\
**Category:** help\
**Created:** [January 31, 2023, 4:35am UTC](https://users.rust-lang.org/t/rust-1-67-lifetime-error-compiles-with-1-66-what-changed/88483 "2023-01-31T04:35:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jblachly](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/jblachly/32/22815_2.png) [@jblachly](https://users.rust-lang.org/u/jblachly)\
**Post date:** [January 31, 2023, 4:35am UTC](https://users.rust-lang.org/t/rust-1-67-lifetime-error-compiles-with-1-66-what-changed/88483/1 "2023-01-31T04:35:19Z")

</div>

Rust 1.66 compiles the citeproc-rs package ([GitHub - zotero/citeproc-rs: CSL processor in Rust.](https://github.com/zotero/citeproc-rs)) without complaint.

Rust 1.67 fails with a lifetime error:

```rust
$ rustup run 1.67 cargo build
...
   Compiling citeproc-io v0.1.0 (/private/tmp/citeproc-rs/crates/io)
error: `QuoteSplitter<'_, impl Iterator<Item = (usize, char)> + '_>::events::{opaque#0}<'_>` does not live long enough
   --> crates/io/src/output/parse_quotes.rs:419:47
    |
419 | | MicroNode::Formatted(..) => EachSplitter::Index(Some(ix)),
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: `QuoteSplitter<'_, impl Iterator<Item = (usize, char)> + '_>::events::{opaque#0}<'_>` does not live long enough
   --> crates/io/src/output/parse_quotes.rs:430:21
    |
430 | / EachSplitter::Splitter {
431 | | index: ix,
432 | | splitter,
433 | | seen_any: Some(false),
434 | | }
    | | _____________________ ^

error: could not compile `citeproc-io` due to 2 previous errors

```

I don't see anything in the Changelog / Release Notes ([https://github.com/rust-lang/rust/blob/master/RELEASES.md](https://github.com/rust-lang/rust/blob/master/RELEASES.md)) for 1.67 that could explain this. **However,** the likely offending soundness change: [Neither require nor imply lifetime bounds on opaque type for well formedness by oli-obk · Pull Request #95474 · rust-lang/rust · GitHub](https://github.com/rust-lang/rust/pull/95474/) says it merged in _1.66_, the rustc version which builds just fine. What gives?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![CAD97](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/cad97/32/5076_2.png) [@CAD97](https://users.rust-lang.org/u/CAD97)\
**Post date:** [January 31, 2023, 5:23am UTC](https://users.rust-lang.org/t/rust-1-67-lifetime-error-compiles-with-1-66-what-changed/88483/2 "2023-01-31T05:23:16Z")

</div>

[Regression 1.67 "`some_fn::{opaque#0}<'_>` does not live long enough" · Issue #107426](https://github.com/rust-lang/rust/issues/107426) seems like the same thing; it also reports working on 1.66 and not on 1.67, and was bisected to PR#95474. I can't speak to why the commit says it's present in 1.66 despite being found by the bisection between 1.66 and 1.67.

---

<div class="post-metadata">

**Author:** ![steffahn](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/steffahn/32/47569_2.png) [@steffahn](https://users.rust-lang.org/u/steffahn)\
**Post date:** [January 31, 2023, 5:40am UTC](https://users.rust-lang.org/t/rust-1-67-lifetime-error-compiles-with-1-66-what-changed/88483/3 "2023-01-31T05:40:24Z")

</div>

If im not mistaken, the merge date checks out for inclusion in 1.66 though?

---

<div class="post-metadata">

**Author:** ![jblachly](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/jblachly/32/22815_2.png) [@jblachly](https://users.rust-lang.org/u/jblachly)\
**Post date:** [January 31, 2023, 12:52pm UTC](https://users.rust-lang.org/t/rust-1-67-lifetime-error-compiles-with-1-66-what-changed/88483/4 "2023-01-31T12:52:25Z")

</div>

I guess since we identified the breaking change, this has turned into a question about the discrepancy in the merge date and Changelog, versus empirical compliation data. I wondered if there was something about release engineering I did not understand.

---

<div class="post-metadata">

**Author:** ![steffahn](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/steffahn/32/47569_2.png) [@steffahn](https://users.rust-lang.org/u/steffahn)\
**Post date:** [January 31, 2023, 1:19pm UTC](https://users.rust-lang.org/t/rust-1-67-lifetime-error-compiles-with-1-66-what-changed/88483/5 "2023-01-31T13:19:05Z")

</div>

> [@CAD97](#):
>
> I can't speak to why the commit says it's present in 1.66 despite being found by the bisection between 1.66 and 1.67.

So, regarding that issue, reproducing it on my laptop shows it regressed in 1.66. Both 1.66.1 and 1.66.0 don’t compile, 1.65 does compile.

* * *

On the other hand, for `citeproc-rs` I can _confirm_ that it breaks in 1.67. So a separate bisection is needed, AFAICT.

* * *

So my bisection points to “[Support using `Self` or projections inside an RPIT/async fn #103491](https://github.com/rust-lang/rust/pull/103491)”. Which doesn’t look like a PR that’s supposed to break anything?

* * *

So I’ve opened a new `rustc` issue 🙂

> <https://github.com/rust-lang/rust/issues/107516>
>
> Discussed in https://users.rust-lang.org/t/rust-1-67-lifetime-error-compiles-wit…h-1-66-what-changed/88483 and described on https://github.com/zotero/citeproc-rs/issues/154. I can reproduce a regression in 1.67.0 using the current latest commit “\[\`2ab195a1e6f84f0ff284813ece61dc62096abbfe\`\](https://github.com/zotero/citeproc-rs/commit/2ab195a1e6f84f0ff284813ece61dc62096abbfe)” in the \`zotero/citeproc-rs\` repo.
> 
> This issue was first incorrectly thought of as a sort of “duplicate” of #107426, since that issue originally claimed a 1.67 regression, too, but actually regressed in 1.66, and on a deliberate soundness fix (#95474).
> 
> However, bisection of the above-mentioned commit on \`citeproc-rs\` points to a different PR, that is
> \* #103491
> 
> Glancing at it, that PR does not look like it’s \*supposed\* to break anything. @rustbot label regression-from-stable-to-stable, T-compiler, E-needs-mcve
> 
> Compilation error
> \`\`\`
> error: \`QuoteSplitter\<'\_, impl Iterator\<Item = (usize, char)\> + '\_\>::events::{opaque#0}\<'\_\>\` does not live long enough
> --\> crates/io/src/output/parse\_quotes.rs:419:47
> |
> 419 | | MicroNode::Formatted(..) =\> EachSplitter::Index(Some(ix)),
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> error: \`QuoteSplitter\<'\_, impl Iterator\<Item = (usize, char)\> + '\_\>::events::{opaque#0}\<'\_\>\` does not live long enough
> --\> crates/io/src/output/parse\_quotes.rs:430:21
> |
> 430 | / EachSplitter::Splitter {
> 431 | | index: ix,
> 432 | | splitter,
> 433 | | seen\_any: Some(false),
> 434 | | }
> | |\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_^
> 
> error: could not compile \`citeproc-io\` due to 2 previous errors
> \`\`\`
> 
> bisection
> \`\`\`\`
> searched toolchains a28f3c88e50a77bc2a91889241248c4543854e61 through b7bc90fea3b441234a84b49fdafeb75815eebbab
> 
> 
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> Regression in 7fe6f36224e92db6fbde952e0b7e50863161f6ee
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> ==================================================================================
> = Please file this regression report on the rust-lang/rust GitHub repository =
> = New issue: https://github.com/rust-lang/rust/issues/new =
> = Known issues: https://github.com/rust-lang/rust/issues =
> = Copy and paste the text below into the issue report thread. Thanks! =
> ==================================================================================
> 
> searched nightlies: from nightly-2022-09-10 to nightly-2023-01-20
> regressed nightly: nightly-2022-11-22
> searched commit range: https://github.com/rust-lang/rust/compare/a28f3c88e50a77bc2a91889241248c4543854e61...b7bc90fea3b441234a84b49fdafeb75815eebbab
> regressed commit: https://github.com/rust-lang/rust/commit/7fe6f36224e92db6fbde952e0b7e50863161f6ee
> 
> \<details\>
> \<summary\>bisected with \<a href='https://github.com/rust-lang/cargo-bisect-rustc'\>cargo-bisect-rustc\</a\> v0.6.5\</summary\>
> 
> 
> Host triple: x86\_64-unknown-linux-gnu
> Reproduce with:
> \`\`\`bash
> cargo bisect-rustc --prompt --access github --start 2022-09-10 --end 2023-01-20 --regress error 
> \`\`\`
> \`\`\`\`

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [May 1, 2023, 1:19pm UTC](https://users.rust-lang.org/t/rust-1-67-lifetime-error-compiles-with-1-66-what-changed/88483/6 "2023-05-01T13:19:52Z")

</div>

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
