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

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

Rust 1.67 fails with a lifetime error:

$ 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/
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/
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 ( 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 says it merged in 1.66, the rustc version which builds just fine. What gives?

Thanks in advance

Regression 1.67 "some_fn::{opaque#0}<'_> does not live long enough" · Issue #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.

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

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.

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”. Which doesn’t look like a PR that’s supposed to break anything?

So I’ve opened a new rustc issue :slight_smile:


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.