Stream: wg-traits

Topic: Issue #34426 help

Osspial (Mar 16 2019 at 17:28, on Zulip):

Hi! I'm trying to look into why #34426 is happening since it's an issue that's preventing my code from compiling, and I think I've found what's causing the problem, but I'm not entirely sure what the proper solution for it is.

looking at, it seems that for HRTB clauses, the RegionKind::ReLateBound in the HRTB's Predicate::Trait variant isn't getting properly normalized, leading to the issue. My first guess for solving this would be to try and use the same trait-bound checking mechanisms used elsewhere in the codebase (which seems to be the traits::fulfill machinery), but I think the comment at 198 says that that doesn't work.

However, I don't understand what exactly that comment is saying. What exactly are outlives predicates and region inference constraints, and why is it bad to turn the first into the second?

Last update: Jun 07 2020 at 10:00UTC