Skip to content

abby dsl: exists in universe - #166561

Closed
khyperia wants to merge 1 commit into
rust-lang:mainfrom
khyperia:abby-dsl-exists-in-universe
Closed

khyperia wants to merge 1 commit into
rust-lang:mainfrom
khyperia:abby-dsl-exists-in-universe

Conversation

@khyperia

@khyperia khyperia commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

prerequisite PR to allow leaking variables in the test DSL to allow testing a solution for rust-lang/project-assumptions-on-binders#49

alternative to #166586

ideally, we would allow

forall<'a> { },
'a: 'c,

i.e. complete nonlexical resolution of variables with arbitrary leakage. however, this is difficult and annoying (it is what is done in #166586), so as a stopgap, provide the ability to leak variables by having an exists target a universe other than the current one. the above example can then be written as:

exists<'b> in U {
    forall<'a> is U {
        'b = 'a, // 'b is allowed to name 'a because 'b is in U1
    },
    'b: 'c,
}

r? @BoxyUwU

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 25, 2026
@rustbot

rustbot commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

@khyperia

Copy link
Copy Markdown
Member Author

Closing in favor of #166561

@khyperia khyperia closed this Nov 26, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 26, 2026
@khyperia
khyperia deleted the abby-dsl-exists-in-universe branch November 26, 2026 13:00
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 26, 2026
…oxyUwU

abby test dsl: one binder to rule them all

prerequisite PR to allow leaking variables in the test DSL to allow testing a solution for rust-lang/project-assumptions-on-binders#49

alternative to rust-lang#166561

allow the following:

```rust
forall<'a> { },
'a: 'c,
```

by moving the `ty::Binder` from each `forall`/`exists` to a single top-level mega-binder, so the whole thing instantiates at the same time, and all variables are in scope across the entire `test_binder_constraints!`. This does mean that you can't use the same name twice even though it "looks like" they're in different scopes, because, it's all just one big scope.

r? @BoxyUwU
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 26, 2026
…oxyUwU

abby test dsl: one binder to rule them all

prerequisite PR to allow leaking variables in the test DSL to allow testing a solution for rust-lang/project-assumptions-on-binders#49

alternative to rust-lang#166561

allow the following:

```rust
forall<'a> { },
'a: 'c,
```

by moving the `ty::Binder` from each `forall`/`exists` to a single top-level mega-binder, so the whole thing instantiates at the same time, and all variables are in scope across the entire `test_binder_constraints!`. This does mean that you can't use the same name twice even though it "looks like" they're in different scopes, because, it's all just one big scope.

r? @BoxyUwU
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 26, 2026
…oxyUwU

abby test dsl: one binder to rule them all

prerequisite PR to allow leaking variables in the test DSL to allow testing a solution for rust-lang/project-assumptions-on-binders#49

alternative to rust-lang#166561

allow the following:

```rust
forall<'a> { },
'a: 'c,
```

by moving the `ty::Binder` from each `forall`/`exists` to a single top-level mega-binder, so the whole thing instantiates at the same time, and all variables are in scope across the entire `test_binder_constraints!`. This does mean that you can't use the same name twice even though it "looks like" they're in different scopes, because, it's all just one big scope.

r? @BoxyUwU
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 27, 2026
…oxyUwU

abby test dsl: one binder to rule them all

prerequisite PR to allow leaking variables in the test DSL to allow testing a solution for rust-lang/project-assumptions-on-binders#49

alternative to rust-lang#166561

allow the following:

```rust
forall<'a> { },
'a: 'c,
```

by moving the `ty::Binder` from each `forall`/`exists` to a single top-level mega-binder, so the whole thing instantiates at the same time, and all variables are in scope across the entire `test_binder_constraints!`. This does mean that you can't use the same name twice even though it "looks like" they're in different scopes, because, it's all just one big scope.

r? @BoxyUwU
rust-bors Bot pushed a commit that referenced this pull request Nov 27, 2026
Rollup merge of #166586 - khyperia:abby-dsl-mega-binder, r=BoxyUwU

abby test dsl: one binder to rule them all

prerequisite PR to allow leaking variables in the test DSL to allow testing a solution for rust-lang/project-assumptions-on-binders#49

alternative to #166561

allow the following:

```rust
forall<'a> { },
'a: 'c,
```

by moving the `ty::Binder` from each `forall`/`exists` to a single top-level mega-binder, so the whole thing instantiates at the same time, and all variables are in scope across the entire `test_binder_constraints!`. This does mean that you can't use the same name twice even though it "looks like" they're in different scopes, because, it's all just one big scope.

r? @BoxyUwU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants