abby test DSL: AliasTyOutlivesViaEnv - #162290
Conversation
|
cc @rust-lang/clippy The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease |
|
|
| visitor: &mut V, | ||
| constraint: &'v TestBinderBoundTypeConstraint<'v>, | ||
| ) -> V::Result { | ||
| let TestBinderBoundTypeConstraint { span: _, hir_id, params, lhs, rhs } = constraint; |
There was a problem hiding this comment.
very cool that ur doing this destructuring :3
| expected | ||
| && let LeafRegionConstraint::AliasTyOutlivesViaEnv(actual, actual_span) = actual | ||
| { | ||
| let expected_anon = self.tcx().anonymize_bound_vars(expected); |
There was a problem hiding this comment.
this does make me wonder if actually construction of RegionConstraint should just anonymize bound vars 😅 though, worse for diagnostics :3
cc #t-types/trait-system-refactor > `hypospray-0.1.2` minimization @ 💬
I feel like we (people working on the type system) need to figure out how we can be erasing bound vars and getting alright diagnostics. cos not anonymizing bound vars everything is bad for perf and structural identity based things 🤔
Not something for this PR though, rust-lang/project-assumptions-on-binders#38
87b02ae to
3b87c57
Compare
|
r=me when Ci is green |
|
@bors r+ |
…BoxyUwU abby test DSL: AliasTyOutlivesViaEnv fixes rust-lang/project-assumptions-on-binders#32 adds two new features to the testing DSL: - in test bodies, add `where` syntax. This is parsed as a standard where clause (reusing the parser's `parse_where_clause`) and goes through the full lowering machinery for various destructurings and whatnot, and goes through the `register_obligation` pipeline, rather than being directly inserted into constraint storage. - `where` syntax inside of `or {}` is not supported, nor is it supported inside of `expect {}` - in test bodies (including inside `or {}`) as well as inside `expect {}`, parse `AliasTyOutlivesViaEnv` constraints via the syntax `for<> Some::Alias: 'a`. The second one is particularly boilerplate-y, due to needing to hook up a `Binder`, which needs a `HirId` and whatnot (this is `TestBinderBoundTypeConstraint`). Oh well. r? @BoxyUwU
…BoxyUwU abby test DSL: AliasTyOutlivesViaEnv fixes rust-lang/project-assumptions-on-binders#32 adds two new features to the testing DSL: - in test bodies, add `where` syntax. This is parsed as a standard where clause (reusing the parser's `parse_where_clause`) and goes through the full lowering machinery for various destructurings and whatnot, and goes through the `register_obligation` pipeline, rather than being directly inserted into constraint storage. - `where` syntax inside of `or {}` is not supported, nor is it supported inside of `expect {}` - in test bodies (including inside `or {}`) as well as inside `expect {}`, parse `AliasTyOutlivesViaEnv` constraints via the syntax `for<> Some::Alias: 'a`. The second one is particularly boilerplate-y, due to needing to hook up a `Binder`, which needs a `HirId` and whatnot (this is `TestBinderBoundTypeConstraint`). Oh well. r? @BoxyUwU
Rollup of 27 pull requests Successful merges: - #159074 ([PAC] FnAbi, llvm.ptrauth.resign and Session API change (2/8)) - #159792 (A more readable debug map for IndexMaps) - #160745 (make closures act like MaybeDangling) - #161940 (Promote `wasm32-wasip3` to a tier 2 target) - #162030 (Prevent `--test` to be used in `rustdoc-html` testsuite) - #162072 (Add new Tier-3 target: `powerpc64-sony-ps3`) - #162179 (type system const items via direct rhs) - #162262 (Avoid manually instantiating some binders in error reporting with `-Znext-solver`) - #162277 (Introduce `rustc_middle::middel::resolve`) - #162285 (box: fixup map/try_map deallocate calls) - #162286 (string: don't unwind prematurely) - #162289 (alloc: a bunch of safety comments) - #162290 (abby test DSL: AliasTyOutlivesViaEnv) - #162292 (Update `askama` version to `0.16.1`) - #160509 (Remove `RegionExt`; move methods to `Region` in `rustc_type_ir`) - #160906 (Suggest usize instead of placeholder type for array length constants) - #160936 (traits: Represent live alias arguments as bitsets) - #161400 (Improve diagnostics for references to closures) - #161656 (Suggest mutable references for FnMut closure arguments) - #161711 (Add more splat fn type tests) - #161786 (Make `tcx.def_id_partial_cmp` public) - #161953 (sanitizers: Implicitly disable mutually exclusive sanitizers) - #162155 (add suggestion for `rustc_allowed_through_unstable_modules` attribute) - #162212 (Implement `Rng` for `Box`) - #162246 (Fix incorrect meta span) - #162266 (std: fix typo) - #162291 (Add regression test from 1.98.1)
…BoxyUwU abby test DSL: AliasTyOutlivesViaEnv fixes rust-lang/project-assumptions-on-binders#32 adds two new features to the testing DSL: - in test bodies, add `where` syntax. This is parsed as a standard where clause (reusing the parser's `parse_where_clause`) and goes through the full lowering machinery for various destructurings and whatnot, and goes through the `register_obligation` pipeline, rather than being directly inserted into constraint storage. - `where` syntax inside of `or {}` is not supported, nor is it supported inside of `expect {}` - in test bodies (including inside `or {}`) as well as inside `expect {}`, parse `AliasTyOutlivesViaEnv` constraints via the syntax `for<> Some::Alias: 'a`. The second one is particularly boilerplate-y, due to needing to hook up a `Binder`, which needs a `HirId` and whatnot (this is `TestBinderBoundTypeConstraint`). Oh well. r? @BoxyUwU
fixes rust-lang/project-assumptions-on-binders#32
adds two new features to the testing DSL:
wheresyntax. This is parsed as a standard where clause (reusing the parser'sparse_where_clause) and goes through the full lowering machinery for various destructurings and whatnot, and goes through theregister_obligationpipeline, rather than being directly inserted into constraint storage.wheresyntax inside ofor {}is not supported, nor is it supported inside ofexpect {}or {}) as well as insideexpect {}, parseAliasTyOutlivesViaEnvconstraints via the syntaxfor<> Some::Alias: 'a.The second one is particularly boilerplate-y, due to needing to hook up a
Binder, which needs aHirIdand whatnot (this isTestBinderBoundTypeConstraint). Oh well.r? @BoxyUwU