--- title: ITE meeting 2023-09-28 tags: impl-trait-everywhere, triage-meeting, minutes date: 2023-09-28 discussion: https://rust-lang.zulipchat.com/#narrow/stream/315482-t-compiler.2Fetc.2Fopaque-types/topic/ITE.20triage.20meeting.202023-09-28 url: https://hackmd.io/yVvIGMfMRqqqI1DUtr2dsw --- # ITE meeting agenda - Meeting date: 2023-09-28 ## Attendance - People: TC, tmandry, compiler-errors ## Meeting roles - Minutes: TC ## Announcements or custom items (Meeting attendees, feel free to add items here!) ## Project board issues ### "Add async_fn_in_trait lint" rust#116040 - **Link:** https://github.com/rust-lang/rust/pull/116184 - **Labels:** S-waiting-on-review, T-compiler CE: I agree with the feedback from petrochenkov that we should only lint in publicly-reachable places. (Discussion about how in the T-lang meeting there was ambivalence.) CE: I've going to apply petrochenkov's suggestion. ### AFIT/RPITIT stabilization CE: I've been pinging people to check boxes. CE: lcnr resolved the concern lcnr had. CE: As TC and I discussed in the last meeting, if we get everyone to check the box before the middle of next month, we can get this out by the end of the year. ### "Consider alias bounds when computing liveness in NLL" rust#116040 - **Link:** https://github.com/rust-lang/rust/pull/116040 - **Labels:** S-waiting-on-review, T-types CE: Niko needs to review this. --- We discussed the limitations of this PR. E.g., the lifetimes that an opaque type captures affects type equality. CE provided this example: ```rust trait Captures<'a> {} impl<T> Captures<'_> for T {} fn foo<'a: 'a>() -> impl Sized + Captures<'a> + 'static {} fn eq<T>(_: T, _: T) {} fn test<'i, 'j>() { eq(foo::<'i>(), foo::<'j>()); } ``` We also discussed the case of multiple lifetimes. CE provided this example of something that doesn't work: ```rust trait Captures<T> {} impl<T, U> Captures<T> for U {} fn foo<'a: 'a, 'b: 'b, 'c: 'c>(x: &'c Vec<u8>) -> impl Sized + Captures<(&'a (), &'b (), &'c ())> {} // error[E0716]: temporary value dropped while borrowed fn bar<'a: 'b, 'b>() { fn outlives<'o, T: 'o>(_: T) {} outlives::<'b>(foo::<'a, 'b, '_>(&vec![])); } ``` TC pointed out that we can always make this case work at the expense of adding a new early-bound lifetime parameter by transforming `fn callee<P1, .., Pn>(..) -> impl Trait` into `fn callee<'o, P1: 'o, .., Pn: 'o>(..) -> impl Trait + 'o`. CE agreed with this and noted that it does make the PR more widely applicable than it initially appears. We then discussed how the PR makes this case work: ```rust trait Captures<T> {} impl<T, U> Captures<T> for U {} fn foo<'o, T>(t: T) -> impl Sized + 'o {} fn test<'o>(x: ()) -> impl Sized + 'o { foo::<'o, _>(&x) } ``` The problem had been how to represent the type when that type contains a lifetime that's only valid within the function. CE described how this is handled in the PR by substituting the erased lifetime for the concrete lifetime. (The meeting ended here.) ### "Weird interaction between specialization and RPITITs" #108309 - **Link:** https://github.com/rust-lang/rust/issues/108309 ### "Exponential compile times for chained RPITIT" #102527 - **Link:** https://github.com/rust-lang/rust/issues/102527 ### "Mysterious "higher-ranked lifetime error" with async fn in trait and return-type notation" #110963 - **Link:** https://github.com/rust-lang/rust/issues/110963 ### "AFIT: strange errors on circular impls" #112626 - **Link:** https://github.com/rust-lang/rust/issues/112626 ### "Nightly (warning): Async traits Self return requires type specification" #113538 - **Link:** https://github.com/rust-lang/rust/issues/113538 ## Pending PRs on the impl-trait-initiative repo None. ## Open PRs ### "stricter hidden type wf-check" rust#115008 - **Link:** https://github.com/rust-lang/rust/pull/115008 - **Labels:** S-waiting-on-review, A-impl-trait, T-types, WG-trait-system-refactor ### "Stabilize `async fn` and return-position `impl Trait` in trait" rust#115822 - **Link:** https://github.com/rust-lang/rust/pull/115822 - **Labels:** T-lang, S-waiting-on-team, proposed-final-comment-period, disposition-merge, I-lang-nominated, F-async_fn_in_trait, T-types, F-return_position_impl_trait_in_trait