Repository navigation
Conversation
| "/tests/headers.html" = "directives.html" | ||
| "/tests/integration.html" = "ecosystem.html" | ||
| "/tests/rust-for-linux.html" = "ecosystem-test-jobs/rust-for-linux.html" | ||
| "/ty_module/binder_test_dsl.html" = "/ty-module/binder-test-dsl.html" |
There was a problem hiding this comment.
these entries exist for renamed filenames to avoid broken links... yours should not need an entry since it's entirely new
0792c3e to
396c697
Compare
|
rust-lang/project-assumptions-on-binders#9 was a thing until I closed it the other day 😆 |
|
|
||
| These are parsed identically to a `where` clause, and so support all sorts of fancy Rust syntax, like `'a: 'b + 'c`. | ||
| Rustc obligations are created from these clauses and registered as things to prove via `register_obligation` (and as | ||
| such are elaborated and whatnot). The LHS is not restricted to just being a placeholder or alias. These are much more |
There was a problem hiding this comment.
we elaborate them? :o
There was a problem hiding this comment.
to be honest I don't actually know the technical word here, was kind of just hoping that the english word of elaboration is the same as the technical word. Like, for example, whatever is happening here:
trait Trait {
type Assoc;
}
core::test_binder_constraints! {
impl<T: Trait> {
forall<'a> {
for<> T::Assoc: 'a
} expect {
or {
for<'b> T::Assoc: 'b,
for<> T::Assoc: 'static,
}
}
}
}
core::test_binder_constraints! {
impl<T: Trait> {
forall<'a> {
predicates T::Assoc: 'a
} expect {
or {
for<'b> T::Assoc: 'b,
for<> T::Assoc: 'static,
T: 'static // <-- new!
}
}
}
}There was a problem hiding this comment.
I guess the vibes feel slightly off 🤔 we evaluate the goals and that gives us a list of region constraints that need to hold for the goal to hold. I wouldn't call that elaboration in casual coversation especailly since we have the separate term "elaboration" for things like turning T: Trait into T: Trait + Super and whatnot
There was a problem hiding this comment.
I would maybe say like, "and as such are later evaluated resulting in a pile of region constraints and whatnot"
technically not! this technically passes: //@ check-pass
#![feature(test_binder_constraints)]
core::test_binder_constraints! {
impl<'a: 'b, 'b> {
predicates 'a: 'b
}
}I believe that the only thing that So, yeah, while it is probably not particularly useful to use the test framework without |
396c697 to
c53d4be
Compare
For context: see rust-lang/project-assumptions-on-binders#8 but there's been several more-specific issues filed since then, so, yeah.
r? @BoxyUwU
I forget if there's any abby tracking issue for writing docs? I don't think so. Anyway, there ought to be docs for this lil wonky nugget of a macro, so, I wrote some words.
I wasn't particularly careful about being extremely precise with my wording/terminology choices while writing this, so feel free to nitpick if something isn't technically correct. Hopefully is at least comprehensible/understandable though.