wg-async-foundations post-stable triage

Agenda for this meeting

  • What to prioritize over the next N weeks
  • What about beyond that
  • How to triage and track things now that async-await is stable

Niko’s random idea

  • Two questions, really:
  • What new lang/lib features should we be looking at and in what order?
  • Not what I think we should answer in this meeting
  • Probably good to give a bit of time to think this over
  • I would like to maybe do a series of “educate Niko” videos
  • where I (or others…) interview folks who know things, like cramertj, carl, etc about what they think would be good, their voice of async I/O
  • “workarounds you should know and love”
  • Future strangelove: how I learned to stop worrying and love the workaround

Deferred issues

  • Sep 26 — beta branches that carries async-await, last chance to affect stable
  • back-compat makes sense
  • diagnostics and shorter term fixes
  • cramertj: “return type”
  • nikomatsakis: overapproximation of what cross an await
  • drop(foo); doesn’t matter
  • comes up a lot with std::mutex and futures code
  • but this is something of a gotcha, would prefer a futures-aware mutex is you’re going to use them
  • alternative: “surprisingly hard things” chapter?
  • or update the chapter on shared state
  • afterwards 

“Known bugs”

Short term

  • inline on fn — should just be an error for now
  • Centril: Why that? #[inline] is a hint and may not have any effects at all but I’d like to not add more special rules in the static semantics if avoidable.
  • mark async constructors as inline
  • “Late diagnostics” or “error at point of use”
  • When a future is not send but must be, can we point into the source of the future and not just at the site of use?

Long term

  • Overcapture
  • Overapproximation: where the “pre-MIR” analysis determines that we will capture, but we do not
  • Overcapture: the MIR actually does capture, but shouldn’t
  • Short-term fixes:
  • Improve diagnostics
  • Improve documentation
  • UCG interactions
  • #63818
  • “lifetime of underlying stack slots”
  • if you make a raw ptr to a local variable, then move from that variable, can the raw ptr still be used?
  • what if the variable is dead but not moved from? (#63768)