From b9ab0d5d451ac7ea66a38b0c108163de6e63a627 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Fri, 30 Oct 2026 15:52:45 -0700 Subject: [PATCH 1/3] chore(quest): claim quest/m3/ts-zero-sized-impls.md Quest-Claim: 9e1c448a9d86bc77 From 073b76d58df1590ef516ed69602dd751a6d69121 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Fri, 30 Oct 2026 16:19:21 -0700 Subject: [PATCH 2/3] feat(ts): translate std's impls of its zero-sized types `()`, `PhantomData`, `PhantomPinned`, and `..` are `undefined`: each compares equal, orders `Equal`, and hashes nothing, so they are hash and B-tree keys and their derived and std impls translate. `PhantomData`'s `Debug` names its type as rustc's `type_name` does, and `iter::Empty`'s `Clone`, `Default`, and `Debug` translate too. Collecting `Option`s takes `rt.None` for the items' `None` and the result's, and `()` collects by `for_each`. A parameter read only for parts holding nothing is marked unused, as is a struct's type parameter only a `PhantomData` holds. Co-Authored-By: Claude Opus 5.5 --- quest/m3/README.md | 1 - quest/m3/ts-zero-sized-impls.md | 18 - ts/README.md | 1 + ts/fixtures/lang/expected/core/option.ts | 22 + ts/fixtures/lang/expected/harness.ts | 4 +- ts/fixtures/lang/expected/zeros.Names.ts | 128 ++++ ts/fixtures/lang/expected/zeros.Rest.ts | 30 + ts/fixtures/lang/expected/zeros.Tagged.ts | 118 ++++ ts/fixtures/lang/expected/zeros.ts | 214 +++++++ ts/fixtures/lang/src/harness.rs | 2 + ts/fixtures/lang/src/lib.rs | 2 +- ts/fixtures/lang/src/zeros.rs | 155 ++++- ts/fixtures/reject/census.md | 678 +++++++++++----------- ts/fixtures/reject/expected.txt | 223 ++++--- ts/fixtures/reject/src/lib.rs | 5 - ts/fixtures/reject/ts.toml | 1 - ts/runtime/rt/collections.ts | 5 + ts/runtime/rt/hash.ts | 3 + ts/runtime/rt/iter.ts | 27 +- ts/src/lower/body.rs | 20 +- ts/src/lower/collections.rs | 14 +- ts/src/lower/fmt.rs | 11 + ts/src/lower/iter.rs | 33 +- ts/src/lower/library.rs | 31 +- ts/src/lower/mir/mod.rs | 35 +- ts/src/lower/mod.rs | 31 +- ts/src/main.rs | 1 + ts/src/ts.rs | 16 + 28 files changed, 1289 insertions(+), 540 deletions(-) delete mode 100644 quest/m3/ts-zero-sized-impls.md create mode 100644 ts/fixtures/lang/expected/zeros.Names.ts create mode 100644 ts/fixtures/lang/expected/zeros.Rest.ts create mode 100644 ts/fixtures/lang/expected/zeros.Tagged.ts diff --git a/quest/m3/README.md b/quest/m3/README.md index 628c33f97..b1043d057 100644 --- a/quest/m3/README.md +++ b/quest/m3/README.md @@ -32,6 +32,5 @@ generic std gap is planned here even when moq never calls it. - [Port the workflow guard to kixelated/quest](/quest/m3/quest-workflow-guard.md) - quest's environment guard parses YAML as this repository's does - [A VecDeque's Debug](/quest/m3/ts-deque-debug.md) - `{:?}` of a `VecDeque` translates, writing std's list - [A parameter read only where lowering leaves nothing](/quest/m3/ts-unread-params.md) - an instance whose lowering drops every read of a parameter marks it unused, so `tsc` accepts it -- [std's impls of its zero-sized types](/quest/m3/ts-zero-sized-impls.md) - `PhantomData`'s derived impls translate, and `()` is a hash or B-tree key - [Array keys a collection holds](/quest/m3/ts-array-keys.md) - collections of `[T; N]` keys type-check - [Zip's next_back in constant time](/quest/m3/ts-zip-back.md) - a reversed zip of random-access iterators skips the longer side's excess at once diff --git a/quest/m3/ts-zero-sized-impls.md b/quest/m3/ts-zero-sized-impls.md deleted file mode 100644 index d096cb8f9..000000000 --- a/quest/m3/ts-zero-sized-impls.md +++ /dev/null @@ -1,18 +0,0 @@ -# [S] std's impls of its zero-sized types - -## Goal - -`PhantomData`'s `Debug`, `Default`, `PartialEq`, and the other impls `#[derive]` calls on a -field of it translate, and `()` is a hash or B-tree key and the item of a -`collect::>`, proven by differential tests against native Rust. - -## Plan - -Found by [#304](https://github.com/moq-dev/rust2/pull/304) on 2026-10-30: a struct deriving -`Debug`, `Default`, or `PartialEq` with a `PhantomData` field is refused as an unsupported -call to its impl, and `HashSet<()>`, `BTreeSet<()>`, `HashMap<(), _>`, and collecting -`Option<()>` items refuse `()` as a key, as an ordered value, and as an `Option` whose -`None` is `rt.None`. The crate's own unit structs already translate in each. Each impl -of `PhantomData` reads nothing; its `Debug` writes its type's name, `PhantomData`. - -Public API: the translator's output. diff --git a/ts/README.md b/ts/README.md index 968be877c..068bb588c 100644 --- a/ts/README.md +++ b/ts/README.md @@ -83,6 +83,7 @@ crate translation reaches is refused, and so are two versions of one crate it re | `u64`, `i64`, `u128`, `i128` | `rt.u64` and so on: a branded `number` while a safe integer, 32-bit limbs past 2^53, checked the same way | | `f64` | `rt.f64`: a `number` branded so, which is the same IEEE 754 double | | `f32` | `rt.f32`: a `number` branded so, which a single holds exactly | +| `()`, `PhantomData`, `PhantomPinned`, `..` | `undefined`, every value equal and hashing nothing; a type parameter only a `PhantomData` holds is `_T` in its struct's interface | | `struct` | a plain object, typed by an interface; a class if it may drop | | `enum` without data | a union of strings: `"Lite01" \| "Lite02"`, or `never` without variants | | `enum` | a union of objects tagged by variant | diff --git a/ts/fixtures/lang/expected/core/option.ts b/ts/fixtures/lang/expected/core/option.ts index d413ff6f7..8591d69e0 100644 --- a/ts/fixtures/lang/expected/core/option.ts +++ b/ts/fixtures/lang/expected/core/option.ts @@ -38,6 +38,7 @@ import type * as slices_Item from "../slices.Item.ts"; import * as slices_Noisy from "../slices.Noisy.ts"; import type * as slices_Pair from "../slices.Pair.ts"; import type * as Short from "../splits.Short.ts"; +import * as Tagged from "../zeros.Tagged.ts"; export function isSomeAnd$09tpccf(self: rt.u8 | undefined, f: (a0: rt.u8) => boolean): boolean { if (self === undefined) { @@ -193,6 +194,13 @@ export function unwrapOrDefault$165pyh5(self: string | undefined): string { return self; } +export function unwrapOrDefault$1b97y1a(self: Tagged.Tagged | undefined): Tagged.Tagged { + if (self === undefined) { + return Tagged.default$Default_String(); + } + return self; +} + export function unwrapOrDefault$0wx44sw(self: rt.ByteVec | undefined): rt.ByteVec { if (self === undefined) { return new rt.ByteVec(); @@ -370,6 +378,13 @@ export function map$1c7fhtg(self: rt.ByteVec | undefined, f: (a0: rt.ByteVec) => return f(self); } +export function map$0po44cb(self: undefined[] | undefined, f: (a0: undefined[]) => Uint8Array): Uint8Array | undefined { + if (self === undefined) { + return undefined; + } + return f(self); +} + export function map$0lcwx9x(self: Way.Way | undefined, f: (a0: Way.Way) => boolean): boolean | undefined { if (self === undefined) { return undefined; @@ -461,6 +476,13 @@ export function map$1k7m6zz(self: [rt.u8, rt.u8] | undefined, f: (a0: [rt.u8, rt return f(self); } +export function map$1iwwjee(self: rt.u8 | undefined, f: (a0: rt.u8) => Uint8Array): Uint8Array | undefined { + if (self === undefined) { + return undefined; + } + return f(self); +} + export function map$0p22lts(self: rt.u8 | undefined, f: (a0: rt.u8) => undefined): undefined | rt.None { if (self === undefined) { return rt.None; diff --git a/ts/fixtures/lang/expected/harness.ts b/ts/fixtures/lang/expected/harness.ts index 96a3147b1..928772cca 100644 --- a/ts/fixtures/lang/expected/harness.ts +++ b/ts/fixtures/lang/expected/harness.ts @@ -43,7 +43,7 @@ import { statics, cells as statics_cells, onces } from "./statics.ts"; import { strs, slices, edits as strs_edits, parses as strs_parses, iters, drains as strs_drains, hinted } from "./strs.ts"; import { decodes } from "./utf8.ts"; import { wrappers } from "./wrappers.ts"; -import { zeros } from "./zeros.ts"; +import { zeros, impls, keys as zeros_keys } from "./zeros.ts"; /** * Each case's name and what it runs. The first byte picks one modulo their count, so a @@ -192,7 +192,7 @@ export function cases(): [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) maps(data69, out70); }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["arrays::lent", (_2170: rt.u8, data70: rt.ByteSlice, out71: rt.ByteVec): undefined => { lent(data70, out71); - }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["floats::mul_adds", mulAdds as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["singles::mul_adds", singles_mulAdds as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined]]; + }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["floats::mul_adds", mulAdds as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["singles::mul_adds", singles_mulAdds as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["zeros::impls", impls as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["zeros::keys", zeros_keys as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined]]; } /** Run one case. */ diff --git a/ts/fixtures/lang/expected/zeros.Names.ts b/ts/fixtures/lang/expected/zeros.Names.ts new file mode 100644 index 000000000..c1d180af5 --- /dev/null +++ b/ts/fixtures/lang/expected/zeros.Names.ts @@ -0,0 +1,128 @@ +// Generated by rust2-ts. Do not edit. + +import * as rt from "./rt.ts"; + +export function clone$Clone(_self: Names): Names { + _self._0; + _self._1; + _self._2; + _self._3; + _self._4; + _self._5; + _self._6; + _self._7; + _self._8; + _self._9; + return { _0: undefined, _1: undefined, _2: undefined, _3: undefined, _4: undefined, _5: undefined, _6: undefined, _7: undefined, _8: undefined, _9: undefined }; +} + +export function fmt$Debug(_self: Names, f: rt.Formatter): rt.Result { + const values: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData<(i64, bool)>"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData<&str>"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData<[u16; 3]>"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData>>"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData u8>"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData>"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData<()>")]; + return rt.fmtDebugTupleFields(f, "Names", values); +} + +export function default$Default(): Names { + undefined; + undefined; + undefined; + undefined; + undefined; + undefined; + undefined; + undefined; + undefined; + undefined; + return { _0: undefined, _1: undefined, _2: undefined, _3: undefined, _4: undefined, _5: undefined, _6: undefined, _7: undefined, _8: undefined, _9: undefined }; +} + +export function eq$PartialEq(_self: Names, _other: Names): boolean { + if (true) { + if (true) { + if (true) { + if (true) { + if (true) { + if (true) { + if (true) { + if (true) { + if (true) { + return true; + } + } + } + } + } + } + } + } + } + return false; +} + +export function cmp$Ord(_self: Names, _other: Names): rt.Ordering { + const cmp: rt.Ordering = rt.cmpNothing(_self._0, _other._0); + if (cmp === 0) { + const cmp2: rt.Ordering = rt.cmpNothing(_self._1, _other._1); + if (cmp2 === 0) { + const cmp3: rt.Ordering = rt.cmpNothing(_self._2, _other._2); + if (cmp3 === 0) { + const cmp4: rt.Ordering = rt.cmpNothing(_self._3, _other._3); + if (cmp4 === 0) { + const cmp5: rt.Ordering = rt.cmpNothing(_self._4, _other._4); + if (cmp5 === 0) { + const cmp6: rt.Ordering = rt.cmpNothing(_self._5, _other._5); + if (cmp6 === 0) { + const cmp7: rt.Ordering = rt.cmpNothing(_self._6, _other._6); + if (cmp7 === 0) { + const cmp8: rt.Ordering = rt.cmpNothing(_self._7, _other._7); + if (cmp8 === 0) { + const cmp9: rt.Ordering = rt.cmpNothing(_self._8, _other._8); + if (cmp9 === 0) { + return rt.cmpNothing(_self._9, _other._9); + } + return cmp9; + } + return cmp8; + } + return cmp7; + } + return cmp6; + } + return cmp5; + } + return cmp4; + } + return cmp3; + } + return cmp2; + } + return cmp; +} + +export function hash$Hash_DefaultHasher(_self: Names, state: rt.Hasher): void { + rt.hashNothing(_self._0, state); + rt.hashNothing(_self._1, state); + rt.hashNothing(_self._2, state); + rt.hashNothing(_self._3, state); + rt.hashNothing(_self._4, state); + rt.hashNothing(_self._5, state); + rt.hashNothing(_self._6, state); + rt.hashNothing(_self._7, state); + rt.hashNothing(_self._8, state); + rt.hashNothing(_self._9, state); +} + +/** `PhantomData` of several types, whose `Debug` names each. */ +export interface Names { + _0: undefined; + _1: undefined; + _2: undefined; + _3: undefined; + _4: undefined; + _5: undefined; + _6: undefined; + _7: undefined; + _8: undefined; + _9: undefined; +} + +//# sourceMappingURL=zeros.Names.ts.map diff --git a/ts/fixtures/lang/expected/zeros.Rest.ts b/ts/fixtures/lang/expected/zeros.Rest.ts new file mode 100644 index 000000000..96d125d87 --- /dev/null +++ b/ts/fixtures/lang/expected/zeros.Rest.ts @@ -0,0 +1,30 @@ +// Generated by rust2-ts. Do not edit. + +import * as rt from "./rt.ts"; + +export function clone$Clone(self: Rest): Rest { + self._0; + rt.iterEmpty() as rt.Iter; + return { _0: undefined, _1: rt.iterEmpty() as rt.Iter }; +} + +export function fmt$Debug(self: Rest, f: rt.Formatter): rt.Result { + const _3: string = "Rest"; + const _4: rt.Fmt = (f: rt.Formatter) => rt.fmtRangeFull(self._0, f); + const _6: rt.Fmt = (f: rt.Formatter) => rt.fmtWriteStr(f, "Empty"); + return rt.debugTupleFinish(rt.debugTupleField(rt.debugTupleField(rt.fmtDebugTuple(f, _3), _4), _6)); +} + +export function default$Default(): Rest { + undefined; + rt.iterEmpty() as rt.Iter; + return { _0: undefined, _1: rt.iterEmpty() as rt.Iter }; +} + +/** `..` and `Empty`, whose impls are std's own, of what each has. */ +export interface Rest { + _0: undefined; + _1: rt.Iter; +} + +//# sourceMappingURL=zeros.Rest.ts.map diff --git a/ts/fixtures/lang/expected/zeros.Tagged.ts b/ts/fixtures/lang/expected/zeros.Tagged.ts new file mode 100644 index 000000000..a026c5ee6 --- /dev/null +++ b/ts/fixtures/lang/expected/zeros.Tagged.ts @@ -0,0 +1,118 @@ +// Generated by rust2-ts. Do not edit. + +import * as rt from "./rt.ts"; + +export function clone$Clone_String(self: Tagged): Tagged { + const _2: rt.u8 = self.n; + self.of; + self.pin; + return { n: _2, of: undefined, pin: undefined, unit: undefined }; +} + +export function fmt$Debug_String(self: Tagged, f: rt.Formatter): rt.Result { + const _3: string = "Tagged"; + const _4: string = "n"; + const _5: rt.Fmt = (f: rt.Formatter) => rt.u8Debug(self.n, f); + const _7: string = "of"; + const _8: rt.Fmt = (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData"); + const _10: string = "pin"; + const _11: rt.Fmt = (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomPinned"); + const _13: string = "unit"; + const _14: rt.Fmt = (f: rt.Formatter) => rt.fmtUnit(self.unit, f); + return rt.debugStructFinish(rt.debugStructField(rt.debugStructField(rt.debugStructField(rt.debugStructField(rt.fmtDebugStruct(f, _3), _4, _5), _7, _8), _10, _11), _13, _14)); +} + +export function fmt$Debug_u8(self: Tagged, f: rt.Formatter): rt.Result { + const _3: string = "Tagged"; + const _4: string = "n"; + const _5: rt.Fmt = (f: rt.Formatter) => rt.u8Debug(self.n, f); + const _7: string = "of"; + const _8: rt.Fmt = (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData"); + const _10: string = "pin"; + const _11: rt.Fmt = (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomPinned"); + const _13: string = "unit"; + const _14: rt.Fmt = (f: rt.Formatter) => rt.fmtUnit(self.unit, f); + return rt.debugStructFinish(rt.debugStructField(rt.debugStructField(rt.debugStructField(rt.debugStructField(rt.fmtDebugStruct(f, _3), _4, _5), _7, _8), _10, _11), _13, _14)); +} + +export function default$Default_String(): Tagged { + const _1: rt.u8 = 0; + undefined; + undefined; + undefined; + return { n: _1, of: undefined, pin: undefined, unit: undefined }; +} + +export function default$Default_u8(): Tagged { + const _1: rt.u8 = 0; + undefined; + undefined; + undefined; + return { n: _1, of: undefined, pin: undefined, unit: undefined }; +} + +export function eq$PartialEq_String(self: Tagged, other: Tagged): boolean { + if (self.n === other.n) { + if (true) { + if (true) { + return true; + } + } + } + return false; +} + +export function partialCmp$PartialOrd_String(self: Tagged, other: Tagged): rt.Ordering | undefined { + const cmp: rt.Ordering | undefined = rt.cmp(self.n, other.n); + if (cmp !== undefined) { + if (cmp === 0) { + const cmp2: rt.Ordering | undefined = rt.cmpNothing(self.of, other.of); + if (cmp2 !== undefined) { + if (cmp2 === 0) { + const cmp3: rt.Ordering | undefined = rt.cmpNothing(self.pin, other.pin); + if (cmp3 !== undefined) { + if (cmp3 === 0) { + return rt.cmpNothing(self.unit, other.unit); + } + } + return cmp3; + } + } + return cmp2; + } + } + return cmp; +} + +export function cmp$Ord_String(self: Tagged, other: Tagged): rt.Ordering { + const cmp: rt.Ordering = rt.cmp(self.n, other.n); + if (cmp === 0) { + const cmp2: rt.Ordering = rt.cmpNothing(self.of, other.of); + if (cmp2 === 0) { + const cmp3: rt.Ordering = rt.cmpNothing(self.pin, other.pin); + if (cmp3 === 0) { + return rt.cmpNothing(self.unit, other.unit); + } + return cmp3; + } + return cmp2; + } + return cmp; +} + +export function hash$Hash_String_DefaultHasher(self: Tagged, state: rt.Hasher): void { + rt.hash8(self.n, state); + rt.hashNothing(self.of, state); + rt.hashNothing(self.pin, state); + rt.hashNothing(self.unit, state); +} + +/** Each derivable impl, on fields of std's zero-sized types beside one that isn't. */ +export interface Tagged<_T> { + n: rt.u8; + of: undefined; + pin: undefined; + unit: undefined; +} + +//# sourceMappingURL=zeros.Tagged.ts.map diff --git a/ts/fixtures/lang/expected/zeros.ts b/ts/fixtures/lang/expected/zeros.ts index 43580caeb..cdee19253 100644 --- a/ts/fixtures/lang/expected/zeros.ts +++ b/ts/fixtures/lang/expected/zeros.ts @@ -1,12 +1,17 @@ // Generated by rust2-ts. Do not edit. import * as rt from "./rt.ts"; +import { thenSome$1j8foe9 } from "./core/bool.ts"; +import { unwrapOr$0r2bmpr, unwrapOr$1la41a6, unwrapOrDefault$1b97y1a, map$0po44cb, map$1iwwjee } from "./core/option.ts"; import * as Both from "./zeros.Both.ts"; import * as Holds from "./zeros.Holds.ts"; import * as Loud from "./zeros.Loud.ts"; +import * as Names from "./zeros.Names.ts"; import * as One from "./zeros.One.ts"; import * as Pair from "./zeros.Pair.ts"; import * as Quiet from "./zeros.Quiet.ts"; +import * as Rest from "./zeros.Rest.ts"; +import * as Tagged from "./zeros.Tagged.ts"; import * as Unit from "./zeros.Unit.ts"; export const LOG: rt.Atomic = /* @__PURE__ */ new rt.Atomic(0); @@ -178,4 +183,213 @@ export function zeros(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void { } } +/** `DefaultHasher::new`'s hash of `value`. */ +export function hash$Names(value: Names.Names): rt.u64 { + const h: rt.Hasher = rt.hasher(); + Names.hash$Hash_DefaultHasher(value, h); + return rt.hashFinish(h); +} + +/** `DefaultHasher::new`'s hash of `value`. */ +export function hash$PhantomData_u64(value: undefined): rt.u64 { + const h: rt.Hasher = rt.hasher(); + rt.hashNothing(value, h); + return rt.hashFinish(h); +} + +/** `DefaultHasher::new`'s hash of `value`. */ +export function hash$PhantomPinned(value: undefined): rt.u64 { + const h: rt.Hasher = rt.hasher(); + rt.hashNothing(value, h); + return rt.hashFinish(h); +} + +/** `DefaultHasher::new`'s hash of `value`. */ +export function hash$RangeFull(value: undefined): rt.u64 { + const h: rt.Hasher = rt.hasher(); + rt.hashNothing(value, h); + return rt.hashFinish(h); +} + +/** `DefaultHasher::new`'s hash of `value`. */ +export function hash$Tagged_String(value: Tagged.Tagged): rt.u64 { + const h: rt.Hasher = rt.hasher(); + Tagged.hash$Hash_String_DefaultHasher(value, h); + return rt.hashFinish(h); +} + +/** `DefaultHasher::new`'s hash of `value`. */ +export function hash$u8(value: rt.u8): rt.u64 { + const h: rt.Hasher = rt.hasher(); + rt.hash8(value, h); + return rt.hashFinish(h); +} + +/** `DefaultHasher::new`'s hash of `value`. */ +export function hash$unit(value: undefined): rt.u64 { + const h: rt.Hasher = rt.hasher(); + rt.hashNothing(value, h); + return rt.hashFinish(h); +} + +/** [`hash`] of `value`, little-endian. */ +export function digest$Names(value: Names.Names, out: rt.ByteVec): void { + rt.byteVecExtendFromSlice(out, rt.byteSliceFrom(rt.u64ToBeBytes(hash$Names(value)).reverse())); +} + +/** [`hash`] of `value`, little-endian. */ +export function digest$PhantomData_u64(value: undefined, out: rt.ByteVec): void { + rt.byteVecExtendFromSlice(out, rt.byteSliceFrom(rt.u64ToBeBytes(hash$PhantomData_u64(value)).reverse())); +} + +/** [`hash`] of `value`, little-endian. */ +export function digest$PhantomPinned(value: undefined, out: rt.ByteVec): void { + rt.byteVecExtendFromSlice(out, rt.byteSliceFrom(rt.u64ToBeBytes(hash$PhantomPinned(value)).reverse())); +} + +/** [`hash`] of `value`, little-endian. */ +export function digest$RangeFull(value: undefined, out: rt.ByteVec): void { + rt.byteVecExtendFromSlice(out, rt.byteSliceFrom(rt.u64ToBeBytes(hash$RangeFull(value)).reverse())); +} + +/** [`hash`] of `value`, little-endian. */ +export function digest$Tagged_String(value: Tagged.Tagged, out: rt.ByteVec): void { + rt.byteVecExtendFromSlice(out, rt.byteSliceFrom(rt.u64ToBeBytes(hash$Tagged_String(value)).reverse())); +} + +/** [`hash`] of `value`, little-endian. */ +export function digest$u8(value: rt.u8, out: rt.ByteVec): void { + rt.byteVecExtendFromSlice(out, rt.byteSliceFrom(rt.u64ToBeBytes(hash$u8(value)).reverse())); +} + +/** [`hash`] of `value`, little-endian. */ +export function digest$unit(value: undefined, out: rt.ByteVec): void { + rt.byteVecExtendFromSlice(out, rt.byteSliceFrom(rt.u64ToBeBytes(hash$unit(value)).reverse())); +} + +/** The impls `#[derive]` calls on `PhantomData`, `PhantomPinned`, and `()` fields. */ +export function impls(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void { + const tags: Tagged.Tagged[] = rt.iterToArray(rt.iterMap(rt.iterSlice(rt.byteSliceView(data)), (_2: rt.u8): Tagged.Tagged => { + const n: rt.u8 = _2; + Tagged.default$Default_String(); + return { n, of: undefined, pin: undefined, unit: undefined }; + }), undefined, 1, true); + const _7: rt.u8 = rt.u8Rem(kind, 4); + if (_7 === 0) { + const _11: Tagged.Tagged | undefined = rt.sliceFirst(tags); + const t: Tagged.Tagged = unwrapOrDefault$1b97y1a(_11 === undefined ? undefined : Tagged.clone$Clone_String(_11)); + const _15: rt.u8 = t.n; + Tagged.default$Default_u8(); + const copied: Tagged.Tagged = { n: _15, of: undefined, pin: undefined, unit: undefined }; + const again: Tagged.Tagged = copied; + const _27: Names.Names = Names.default$Default(); + const args2: rt.Fmt[] = [(f: rt.Formatter) => Tagged.fmt$Debug_String(t, f), (f: rt.Formatter) => Tagged.fmt$Debug_u8(copied, f), (f: rt.Formatter) => Tagged.fmt$Debug_u8(again, f), (f: rt.Formatter) => Names.fmt$Debug(_27, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", rt.fmtSpec({ alternate: true }, args2[2]), " ", rt.fmtSpec({ alternate: true }, args2[3])])), undefined, true); + const _38: Rest.Rest = Rest.clone$Clone(Rest.default$Default()); + const args4: rt.Fmt[] = [(f: rt.Formatter) => Rest.fmt$Debug(_38, f), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomPinned"), (f: rt.Formatter) => rt.fmtWriteStr(f, "PhantomData")]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", rt.fmtSpec({ alternate: true }, args4[0]), " ", rt.fmtSpec({ align: ">", width: 9 }, args4[1]), "|", rt.fmtSpec({ align: "<", width: 9 }, args4[2]), "|"])), undefined, true); + rt.byteVecPush(out, rt.iterCount(rt.iterEmpty() as rt.Iter) & 0xff); + } else if (_7 === 1) { + const sorted: Tagged.Tagged[] = tags.map(Tagged.clone$Clone_String); + rt.sliceSort(sorted, rt.cmpLt(Tagged.partialCmp$PartialOrd_String)); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(sorted), (t3: Tagged.Tagged): rt.u8 => { + return t3.n; + }), undefined, true); + const iter: rt.Iter[]> = rt.sliceWindows(tags, 2); + while (true) { + const _76: Tagged.Tagged[] | rt.Done = iter.next(); + if (_76 === rt.DONE) { + break; + } + rt.idx(_76, 0); + rt.idx(_76, 1); + const part = _76[0]; + const part2 = _76[1]; + const a: Tagged.Tagged = part; + const b: Tagged.Tagged = part2; + rt.byteVecPush(out, (Tagged.cmp$Ord_String(a, b) & 0xff) | ((((Tagged.eq$PartialEq_String(a, b) ? 1 : 0)) << 2) & 0xff) | ((((Tagged.partialCmp$PartialOrd_String(a, b) === Tagged.cmp$Ord_String(a, b) as rt.Ordering | undefined ? 1 : 0)) << 3) & 0xff)); + rt.byteVecPush(out, Tagged.cmp$Ord_String(a, b) === 0 === rt.u64Eq(hash$Tagged_String(a), hash$Tagged_String(b)) ? 1 : 0); + } + rt.byteVecPush(out, ((true ? 1 : 0)) | ((((true ? 1 : 0)) << 1) & 0xff)); + rt.byteVecPush(out, rt.cmpNothing(undefined, undefined) & 0xff); + rt.byteVecPush(out, rt.cmpNothing(undefined, undefined) & 0xff); + } else if (_7 === 2) { + for (const _150 of tags) { + digest$Tagged_String(_150, out); + digest$u8(_150.n, out); + } + digest$unit(undefined, out); + digest$PhantomData_u64(undefined, out); + digest$PhantomPinned(undefined, out); + digest$RangeFull(undefined, out); + digest$Names(Names.default$Default(), out); + } else { + const _168: Names.Names = Names.clone$Clone(Names.default$Default()); + const _176: Names.Names = Names.default$Default(); + rt.byteVecPush(out, Names.eq$PartialEq(_168, _176) ? 1 : 0); + const _183: Names.Names = Names.default$Default(); + rt.byteVecPush(out, Names.cmp$Ord(_168, _183) === 0 ? 1 : 0); + rt.byteVecPush(out, rt.iterAll(rt.iterSlice(tags), (t2: Tagged.Tagged): boolean => { + return Tagged.eq$PartialEq_String(Tagged.clone$Clone_String(t2), t2); + }) ? 1 : 0); + Rest.default$Default(); + rt.byteVecPush(out, true ? 1 : 0); + } +} + +/** `()` as a hash and B-tree key and as `collect::>`'s item. */ +export function keys(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void { + const _4: rt.u8 = rt.u8Rem(kind, 3); + if (_4 === 0) { + const hash: rt.HashSet = rt.hashNew() as rt.HashSet; + const tree: rt.BTreeSet = rt.btreeNew(rt.cmpNothing) as rt.BTreeSet; + for (const _10 of rt.byteSliceView(data)) { + if (!((_10 & 1) === 0)) { + rt.byteVecPush(out, ((rt.hashDelete(hash, undefined) ? 1 : 0)) | ((((rt.btreeDelete(tree, undefined) ? 1 : 0)) << 1) & 0xff)); + } else { + rt.byteVecPush(out, ((rt.hashAdd(hash, undefined) ? 1 : 0)) | ((((rt.btreeAdd(tree, undefined) ? 1 : 0)) << 1) & 0xff)); + } + rt.byteVecPush(out, (rt.hashLen(hash) & 0xff) | (((rt.btreeLen(tree) & 0xff) << 4) & 0xff)); + } + rt.byteVecPush(out, ((rt.hashContains(hash, undefined) ? 1 : 0)) | ((((rt.btreeContains(tree, undefined) ? 1 : 0)) << 1) & 0xff)); + rt.byteVecPush(out, rt.btreeFirstKey(tree, false, rt.None) === rt.btreeFirstKey(tree, true, rt.None) ? 1 : 0); + } else if (_4 === 1) { + const map: rt.HashMap = rt.hashNew() as rt.HashMap; + const tree2: rt.BTreeMap = rt.btreeNew(rt.cmpNothing) as rt.BTreeMap; + for (const b2 of rt.byteSliceView(data)) { + if (!((b2 & 3) === 3)) { + rt.iterExtendBytes(out, rt.iterSlice(unwrapOr$1la41a6(map$1iwwjee(rt.hashInsert(map, undefined, b2), (v4: rt.u8): Uint8Array => { + return Uint8Array.of(1, v4); + }), Uint8Array.of(0, 0))), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(unwrapOr$1la41a6(map$1iwwjee(rt.btreeInsert(tree2, undefined, b2), (v5: rt.u8): Uint8Array => { + return Uint8Array.of(1, v5); + }), Uint8Array.of(0, 0))), undefined, true); + } else { + rt.iterExtendBytes(out, rt.iterSlice(unwrapOr$1la41a6(map$1iwwjee(rt.hashRemove(map, undefined), (v2: rt.u8): Uint8Array => { + return Uint8Array.of(1, v2); + }), Uint8Array.of(0, 0))), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(unwrapOr$1la41a6(map$1iwwjee(rt.btreeRemove(tree2, undefined), (v3: rt.u8): Uint8Array => { + return Uint8Array.of(1, v3); + }), Uint8Array.of(0, 0))), undefined, true); + } + rt.byteVecPush(out, (rt.hashLen(map) & 0xff) | (((rt.btreeLen(tree2) & 0xff) << 4) & 0xff)); + rt.byteVecPush(out, unwrapOr$0r2bmpr(rt.hashGet(map, undefined), 0)); + } + } else { + rt.iterExtendBytes(out, rt.iterSlice(unwrapOr$1la41a6(map$0po44cb(rt.iterCollectOption(rt.iterMap(rt.iterSlice(rt.byteSliceView(data)), (_2: rt.u8): undefined | rt.None => { + return thenSome$1j8foe9(_2 !== 0, undefined); + }), (values: rt.Iter) => rt.iterToArray(values, undefined, 0), undefined, rt.None), (v: undefined[]): Uint8Array => { + return Uint8Array.of(1, v.length & 0xff); + }), Uint8Array.of(0, 0))), undefined, true); + rt.byteVecPush(out, rt.iterCollectOption(rt.iterInspect(rt.iterMap(rt.iterSlice(rt.byteSliceView(data)), (_24: rt.u8): undefined | rt.None => { + return thenSome$1j8foe9(_24 !== 0, undefined); + }), (_27: undefined | rt.None): undefined => { + rt.byteVecPush(out, 9); + }), (values: rt.Iter) => rt.iterToArray(values, "next", 0), undefined, rt.None) !== undefined ? 1 : 0); + rt.byteVecPush(out, rt.iterCollectOption(rt.iterMap(rt.iterSlice(rt.byteSliceView(data)), (_210: rt.u8): undefined | rt.None => { + return thenSome$1j8foe9(_210 < 128, undefined); + }), (values: rt.Iter) => rt.iterForEach(values, () => undefined), undefined, rt.None, rt.None) !== rt.None ? 1 : 0); + } +} + //# sourceMappingURL=zeros.ts.map diff --git a/ts/fixtures/lang/src/harness.rs b/ts/fixtures/lang/src/harness.rs index 92a1764db..b2297f41a 100644 --- a/ts/fixtures/lang/src/harness.rs +++ b/ts/fixtures/lang/src/harness.rs @@ -171,6 +171,8 @@ fn cases() -> Vec<(&'static str, Case)> { ("arrays::lent", |_, data, out| arrays::lent(data, out)), ("floats::mul_adds", floats::mul_adds), ("singles::mul_adds", singles::mul_adds), + ("zeros::impls", zeros::impls), + ("zeros::keys", zeros::keys), ] } diff --git a/ts/fixtures/lang/src/lib.rs b/ts/fixtures/lang/src/lib.rs index d20030584..625f14829 100644 --- a/ts/fixtures/lang/src/lib.rs +++ b/ts/fixtures/lang/src/lib.rs @@ -16,7 +16,7 @@ //! the crate's own `RangeBounds`, the equality of `Result`s and std's errors, inclusive //! ranges read through each adaptor, iterators' size hints, the capacity overflows //! collections reserving by them panic with, and zero-sized values, which MIR never -//! assigns. +//! assigns, with std's impls of them. //! //! `harness::run` is the entry point both sides of the differential test run, and //! `fmt::Fault` an error only `caller.ts` prints. diff --git a/ts/fixtures/lang/src/zeros.rs b/ts/fixtures/lang/src/zeros.rs index 8934b8100..fbf031fcd 100644 --- a/ts/fixtures/lang/src/zeros.rs +++ b/ts/fixtures/lang/src/zeros.rs @@ -1,9 +1,14 @@ //! Zero-sized values, which MIR never assigns and reads as constants: unit structs, empty //! arrays and arrays of zero-sized elements, structs of zero-sized fields, enums of one //! variant, `PhantomData`, closures that capture nothing, and std's iterators made of -//! them, as results, as values, in collections, and as they drop. +//! them, as results, as values, in collections, and as they drop; and std's impls of its +//! own, as `#[derive]` calls them on a field, and of `()` as a key and a collected item. -use std::marker::PhantomData; +use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; +use std::hash::{DefaultHasher, Hash, Hasher}; +use std::iter::Empty; +use std::marker::{PhantomData, PhantomPinned}; +use std::ops::RangeFull; use std::sync::atomic::{AtomicU32, Ordering::Relaxed}; #[derive(Clone, Copy, Debug, Default, PartialEq)] @@ -186,3 +191,149 @@ pub fn zeros(kind: u8, data: &[u8], out: &mut Vec) { } } } + +/// Each derivable impl, on fields of std's zero-sized types beside one that isn't. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] +struct Tagged { + n: u8, + of: PhantomData, + pin: PhantomPinned, + unit: (), +} + +/// `PhantomData` of several types, whose `Debug` names each. +#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] +struct Names( + PhantomData, + PhantomData, + PhantomData<(i64, bool)>, + PhantomData<&'static str>, + PhantomData<[u16; 3]>, + PhantomData>>, + PhantomData u8>, + PhantomData, + PhantomData>, + PhantomData<()>, +); + +/// `..` and `Empty`, whose impls are std's own, of what each has. +#[derive(Clone, Debug, Default)] +struct Rest(RangeFull, Empty); + +/// `DefaultHasher::new`'s hash of `value`. +fn hash(value: &T) -> u64 { + let mut h = DefaultHasher::new(); + value.hash(&mut h); + h.finish() +} + +/// [`hash`] of `value`, little-endian. +fn digest(value: &T, out: &mut Vec) { + out.extend_from_slice(&hash(value).to_le_bytes()); +} + +/// The impls `#[derive]` calls on `PhantomData`, `PhantomPinned`, and `()` fields. +pub fn impls(kind: u8, data: &[u8], out: &mut Vec) { + let tags: Vec> = data + .iter() + .map(|&n| Tagged { + n, + ..Default::default() + }) + .collect(); + match kind % 4 { + 0 => { + let t = tags.first().cloned().unwrap_or_default(); + let copied = Tagged:: { + n: t.n, + ..Default::default() + }; + let again = copied; + out.extend(format!("{t:?} {copied:?} {again:#?} {:#?}", Names::default()).bytes()); + let rest = Rest::default().clone(); + out.extend(format!("{rest:?} {rest:#?} {:>9?}|{:<9?}|", PhantomPinned, PhantomData::).bytes()); + out.push(rest.1.count() as u8); + } + // Order, beside the hashes it must agree with. + 1 => { + let mut sorted = tags.clone(); + sorted.sort(); + out.extend(sorted.iter().map(|t| t.n)); + // Equal by `Ord` exactly when equal by `PartialEq` and by hash. + for pair in tags.windows(2) { + let (a, b) = (&pair[0], &pair[1]); + out.push(a.cmp(b) as u8 | u8::from(a == b) << 2 | u8::from(a.partial_cmp(b) == Some(a.cmp(b))) << 3); + out.push(u8::from(a.cmp(b).is_eq() == (hash(a) == hash(b)))); + } + out.push(u8::from(PhantomData:: == PhantomData) | u8::from(PhantomPinned == PhantomPinned) << 1); + out.push(PhantomData::.cmp(&PhantomData) as u8); + out.push(().cmp(&()) as u8); + } + 2 => { + for t in &tags { + digest(t, out); + digest(&t.n, out); + } + digest(&(), out); + digest(&PhantomData::, out); + digest(&PhantomPinned, out); + digest(&.., out); + digest(&Names::default(), out); + } + _ => { + let names = Names::default().clone(); + out.push(u8::from(names == Names::default())); + out.push(u8::from(names.cmp(&Names::default()).is_eq())); + out.push(u8::from(tags.iter().all(|t| t.clone() == *t))); + out.push(u8::from(Rest::default().0 == ..)); + } + } +} + +/// `()` as a hash and B-tree key and as `collect::>`'s item. +pub fn keys(kind: u8, data: &[u8], out: &mut Vec) { + match kind % 3 { + 0 => { + let mut hash = HashSet::new(); + let mut tree = BTreeSet::new(); + for &b in data { + if b & 1 == 0 { + out.push(u8::from(hash.insert(())) | u8::from(tree.insert(())) << 1); + } else { + out.push(u8::from(hash.remove(&())) | u8::from(tree.remove(&())) << 1); + } + out.push(hash.len() as u8 | (tree.len() as u8) << 4); + } + out.push(u8::from(hash.contains(&())) | u8::from(tree.contains(&())) << 1); + out.push(u8::from(tree.first() == tree.last())); + } + 1 => { + let mut map = HashMap::new(); + let mut tree = BTreeMap::new(); + for &b in data { + if b & 3 == 3 { + out.extend(map.remove(&()).map(|v: u8| [1, v]).unwrap_or([0, 0])); + out.extend(tree.remove(&()).map(|v: u8| [1, v]).unwrap_or([0, 0])); + } else { + out.extend(map.insert((), b).map(|v| [1, v]).unwrap_or([0, 0])); + out.extend(tree.insert((), b).map(|v| [1, v]).unwrap_or([0, 0])); + } + out.push(map.len() as u8 | (tree.len() as u8) << 4); + out.push(map.get(&()).copied().unwrap_or(0)); + } + } + // `None` midway stops the collection there. + _ => { + let units: Option> = data.iter().map(|&b| (b != 0).then_some(())).collect(); + out.extend(units.map(|v| [1, v.len() as u8]).unwrap_or([0, 0])); + let count = data + .iter() + .map(|&b| (b != 0).then_some(())) + .inspect(|_| out.push(9)) + .collect::>>(); + out.push(u8::from(count.is_some())); + let all: Option<()> = data.iter().map(|&b| (b < 0x80).then_some(())).collect(); + out.push(u8::from(all.is_some())); + } + } +} diff --git a/ts/fixtures/reject/census.md b/ts/fixtures/reject/census.md index 4bb6a9f3f..d5733142a 100644 --- a/ts/fixtures/reject/census.md +++ b/ts/fixtures/reject/census.md @@ -1,77 +1,76 @@ # Census of `reject-fixture` -- Refusals: 126 -- Function instances: 152 +- Refusals: 125 +- Function instances: 150 - Generic functions no instance reached, lowered over their type parameters: 10 ## By construct | Count | Construct | First | | ---: | --- | --- | -| 17 | unsupported call to `_` | fixtures/reject/src/lib.rs:138:11 | -| 12 | a raw pointer to `_` in `_`, which the crate may put another object in place of | fixtures/reject/src/lib.rs:658:10 | -| 8 | a raw pointer to `_` in a variable assigned again while it may point there | fixtures/reject/src/lib.rs:666:10 | -| 5 | passing `_`, which drops, to `_`, which is not supported yet | fixtures/reject/src/lib.rs:374:4 | -| 4 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | fixtures/reject/src/lib.rs:244:16 | -| 4 | a variant of `_`, which is not supported: either is the same JS string | fixtures/reject/src/lib.rs:379:2 | -| 3 | a copy of a closure that changes what it captured | fixtures/reject/src/lib.rs:254:14 | -| 3 | an assignment through a reference to `_` | fixtures/reject/src/lib.rs:104:2 | -| 3 | replacing the value behind a reference to `_` | fixtures/reject/src/lib.rs:112:2 | +| 17 | unsupported call to `_` | fixtures/reject/src/lib.rs:133:11 | +| 12 | a raw pointer to `_` in `_`, which the crate may put another object in place of | fixtures/reject/src/lib.rs:653:10 | +| 8 | a raw pointer to `_` in a variable assigned again while it may point there | fixtures/reject/src/lib.rs:661:10 | +| 5 | passing `_`, which drops, to `_`, which is not supported yet | fixtures/reject/src/lib.rs:369:4 | +| 4 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | fixtures/reject/src/lib.rs:239:16 | +| 4 | a variant of `_`, which is not supported: either is the same JS string | fixtures/reject/src/lib.rs:374:2 | +| 3 | a copy of a closure that changes what it captured | fixtures/reject/src/lib.rs:249:14 | +| 3 | an assignment through a reference to `_` | fixtures/reject/src/lib.rs:99:2 | +| 3 | replacing the value behind a reference to `_` | fixtures/reject/src/lib.rs:107:2 | | 3 | unsupported type `_` | fixtures/reject/src/lib.rs:7:14 | | 2 | `_` is not supported: its `None` and `Some` would both be `rt.None` | fixtures/reject/src/lib.rs:16:15 | -| 2 | `_` of `_`, whose `None` is `rt.None`, which is not supported yet | fixtures/reject/src/lib.rs:42:4 | +| 2 | `_` of `_`, whose `None` is `rt.None`, which is not supported yet | fixtures/reject/src/lib.rs:37:4 | | 2 | `_` of `_`, whose `clone_from` is its own, which is not supported yet | fixtures/reject/src/lib.rs:21:4 | | 2 | `_`, a trait object of another crate's trait, which is not supported yet | fixtures/reject/src/lib.rs:11:16 | -| 2 | `_`, a trait object of the generic trait `_`, which is not supported yet | fixtures/reject/src/lib.rs:507:23 | -| 2 | a coercion to `_`, which is not supported yet | fixtures/reject/src/lib.rs:498:40 | -| 2 | an iterator of the crate implementing `_`, which is not supported yet | fixtures/reject/src/lib.rs:171:1 | -| 2 | overriding `_`, which std's adaptors call in place of `next` or beside it | fixtures/reject/src/lib.rs:151:2 | -| 2 | passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet | fixtures/reject/src/lib.rs:366:13 | -| 2 | unsupported type `_` from another crate | fixtures/reject/src/lib.rs:481:32 | -| 1 | `Buf::copy_to_bytes` of `_`, a value JS copies, which is not supported | fixtures/reject/src/lib.rs:811:2 | -| 1 | `BufMut::put` of `_` into a `BytesMut`, which picks the methods it calls by a capacity that depends on whether the other handles of its storage dropped, which is not supported | fixtures/reject/src/lib.rs:437:2 | -| 1 | `Bytes::from_owner` of `_`, which would drop with the last clone of what it makes, which is not supported | fixtures/reject/src/lib.rs:422:2 | -| 1 | `Pointer` formatting, as in `{:p}`, is not supported | fixtures/reject/src/lib.rs:70:2 | -| 1 | `_` is not supported yet | fixtures/reject/src/lib.rs:390:18 | -| 1 | `_` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` | fixtures/reject/src/lib.rs:93:20 | +| 2 | `_`, a trait object of the generic trait `_`, which is not supported yet | fixtures/reject/src/lib.rs:502:23 | +| 2 | a coercion to `_`, which is not supported yet | fixtures/reject/src/lib.rs:493:40 | +| 2 | an iterator of the crate implementing `_`, which is not supported yet | fixtures/reject/src/lib.rs:166:1 | +| 2 | overriding `_`, which std's adaptors call in place of `next` or beside it | fixtures/reject/src/lib.rs:146:2 | +| 2 | passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet | fixtures/reject/src/lib.rs:361:13 | +| 2 | unsupported type `_` from another crate | fixtures/reject/src/lib.rs:476:32 | +| 1 | `Buf::copy_to_bytes` of `_`, a value JS copies, which is not supported | fixtures/reject/src/lib.rs:806:2 | +| 1 | `BufMut::put` of `_` into a `BytesMut`, which picks the methods it calls by a capacity that depends on whether the other handles of its storage dropped, which is not supported | fixtures/reject/src/lib.rs:432:2 | +| 1 | `Bytes::from_owner` of `_`, which would drop with the last clone of what it makes, which is not supported | fixtures/reject/src/lib.rs:417:2 | +| 1 | `Pointer` formatting, as in `{:p}`, is not supported | fixtures/reject/src/lib.rs:65:2 | +| 1 | `_` is not supported yet | fixtures/reject/src/lib.rs:385:18 | +| 1 | `_` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` | fixtures/reject/src/lib.rs:88:20 | | 1 | `_` is not supported: its field `_` is `_`, typed `_`, whose `None` would be `rt.None` as `_` | fixtures/reject/src/lib.rs:31:2 | -| 1 | `_` is not supported: its field `_` is `_`, typed `_`, whose `Pending` would be `rt.OuterPending` as `_` | fixtures/reject/src/lib.rs:545:2 | -| 1 | `_` of `_` by `_`, which is not supported yet | fixtures/reject/src/lib.rs:283:6 | -| 1 | `_` of `_`, which drops `_`, which is not supported yet | fixtures/reject/src/lib.rs:55:13 | -| 1 | `_` of `_`, which is not supported yet | fixtures/reject/src/lib.rs:588:4 | -| 1 | `_` through a held type's own, which is not supported yet | fixtures/reject/src/lib.rs:315:2 | -| 1 | `_` with a mutable reference to a value JS copies, which its mapping would copy | fixtures/reject/src/lib.rs:564:12 | -| 1 | `_`, which is not supported yet | fixtures/reject/src/lib.rs:291:9 | -| 1 | `_`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported | fixtures/reject/src/lib.rs:431:6 | -| 1 | `fmt::Arguments` with a placeholder, or not made in place, written to `_`'s own `fmt::Write`, which is not supported yet: std splits what a placeholder writes into `write_str` calls the runtime does not make | fixtures/reject/src/lib.rs:76:10 | -| 1 | a `zip` of `_` and `_`, which std reads by index, of items that drop, which is not supported yet | fixtures/reject/src/lib.rs:233:30 | -| 1 | a `zip` of `_`, whose closures std calls one item further through `next` than through `fold` | fixtures/reject/src/lib.rs:184:51 | -| 1 | a cast from `_` to `_` | fixtures/reject/src/lib.rs:89:2 | -| 1 | a cast from a pointer to `_` to one to `_`, which reads the bytes of one type as another | fixtures/reject/src/lib.rs:605:27 | -| 1 | a coercion to `_` | fixtures/reject/src/lib.rs:338:2 | -| 1 | a constant of type `_`, a pointer into memory translation can't name | fixtures/reject/src/lib.rs:828:3 | -| 1 | a dangling pointer to `_`, a value of no bytes made of more than structs and tuples | fixtures/reject/src/lib.rs:787:11 | -| 1 | a future of `_`, which can be `rt.Pending`, as the future's own `Pending` is | fixtures/reject/src/lib.rs:98:34 | -| 1 | a mutable reference into a `Result`'s payload, passed on or kept | fixtures/reject/src/lib.rs:410:12 | -| 1 | a mutable static, which any code may write | fixtures/reject/src/lib.rs:82:11 | -| 1 | a pointer's address, which JS has no counterpart of | fixtures/reject/src/lib.rs:610:17 | -| 1 | a printable type must implement `Display` or `Debug` | fixtures/reject/src/lib.rs:85:1 | -| 1 | a raw pointer to `_` behind a reference, which is the object and not where it is kept | fixtures/reject/src/lib.rs:627:10 | -| 1 | a raw pointer to `_` in an element, a payload, or a union field, which is not supported yet | fixtures/reject/src/lib.rs:729:10 | +| 1 | `_` is not supported: its field `_` is `_`, typed `_`, whose `Pending` would be `rt.OuterPending` as `_` | fixtures/reject/src/lib.rs:540:2 | +| 1 | `_` of `_` by `_`, which is not supported yet | fixtures/reject/src/lib.rs:278:6 | +| 1 | `_` of `_`, which drops `_`, which is not supported yet | fixtures/reject/src/lib.rs:50:13 | +| 1 | `_` of `_`, which is not supported yet | fixtures/reject/src/lib.rs:583:4 | +| 1 | `_` through a held type's own, which is not supported yet | fixtures/reject/src/lib.rs:310:2 | +| 1 | `_` with a mutable reference to a value JS copies, which its mapping would copy | fixtures/reject/src/lib.rs:559:12 | +| 1 | `_`, which is not supported yet | fixtures/reject/src/lib.rs:286:9 | +| 1 | `_`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported | fixtures/reject/src/lib.rs:426:6 | +| 1 | `fmt::Arguments` with a placeholder, or not made in place, written to `_`'s own `fmt::Write`, which is not supported yet: std splits what a placeholder writes into `write_str` calls the runtime does not make | fixtures/reject/src/lib.rs:71:10 | +| 1 | a `zip` of `_` and `_`, which std reads by index, of items that drop, which is not supported yet | fixtures/reject/src/lib.rs:228:30 | +| 1 | a `zip` of `_`, whose closures std calls one item further through `next` than through `fold` | fixtures/reject/src/lib.rs:179:51 | +| 1 | a cast from `_` to `_` | fixtures/reject/src/lib.rs:84:2 | +| 1 | a cast from a pointer to `_` to one to `_`, which reads the bytes of one type as another | fixtures/reject/src/lib.rs:600:27 | +| 1 | a coercion to `_` | fixtures/reject/src/lib.rs:333:2 | +| 1 | a constant of type `_`, a pointer into memory translation can't name | fixtures/reject/src/lib.rs:823:3 | +| 1 | a dangling pointer to `_`, a value of no bytes made of more than structs and tuples | fixtures/reject/src/lib.rs:782:11 | +| 1 | a future of `_`, which can be `rt.Pending`, as the future's own `Pending` is | fixtures/reject/src/lib.rs:93:34 | +| 1 | a mutable reference into a `Result`'s payload, passed on or kept | fixtures/reject/src/lib.rs:405:12 | +| 1 | a mutable static, which any code may write | fixtures/reject/src/lib.rs:77:11 | +| 1 | a pointer's address, which JS has no counterpart of | fixtures/reject/src/lib.rs:605:17 | +| 1 | a printable type must implement `Display` or `Debug` | fixtures/reject/src/lib.rs:80:1 | +| 1 | a raw pointer to `_` behind a reference, which is the object and not where it is kept | fixtures/reject/src/lib.rs:622:10 | +| 1 | a raw pointer to `_` in an element, a payload, or a union field, which is not supported yet | fixtures/reject/src/lib.rs:724:10 | | 1 | a scalar constant of type `_` | fixtures/reject/src/lib.rs:8:2 | -| 1 | a trait object of `_`, which is not supported yet | fixtures/reject/src/lib.rs:524:26 | -| 1 | a zero-sized constant of type `_` | fixtures/reject/src/lib.rs:64:2 | -| 1 | an upcast from `_` to `_`, which is not supported yet | fixtures/reject/src/lib.rs:582:32 | +| 1 | a trait object of `_`, which is not supported yet | fixtures/reject/src/lib.rs:519:26 | +| 1 | a zero-sized constant of type `_` | fixtures/reject/src/lib.rs:59:2 | +| 1 | an upcast from `_` to `_`, which is not supported yet | fixtures/reject/src/lib.rs:577:32 | | 1 | arithmetic on `_` | fixtures/reject/src/lib.rs:8:2 | -| 1 | collecting `_`, whose `None` is `rt.None`, which is not supported yet | fixtures/reject/src/lib.rs:36:43 | -| 1 | comparing `_` as a key, which is not supported yet | fixtures/reject/src/lib.rs:265:75 | -| 1 | comparing pointers to `()`, which has no bytes and so no address of its own | fixtures/reject/src/lib.rs:778:2 | -| 1 | comparing pointers to `_` in an atomic, which JS has no address of | fixtures/reject/src/lib.rs:827:15 | -| 1 | comparing pointers to `_`, each a place JS makes of its own | fixtures/reject/src/lib.rs:646:2 | -| 1 | constructing `_` | fixtures/reject/src/lib.rs:397:53 | -| 1 | hashing `_` as a key, which is not supported yet | fixtures/reject/src/lib.rs:265:75 | -| 1 | hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet | fixtures/reject/src/lib.rs:357:16 | -| 1 | union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart | fixtures/reject/src/lib.rs:632:1 | +| 1 | comparing `_` as a key, which is not supported yet | fixtures/reject/src/lib.rs:260:75 | +| 1 | comparing pointers to `()`, which has no bytes and so no address of its own | fixtures/reject/src/lib.rs:773:2 | +| 1 | comparing pointers to `_` in an atomic, which JS has no address of | fixtures/reject/src/lib.rs:822:15 | +| 1 | comparing pointers to `_`, each a place JS makes of its own | fixtures/reject/src/lib.rs:641:2 | +| 1 | constructing `_` | fixtures/reject/src/lib.rs:392:53 | +| 1 | hashing `_` as a key, which is not supported yet | fixtures/reject/src/lib.rs:260:75 | +| 1 | hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet | fixtures/reject/src/lib.rs:352:16 | +| 1 | union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart | fixtures/reject/src/lib.rs:627:1 | ## By API @@ -79,292 +78,291 @@ The type or module each refused type or path belongs to. | Count | API | First | | ---: | --- | --- | -| 16 | `(u32, u32)` | fixtures/reject/src/lib.rs:658:10 | -| 7 | `std::borrow::Cow` | fixtures/reject/src/lib.rs:379:2 | -| 6 | `Option` | fixtures/reject/src/lib.rs:16:15 | +| 16 | `(u32, u32)` | fixtures/reject/src/lib.rs:653:10 | +| 7 | `std::borrow::Cow` | fixtures/reject/src/lib.rs:374:2 | | 6 | `f16` | fixtures/reject/src/lib.rs:7:14 | -| 5 | `Gap` | fixtures/reject/src/lib.rs:1008:10 | -| 5 | `Iterator` | fixtures/reject/src/lib.rs:42:4 | -| 5 | `u32` | fixtures/reject/src/lib.rs:605:27 | -| 4 | `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:737:15 | -| 4 | `std::pin::Pin` | fixtures/reject/src/lib.rs:112:2 | -| 4 | `std::vec::Vec` | fixtures/reject/src/lib.rs:357:16 | -| 4 | `{closure}` | fixtures/reject/src/lib.rs:366:13 | -| 3 | `Spent` | fixtures/reject/src/lib.rs:853:4 | -| 3 | `std::collections::HashMap` | fixtures/reject/src/lib.rs:55:13 | -| 3 | `std::sync::Arc` | fixtures/reject/src/lib.rs:315:2 | -| 3 | `u8` | fixtures/reject/src/lib.rs:283:6 | -| 2 | `Poll` | fixtures/reject/src/lib.rs:93:20 | +| 5 | `Gap` | fixtures/reject/src/lib.rs:1003:10 | +| 5 | `Iterator` | fixtures/reject/src/lib.rs:37:4 | +| 5 | `Option` | fixtures/reject/src/lib.rs:16:15 | +| 5 | `u32` | fixtures/reject/src/lib.rs:600:27 | +| 4 | `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:732:15 | +| 4 | `std::pin::Pin` | fixtures/reject/src/lib.rs:107:2 | +| 4 | `std::vec::Vec` | fixtures/reject/src/lib.rs:352:16 | +| 4 | `{closure}` | fixtures/reject/src/lib.rs:361:13 | +| 3 | `Spent` | fixtures/reject/src/lib.rs:848:4 | +| 3 | `std::collections::HashMap` | fixtures/reject/src/lib.rs:50:13 | +| 3 | `std::sync::Arc` | fixtures/reject/src/lib.rs:310:2 | +| 3 | `u8` | fixtures/reject/src/lib.rs:278:6 | +| 2 | `Poll` | fixtures/reject/src/lib.rs:88:20 | | 2 | `Reused` | fixtures/reject/src/lib.rs:21:4 | -| 2 | `Scaled` | fixtures/reject/src/lib.rs:507:23 | -| 2 | `dyn Scaled` | fixtures/reject/src/lib.rs:507:23 | -| 2 | `dyn std::any::Any` | fixtures/reject/src/lib.rs:582:32 | +| 2 | `Scaled` | fixtures/reject/src/lib.rs:502:23 | +| 2 | `dyn Scaled` | fixtures/reject/src/lib.rs:502:23 | +| 2 | `dyn std::any::Any` | fixtures/reject/src/lib.rs:577:32 | | 2 | `dyn std::iter::Iterator` | fixtures/reject/src/lib.rs:11:16 | | 2 | `slice` | fixtures/reject/src/lib.rs:21:4 | -| 2 | `std::any::TypeId` | fixtures/reject/src/lib.rs:588:2 | -| 2 | `std::collections::BTreeSet` | fixtures/reject/src/lib.rs:265:75 | -| 2 | `std::iter::Iterator` | fixtures/reject/src/lib.rs:244:16 | -| 2 | `std::mem::MaybeUninit` | fixtures/reject/src/lib.rs:1022:19 | -| 2 | `std::ops::Range` | fixtures/reject/src/lib.rs:192:8 | -| 2 | `std::std` | fixtures/reject/src/lib.rs:617:11 | -| 2 | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:104:2 | -| 2 | `std::vec::IntoIter` | fixtures/reject/src/lib.rs:477:17 | -| 1 | `BTreeMap` | fixtures/reject/src/lib.rs:853:56 | -| 1 | `Batched` | fixtures/reject/src/lib.rs:357:16 | -| 1 | `Bits` | fixtures/reject/src/lib.rs:632:1 | -| 1 | `Blank` | fixtures/reject/src/lib.rs:811:2 | -| 1 | `BytesMut` | fixtures/reject/src/lib.rs:431:6 | -| 1 | `Counted` | fixtures/reject/src/lib.rs:437:2 | -| 1 | `DoubleEndedIterator` | fixtures/reject/src/lib.rs:171:1 | -| 1 | `Entry` | fixtures/reject/src/lib.rs:366:13 | -| 1 | `FusedIterator` | fixtures/reject/src/lib.rs:225:1 | -| 1 | `HashMap` | fixtures/reject/src/lib.rs:283:6 | -| 1 | `Hasher` | fixtures/reject/src/lib.rs:291:9 | -| 1 | `Hits` | fixtures/reject/src/lib.rs:770:21 | -| 1 | `Lane` | fixtures/reject/src/lib.rs:972:19 | +| 2 | `std::any::TypeId` | fixtures/reject/src/lib.rs:583:2 | +| 2 | `std::collections::BTreeSet` | fixtures/reject/src/lib.rs:260:75 | +| 2 | `std::iter::Iterator` | fixtures/reject/src/lib.rs:239:16 | +| 2 | `std::mem::MaybeUninit` | fixtures/reject/src/lib.rs:1017:19 | +| 2 | `std::ops::Range` | fixtures/reject/src/lib.rs:187:8 | +| 2 | `std::std` | fixtures/reject/src/lib.rs:612:11 | +| 2 | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:99:2 | +| 2 | `std::vec::IntoIter` | fixtures/reject/src/lib.rs:472:17 | +| 1 | `BTreeMap` | fixtures/reject/src/lib.rs:848:56 | +| 1 | `Batched` | fixtures/reject/src/lib.rs:352:16 | +| 1 | `Bits` | fixtures/reject/src/lib.rs:627:1 | +| 1 | `Blank` | fixtures/reject/src/lib.rs:806:2 | +| 1 | `BytesMut` | fixtures/reject/src/lib.rs:426:6 | +| 1 | `Counted` | fixtures/reject/src/lib.rs:432:2 | +| 1 | `DoubleEndedIterator` | fixtures/reject/src/lib.rs:166:1 | +| 1 | `Entry` | fixtures/reject/src/lib.rs:361:13 | +| 1 | `FusedIterator` | fixtures/reject/src/lib.rs:220:1 | +| 1 | `HashMap` | fixtures/reject/src/lib.rs:278:6 | +| 1 | `Hasher` | fixtures/reject/src/lib.rs:286:9 | +| 1 | `Hits` | fixtures/reject/src/lib.rs:765:21 | +| 1 | `Lane` | fixtures/reject/src/lib.rs:967:19 | | 1 | `Maybe` | fixtures/reject/src/lib.rs:31:2 | -| 1 | `Noisy` | fixtures/reject/src/lib.rs:55:13 | -| 1 | `Only` | fixtures/reject/src/lib.rs:787:11 | -| 1 | `Plain` | fixtures/reject/src/lib.rs:926:10 | -| 1 | `Sink` | fixtures/reject/src/lib.rs:76:10 | -| 1 | `Span2` | fixtures/reject/src/lib.rs:658:10 | -| 1 | `String` | fixtures/reject/src/lib.rs:859:4 | +| 1 | `Noisy` | fixtures/reject/src/lib.rs:50:13 | +| 1 | `Only` | fixtures/reject/src/lib.rs:782:11 | +| 1 | `Plain` | fixtures/reject/src/lib.rs:921:10 | +| 1 | `Sink` | fixtures/reject/src/lib.rs:71:10 | +| 1 | `Span2` | fixtures/reject/src/lib.rs:653:10 | +| 1 | `String` | fixtures/reject/src/lib.rs:854:4 | | 1 | `T \| undefined` | fixtures/reject/src/lib.rs:31:2 | -| 1 | `Tail` | fixtures/reject/src/lib.rs:534:30 | -| 1 | `Track` | fixtures/reject/src/lib.rs:952:19 | -| 1 | `VecDeque` | fixtures/reject/src/lib.rs:853:29 | -| 1 | `Vec` | fixtures/reject/src/lib.rs:853:4 | -| 1 | `Waiting` | fixtures/reject/src/lib.rs:545:2 | -| 1 | `Window` | fixtures/reject/src/lib.rs:719:2 | -| 1 | `[u8; 4]` | fixtures/reject/src/lib.rs:524:26 | -| 1 | `dyn Keyed` | fixtures/reject/src/lib.rs:582:32 | -| 1 | `into_keys` | fixtures/reject/src/lib.rs:55:13 | -| 1 | `poll` | fixtures/reject/src/lib.rs:545:2 | -| 1 | `rt.Poll` | fixtures/reject/src/lib.rs:545:2 | -| 1 | `std::any::Any` | fixtures/reject/src/lib.rs:588:4 | -| 1 | `std::collections::VecDeque` | fixtures/reject/src/lib.rs:896:27 | -| 1 | `std::iter::Chain` | fixtures/reject/src/lib.rs:184:51 | -| 1 | `std::iter::Extend` | fixtures/reject/src/lib.rs:1030:6 | -| 1 | `std::iter::Map` | fixtures/reject/src/lib.rs:233:30 | -| 1 | `std::net::AddrParseError` | fixtures/reject/src/lib.rs:481:32 | -| 1 | `std::net::Ipv4Addr` | fixtures/reject/src/lib.rs:481:32 | -| 1 | `std::option::Option` | fixtures/reject/src/lib.rs:417:2 | -| 1 | `std::slice::IterMut` | fixtures/reject/src/lib.rs:816:15 | -| 1 | `std::slice::Iter` | fixtures/reject/src/lib.rs:138:11 | -| 1 | `std::std::Layout` | fixtures/reject/src/lib.rs:615:15 | -| 1 | `std::str` | fixtures/reject/src/lib.rs:482:4 | -| 1 | `std::sync::Mutex` | fixtures/reject/src/lib.rs:564:12 | -| 1 | `std::sync::Weak` | fixtures/reject/src/lib.rs:498:40 | -| 1 | `std::task::Poll` | fixtures/reject/src/lib.rs:98:34 | -| 1 | `str` | fixtures/reject/src/lib.rs:374:4 | -| 1 | `u64` | fixtures/reject/src/lib.rs:89:2 | +| 1 | `Tail` | fixtures/reject/src/lib.rs:529:30 | +| 1 | `Track` | fixtures/reject/src/lib.rs:947:19 | +| 1 | `VecDeque` | fixtures/reject/src/lib.rs:848:29 | +| 1 | `Vec` | fixtures/reject/src/lib.rs:848:4 | +| 1 | `Waiting` | fixtures/reject/src/lib.rs:540:2 | +| 1 | `Window` | fixtures/reject/src/lib.rs:714:2 | +| 1 | `[u8; 4]` | fixtures/reject/src/lib.rs:519:26 | +| 1 | `dyn Keyed` | fixtures/reject/src/lib.rs:577:32 | +| 1 | `into_keys` | fixtures/reject/src/lib.rs:50:13 | +| 1 | `poll` | fixtures/reject/src/lib.rs:540:2 | +| 1 | `rt.Poll` | fixtures/reject/src/lib.rs:540:2 | +| 1 | `std::any::Any` | fixtures/reject/src/lib.rs:583:4 | +| 1 | `std::collections::VecDeque` | fixtures/reject/src/lib.rs:891:27 | +| 1 | `std::iter::Chain` | fixtures/reject/src/lib.rs:179:51 | +| 1 | `std::iter::Extend` | fixtures/reject/src/lib.rs:1025:6 | +| 1 | `std::iter::Map` | fixtures/reject/src/lib.rs:228:30 | +| 1 | `std::net::AddrParseError` | fixtures/reject/src/lib.rs:476:32 | +| 1 | `std::net::Ipv4Addr` | fixtures/reject/src/lib.rs:476:32 | +| 1 | `std::option::Option` | fixtures/reject/src/lib.rs:412:2 | +| 1 | `std::slice::IterMut` | fixtures/reject/src/lib.rs:811:15 | +| 1 | `std::slice::Iter` | fixtures/reject/src/lib.rs:133:11 | +| 1 | `std::std::Layout` | fixtures/reject/src/lib.rs:610:15 | +| 1 | `std::str` | fixtures/reject/src/lib.rs:477:4 | +| 1 | `std::sync::Mutex` | fixtures/reject/src/lib.rs:559:12 | +| 1 | `std::sync::Weak` | fixtures/reject/src/lib.rs:493:40 | +| 1 | `std::task::Poll` | fixtures/reject/src/lib.rs:93:34 | +| 1 | `str` | fixtures/reject/src/lib.rs:369:4 | +| 1 | `u64` | fixtures/reject/src/lib.rs:84:2 | | 1 | `value` | fixtures/reject/src/lib.rs:31:2 | -| 1 | `{async closure}` | fixtures/reject/src/lib.rs:64:2 | +| 1 | `{async closure}` | fixtures/reject/src/lib.rs:59:2 | ## By type or path | Count | Construct | Type or path | First | | ---: | --- | --- | --- | -| 6 | a raw pointer to `_` in a variable assigned again while it may point there | `(u32, u32)` | fixtures/reject/src/lib.rs:666:10 | -| 4 | a variant of `_`, which is not supported: either is the same JS string | `std::borrow::Cow` | fixtures/reject/src/lib.rs:379:2 | -| 3 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Gap` | fixtures/reject/src/lib.rs:1008:10 | +| 6 | a raw pointer to `_` in a variable assigned again while it may point there | `(u32, u32)` | fixtures/reject/src/lib.rs:661:10 | +| 4 | a variant of `_`, which is not supported: either is the same JS string | `std::borrow::Cow` | fixtures/reject/src/lib.rs:374:2 | +| 3 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Gap` | fixtures/reject/src/lib.rs:1003:10 | | 3 | unsupported type `_` | `f16` | fixtures/reject/src/lib.rs:7:14 | | 2 | `_` is not supported: its `None` and `Some` would both be `rt.None` | `Option` | fixtures/reject/src/lib.rs:16:15 | -| 2 | `_` of `_`, whose `None` is `rt.None`, which is not supported yet | `Iterator::scan`, `Option` | fixtures/reject/src/lib.rs:42:4 | +| 2 | `_` of `_`, whose `None` is `rt.None`, which is not supported yet | `Iterator::scan`, `Option` | fixtures/reject/src/lib.rs:37:4 | | 2 | `_`, a trait object of another crate's trait, which is not supported yet | `dyn std::iter::Iterator` | fixtures/reject/src/lib.rs:11:16 | -| 2 | `_`, a trait object of the generic trait `_`, which is not supported yet | `dyn Scaled`, `Scaled` | fixtures/reject/src/lib.rs:507:23 | -| 2 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `std::mem::MaybeUninit`, `Gap` | fixtures/reject/src/lib.rs:1022:19 | -| 2 | a raw pointer to `_` in a variable assigned again while it may point there | `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:746:15 | -| 2 | an assignment through a reference to `_` | `std::pin::Pin` | fixtures/reject/src/lib.rs:128:2 | -| 2 | replacing the value behind a reference to `_` | `std::pin::Pin` | fixtures/reject/src/lib.rs:112:2 | -| 2 | unsupported call to `_` | `::sum` | fixtures/reject/src/lib.rs:477:17 | -| 1 | `Buf::copy_to_bytes` of `_`, a value JS copies, which is not supported | `Blank` | fixtures/reject/src/lib.rs:811:2 | -| 1 | `BufMut::put` of `_` into a `BytesMut`, which picks the methods it calls by a capacity that depends on whether the other handles of its storage dropped, which is not supported | `Counted` | fixtures/reject/src/lib.rs:437:2 | -| 1 | `Bytes::from_owner` of `_`, which would drop with the last clone of what it makes, which is not supported | `std::sync::Arc` | fixtures/reject/src/lib.rs:422:2 | -| 1 | `_` is not supported yet | `std::borrow::Cow` | fixtures/reject/src/lib.rs:390:18 | -| 1 | `_` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` | `Poll` | fixtures/reject/src/lib.rs:93:20 | +| 2 | `_`, a trait object of the generic trait `_`, which is not supported yet | `dyn Scaled`, `Scaled` | fixtures/reject/src/lib.rs:502:23 | +| 2 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `std::mem::MaybeUninit`, `Gap` | fixtures/reject/src/lib.rs:1017:19 | +| 2 | a raw pointer to `_` in a variable assigned again while it may point there | `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:741:15 | +| 2 | an assignment through a reference to `_` | `std::pin::Pin` | fixtures/reject/src/lib.rs:123:2 | +| 2 | replacing the value behind a reference to `_` | `std::pin::Pin` | fixtures/reject/src/lib.rs:107:2 | +| 2 | unsupported call to `_` | `::sum` | fixtures/reject/src/lib.rs:472:17 | +| 1 | `Buf::copy_to_bytes` of `_`, a value JS copies, which is not supported | `Blank` | fixtures/reject/src/lib.rs:806:2 | +| 1 | `BufMut::put` of `_` into a `BytesMut`, which picks the methods it calls by a capacity that depends on whether the other handles of its storage dropped, which is not supported | `Counted` | fixtures/reject/src/lib.rs:432:2 | +| 1 | `Bytes::from_owner` of `_`, which would drop with the last clone of what it makes, which is not supported | `std::sync::Arc` | fixtures/reject/src/lib.rs:417:2 | +| 1 | `_` is not supported yet | `std::borrow::Cow` | fixtures/reject/src/lib.rs:385:18 | +| 1 | `_` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` | `Poll` | fixtures/reject/src/lib.rs:88:20 | | 1 | `_` is not supported: its field `_` is `_`, typed `_`, whose `None` would be `rt.None` as `_` | `Maybe`, `value`, `Option`, `T \| undefined`, `Option` | fixtures/reject/src/lib.rs:31:2 | -| 1 | `_` is not supported: its field `_` is `_`, typed `_`, whose `Pending` would be `rt.OuterPending` as `_` | `Waiting`, `poll`, `Poll`, `rt.Poll`, `Poll` | fixtures/reject/src/lib.rs:545:2 | -| 1 | `_` of `_` by `_`, which is not supported yet | `HashMap::contains_key`, `std::collections::HashMap`, `u8` | fixtures/reject/src/lib.rs:283:6 | -| 1 | `_` of `_`, which drops `_`, which is not supported yet | `into_keys`, `std::collections::HashMap`, `Noisy` | fixtures/reject/src/lib.rs:55:13 | -| 1 | `_` of `_`, which is not supported yet | `std::any::Any::type_id`, `dyn std::any::Any` | fixtures/reject/src/lib.rs:588:4 | -| 1 | `_` of `_`, whose `clone_from` is its own, which is not supported yet | `slice::clone_from_slice`, `Reused` | fixtures/reject/src/lib.rs:333:4 | +| 1 | `_` is not supported: its field `_` is `_`, typed `_`, whose `Pending` would be `rt.OuterPending` as `_` | `Waiting`, `poll`, `Poll`, `rt.Poll`, `Poll` | fixtures/reject/src/lib.rs:540:2 | +| 1 | `_` of `_` by `_`, which is not supported yet | `HashMap::contains_key`, `std::collections::HashMap`, `u8` | fixtures/reject/src/lib.rs:278:6 | +| 1 | `_` of `_`, which drops `_`, which is not supported yet | `into_keys`, `std::collections::HashMap`, `Noisy` | fixtures/reject/src/lib.rs:50:13 | +| 1 | `_` of `_`, which is not supported yet | `std::any::Any::type_id`, `dyn std::any::Any` | fixtures/reject/src/lib.rs:583:4 | +| 1 | `_` of `_`, whose `clone_from` is its own, which is not supported yet | `slice::clone_from_slice`, `Reused` | fixtures/reject/src/lib.rs:328:4 | | 1 | `_` of `_`, whose `clone_from` is its own, which is not supported yet | `slice::fill`, `Reused` | fixtures/reject/src/lib.rs:21:4 | -| 1 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | `std::collections::HashMap::into_keys` | fixtures/reject/src/lib.rs:891:6 | -| 1 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | `std::iter::Extend::extend` | fixtures/reject/src/lib.rs:1030:6 | -| 1 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | `std::iter::Iterator::count` | fixtures/reject/src/lib.rs:244:38 | -| 1 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | `std::iter::Iterator::filter` | fixtures/reject/src/lib.rs:244:16 | -| 1 | `_` through a held type's own, which is not supported yet | `::ne` | fixtures/reject/src/lib.rs:315:2 | -| 1 | `_` with a mutable reference to a value JS copies, which its mapping would copy | `std::sync::Mutex::get_mut` | fixtures/reject/src/lib.rs:564:12 | -| 1 | `_`, which is not supported yet | `Hasher::write` | fixtures/reject/src/lib.rs:291:9 | -| 1 | `_`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported | `BytesMut::capacity` | fixtures/reject/src/lib.rs:431:6 | -| 1 | `fmt::Arguments` with a placeholder, or not made in place, written to `_`'s own `fmt::Write`, which is not supported yet: std splits what a placeholder writes into `write_str` calls the runtime does not make | `Sink` | fixtures/reject/src/lib.rs:76:10 | -| 1 | a `zip` of `_` and `_`, which std reads by index, of items that drop, which is not supported yet | `std::iter::Map`, `std::ops::Range` | fixtures/reject/src/lib.rs:233:30 | -| 1 | a `zip` of `_`, whose closures std calls one item further through `next` than through `fold` | `std::iter::Chain` | fixtures/reject/src/lib.rs:184:51 | -| 1 | a cast from `_` to `_` | `u64`, `f16` | fixtures/reject/src/lib.rs:89:2 | -| 1 | a cast from a pointer to `_` to one to `_`, which reads the bytes of one type as another | `u32`, `u8` | fixtures/reject/src/lib.rs:605:27 | -| 1 | a coercion to `_` | `std::sync::Arc` | fixtures/reject/src/lib.rs:338:2 | -| 1 | a coercion to `_`, which is not supported yet | `&Tail` | fixtures/reject/src/lib.rs:534:30 | -| 1 | a coercion to `_`, which is not supported yet | `std::sync::Weak` | fixtures/reject/src/lib.rs:498:40 | -| 1 | a constant of type `_`, a pointer into memory translation can't name | `&u32` | fixtures/reject/src/lib.rs:828:3 | -| 1 | a dangling pointer to `_`, a value of no bytes made of more than structs and tuples | `Only` | fixtures/reject/src/lib.rs:787:11 | -| 1 | a future of `_`, which can be `rt.Pending`, as the future's own `Pending` is | `std::task::Poll` | fixtures/reject/src/lib.rs:98:34 | -| 1 | a raw pointer to `_` behind a reference, which is the object and not where it is kept | `std::vec::Vec` | fixtures/reject/src/lib.rs:627:10 | -| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Lane` | fixtures/reject/src/lib.rs:972:19 | -| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Plain` | fixtures/reject/src/lib.rs:926:10 | -| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Span2` | fixtures/reject/src/lib.rs:658:10 | -| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Track` | fixtures/reject/src/lib.rs:952:19 | -| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Window` | fixtures/reject/src/lib.rs:719:2 | -| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:737:15 | -| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `std::cell::UnsafeCell`, `Hits` | fixtures/reject/src/lib.rs:770:21 | -| 1 | a raw pointer to `_` in an element, a payload, or a union field, which is not supported yet | `(u32, u32)` | fixtures/reject/src/lib.rs:729:10 | +| 1 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | `std::collections::HashMap::into_keys` | fixtures/reject/src/lib.rs:886:6 | +| 1 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | `std::iter::Extend::extend` | fixtures/reject/src/lib.rs:1025:6 | +| 1 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | `std::iter::Iterator::count` | fixtures/reject/src/lib.rs:239:38 | +| 1 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | `std::iter::Iterator::filter` | fixtures/reject/src/lib.rs:239:16 | +| 1 | `_` through a held type's own, which is not supported yet | `::ne` | fixtures/reject/src/lib.rs:310:2 | +| 1 | `_` with a mutable reference to a value JS copies, which its mapping would copy | `std::sync::Mutex::get_mut` | fixtures/reject/src/lib.rs:559:12 | +| 1 | `_`, which is not supported yet | `Hasher::write` | fixtures/reject/src/lib.rs:286:9 | +| 1 | `_`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported | `BytesMut::capacity` | fixtures/reject/src/lib.rs:426:6 | +| 1 | `fmt::Arguments` with a placeholder, or not made in place, written to `_`'s own `fmt::Write`, which is not supported yet: std splits what a placeholder writes into `write_str` calls the runtime does not make | `Sink` | fixtures/reject/src/lib.rs:71:10 | +| 1 | a `zip` of `_` and `_`, which std reads by index, of items that drop, which is not supported yet | `std::iter::Map`, `std::ops::Range` | fixtures/reject/src/lib.rs:228:30 | +| 1 | a `zip` of `_`, whose closures std calls one item further through `next` than through `fold` | `std::iter::Chain` | fixtures/reject/src/lib.rs:179:51 | +| 1 | a cast from `_` to `_` | `u64`, `f16` | fixtures/reject/src/lib.rs:84:2 | +| 1 | a cast from a pointer to `_` to one to `_`, which reads the bytes of one type as another | `u32`, `u8` | fixtures/reject/src/lib.rs:600:27 | +| 1 | a coercion to `_` | `std::sync::Arc` | fixtures/reject/src/lib.rs:333:2 | +| 1 | a coercion to `_`, which is not supported yet | `&Tail` | fixtures/reject/src/lib.rs:529:30 | +| 1 | a coercion to `_`, which is not supported yet | `std::sync::Weak` | fixtures/reject/src/lib.rs:493:40 | +| 1 | a constant of type `_`, a pointer into memory translation can't name | `&u32` | fixtures/reject/src/lib.rs:823:3 | +| 1 | a dangling pointer to `_`, a value of no bytes made of more than structs and tuples | `Only` | fixtures/reject/src/lib.rs:782:11 | +| 1 | a future of `_`, which can be `rt.Pending`, as the future's own `Pending` is | `std::task::Poll` | fixtures/reject/src/lib.rs:93:34 | +| 1 | a raw pointer to `_` behind a reference, which is the object and not where it is kept | `std::vec::Vec` | fixtures/reject/src/lib.rs:622:10 | +| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Lane` | fixtures/reject/src/lib.rs:967:19 | +| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Plain` | fixtures/reject/src/lib.rs:921:10 | +| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Span2` | fixtures/reject/src/lib.rs:653:10 | +| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Track` | fixtures/reject/src/lib.rs:947:19 | +| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `Window` | fixtures/reject/src/lib.rs:714:2 | +| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `(u32, u32)`, `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:732:15 | +| 1 | a raw pointer to `_` in `_`, which the crate may put another object in place of | `std::cell::UnsafeCell`, `Hits` | fixtures/reject/src/lib.rs:765:21 | +| 1 | a raw pointer to `_` in an element, a payload, or a union field, which is not supported yet | `(u32, u32)` | fixtures/reject/src/lib.rs:724:10 | | 1 | a scalar constant of type `_` | `f16` | fixtures/reject/src/lib.rs:8:2 | -| 1 | a trait object of `_`, which is not supported yet | `[u8; 4]` | fixtures/reject/src/lib.rs:524:26 | -| 1 | a zero-sized constant of type `_` | `{async closure}` | fixtures/reject/src/lib.rs:64:2 | -| 1 | an assignment through a reference to `_` | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:104:2 | -| 1 | an iterator of the crate implementing `_`, which is not supported yet | `DoubleEndedIterator` | fixtures/reject/src/lib.rs:171:1 | -| 1 | an iterator of the crate implementing `_`, which is not supported yet | `FusedIterator` | fixtures/reject/src/lib.rs:225:1 | -| 1 | an upcast from `_` to `_`, which is not supported yet | `dyn Keyed`, `dyn std::any::Any` | fixtures/reject/src/lib.rs:582:32 | +| 1 | a trait object of `_`, which is not supported yet | `[u8; 4]` | fixtures/reject/src/lib.rs:519:26 | +| 1 | a zero-sized constant of type `_` | `{async closure}` | fixtures/reject/src/lib.rs:59:2 | +| 1 | an assignment through a reference to `_` | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:99:2 | +| 1 | an iterator of the crate implementing `_`, which is not supported yet | `DoubleEndedIterator` | fixtures/reject/src/lib.rs:166:1 | +| 1 | an iterator of the crate implementing `_`, which is not supported yet | `FusedIterator` | fixtures/reject/src/lib.rs:220:1 | +| 1 | an upcast from `_` to `_`, which is not supported yet | `dyn Keyed`, `dyn std::any::Any` | fixtures/reject/src/lib.rs:577:32 | | 1 | arithmetic on `_` | `f16` | fixtures/reject/src/lib.rs:8:2 | -| 1 | collecting `_`, whose `None` is `rt.None`, which is not supported yet | `Option` | fixtures/reject/src/lib.rs:36:43 | -| 1 | comparing `_` as a key, which is not supported yet | `std::collections::BTreeSet` | fixtures/reject/src/lib.rs:265:75 | -| 1 | comparing pointers to `_` in an atomic, which JS has no address of | `u32` | fixtures/reject/src/lib.rs:827:15 | -| 1 | comparing pointers to `_`, each a place JS makes of its own | `u32` | fixtures/reject/src/lib.rs:646:2 | -| 1 | constructing `_` | `std::borrow::Cow` | fixtures/reject/src/lib.rs:397:53 | -| 1 | hashing `_` as a key, which is not supported yet | `std::collections::BTreeSet` | fixtures/reject/src/lib.rs:265:75 | -| 1 | hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet | `std::vec::Vec`, `Batched` | fixtures/reject/src/lib.rs:357:16 | -| 1 | overriding `_`, which std's adaptors call in place of `next` or beside it | `Iterator::fold` | fixtures/reject/src/lib.rs:151:2 | -| 1 | overriding `_`, which std's adaptors call in place of `next` or beside it | `Iterator::size_hint` | fixtures/reject/src/lib.rs:205:2 | -| 1 | passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet | `{closure}`, `Entry::or_insert_with` | fixtures/reject/src/lib.rs:366:13 | -| 1 | passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet | `{closure}`, `Iterator::for_each` | fixtures/reject/src/lib.rs:367:16 | -| 1 | passing `_`, which drops, to `_`, which is not supported yet | `Spent`, `BTreeMap::range` | fixtures/reject/src/lib.rs:853:56 | -| 1 | passing `_`, which drops, to `_`, which is not supported yet | `Spent`, `Vec::drain` | fixtures/reject/src/lib.rs:853:4 | -| 1 | passing `_`, which drops, to `_`, which is not supported yet | `Spent`, `VecDeque::drain` | fixtures/reject/src/lib.rs:853:29 | -| 1 | passing `_`, which drops, to `_`, which is not supported yet | `{closure}`, `String::retain` | fixtures/reject/src/lib.rs:859:4 | -| 1 | passing `_`, which drops, to `_`, which is not supported yet | `{closure}`, `str::contains` | fixtures/reject/src/lib.rs:374:4 | -| 1 | replacing the value behind a reference to `_` | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:133:2 | -| 1 | union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart | `Bits`, `u32` | fixtures/reject/src/lib.rs:632:1 | -| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:588:2 | -| 1 | unsupported call to `_` | `::deref` | fixtures/reject/src/lib.rs:391:2 | -| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:896:27 | -| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:417:2 | -| 1 | unsupported call to `_` | `::cycle` | fixtures/reject/src/lib.rs:138:11 | -| 1 | unsupported call to `_` | `::is_sorted` | fixtures/reject/src/lib.rs:816:15 | -| 1 | unsupported call to `_` | `::clone_from` | fixtures/reject/src/lib.rs:986:10 | -| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:911:27 | -| 1 | unsupported call to `_` | `::hash` | fixtures/reject/src/lib.rs:348:10 | -| 1 | unsupported call to `_` | `std::any::TypeId::of` | fixtures/reject/src/lib.rs:588:17 | -| 1 | unsupported call to `_` | `std::ops::Range::contains` | fixtures/reject/src/lib.rs:192:8 | -| 1 | unsupported call to `_` | `std::std::Layout::new` | fixtures/reject/src/lib.rs:615:15 | -| 1 | unsupported call to `_` | `std::std::alloc` | fixtures/reject/src/lib.rs:617:11 | -| 1 | unsupported call to `_` | `std::std::dealloc` | fixtures/reject/src/lib.rs:620:3 | -| 1 | unsupported call to `_` | `std::str::parse` | fixtures/reject/src/lib.rs:482:4 | -| 1 | unsupported type `_` from another crate | `std::net::AddrParseError` | fixtures/reject/src/lib.rs:481:32 | -| 1 | unsupported type `_` from another crate | `std::net::Ipv4Addr` | fixtures/reject/src/lib.rs:481:32 | +| 1 | comparing `_` as a key, which is not supported yet | `std::collections::BTreeSet` | fixtures/reject/src/lib.rs:260:75 | +| 1 | comparing pointers to `_` in an atomic, which JS has no address of | `u32` | fixtures/reject/src/lib.rs:822:15 | +| 1 | comparing pointers to `_`, each a place JS makes of its own | `u32` | fixtures/reject/src/lib.rs:641:2 | +| 1 | constructing `_` | `std::borrow::Cow` | fixtures/reject/src/lib.rs:392:53 | +| 1 | hashing `_` as a key, which is not supported yet | `std::collections::BTreeSet` | fixtures/reject/src/lib.rs:260:75 | +| 1 | hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet | `std::vec::Vec`, `Batched` | fixtures/reject/src/lib.rs:352:16 | +| 1 | overriding `_`, which std's adaptors call in place of `next` or beside it | `Iterator::fold` | fixtures/reject/src/lib.rs:146:2 | +| 1 | overriding `_`, which std's adaptors call in place of `next` or beside it | `Iterator::size_hint` | fixtures/reject/src/lib.rs:200:2 | +| 1 | passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet | `{closure}`, `Entry::or_insert_with` | fixtures/reject/src/lib.rs:361:13 | +| 1 | passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet | `{closure}`, `Iterator::for_each` | fixtures/reject/src/lib.rs:362:16 | +| 1 | passing `_`, which drops, to `_`, which is not supported yet | `Spent`, `BTreeMap::range` | fixtures/reject/src/lib.rs:848:56 | +| 1 | passing `_`, which drops, to `_`, which is not supported yet | `Spent`, `Vec::drain` | fixtures/reject/src/lib.rs:848:4 | +| 1 | passing `_`, which drops, to `_`, which is not supported yet | `Spent`, `VecDeque::drain` | fixtures/reject/src/lib.rs:848:29 | +| 1 | passing `_`, which drops, to `_`, which is not supported yet | `{closure}`, `String::retain` | fixtures/reject/src/lib.rs:854:4 | +| 1 | passing `_`, which drops, to `_`, which is not supported yet | `{closure}`, `str::contains` | fixtures/reject/src/lib.rs:369:4 | +| 1 | replacing the value behind a reference to `_` | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:128:2 | +| 1 | union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart | `Bits`, `u32` | fixtures/reject/src/lib.rs:627:1 | +| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:583:2 | +| 1 | unsupported call to `_` | `::deref` | fixtures/reject/src/lib.rs:386:2 | +| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:891:27 | +| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:412:2 | +| 1 | unsupported call to `_` | `::cycle` | fixtures/reject/src/lib.rs:133:11 | +| 1 | unsupported call to `_` | `::is_sorted` | fixtures/reject/src/lib.rs:811:15 | +| 1 | unsupported call to `_` | `::clone_from` | fixtures/reject/src/lib.rs:981:10 | +| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:906:27 | +| 1 | unsupported call to `_` | `::hash` | fixtures/reject/src/lib.rs:343:10 | +| 1 | unsupported call to `_` | `std::any::TypeId::of` | fixtures/reject/src/lib.rs:583:17 | +| 1 | unsupported call to `_` | `std::ops::Range::contains` | fixtures/reject/src/lib.rs:187:8 | +| 1 | unsupported call to `_` | `std::std::Layout::new` | fixtures/reject/src/lib.rs:610:15 | +| 1 | unsupported call to `_` | `std::std::alloc` | fixtures/reject/src/lib.rs:612:11 | +| 1 | unsupported call to `_` | `std::std::dealloc` | fixtures/reject/src/lib.rs:615:3 | +| 1 | unsupported call to `_` | `std::str::parse` | fixtures/reject/src/lib.rs:477:4 | +| 1 | unsupported type `_` from another crate | `std::net::AddrParseError` | fixtures/reject/src/lib.rs:476:32 | +| 1 | unsupported type `_` from another crate | `std::net::Ipv4Addr` | fixtures/reject/src/lib.rs:476:32 | ## Spans
unsupported call to `_` (17) -- fixtures/reject/src/lib.rs:138:11: unsupported call to ` as std::iter::Iterator>::cycle` -- fixtures/reject/src/lib.rs:192:8: unsupported call to `std::ops::Range::::contains::` -- fixtures/reject/src/lib.rs:348:10: unsupported call to `::hash::` -- fixtures/reject/src/lib.rs:391:2: unsupported call to ` as std::ops::Deref>::deref` -- fixtures/reject/src/lib.rs:417:2: unsupported call to ` as std::cmp::PartialEq>::eq` -- fixtures/reject/src/lib.rs:477:17: unsupported call to ` as std::iter::Iterator>::sum::` -- fixtures/reject/src/lib.rs:477:38: unsupported call to ` as std::iter::Iterator>::sum::` -- fixtures/reject/src/lib.rs:482:4: unsupported call to `core::str::::parse::` -- fixtures/reject/src/lib.rs:588:2: unsupported call to `::eq` -- fixtures/reject/src/lib.rs:588:17: unsupported call to `std::any::TypeId::of::` -- fixtures/reject/src/lib.rs:615:15: unsupported call to `std::alloc::Layout::new::` -- fixtures/reject/src/lib.rs:617:11: unsupported call to `std::alloc::alloc` -- fixtures/reject/src/lib.rs:620:3: unsupported call to `std::alloc::dealloc` -- fixtures/reject/src/lib.rs:816:15: unsupported call to ` as std::iter::Iterator>::is_sorted` -- fixtures/reject/src/lib.rs:896:27: unsupported call to ` as std::cmp::PartialEq>>::eq` -- fixtures/reject/src/lib.rs:911:27: unsupported call to ` as std::cmp::PartialEq<&[Right]>>::eq` -- fixtures/reject/src/lib.rs:986:10: unsupported call to ` as std::clone::Clone>::clone_from` +- fixtures/reject/src/lib.rs:133:11: unsupported call to ` as std::iter::Iterator>::cycle` +- fixtures/reject/src/lib.rs:187:8: unsupported call to `std::ops::Range::::contains::` +- fixtures/reject/src/lib.rs:343:10: unsupported call to `::hash::` +- fixtures/reject/src/lib.rs:386:2: unsupported call to ` as std::ops::Deref>::deref` +- fixtures/reject/src/lib.rs:412:2: unsupported call to ` as std::cmp::PartialEq>::eq` +- fixtures/reject/src/lib.rs:472:17: unsupported call to ` as std::iter::Iterator>::sum::` +- fixtures/reject/src/lib.rs:472:38: unsupported call to ` as std::iter::Iterator>::sum::` +- fixtures/reject/src/lib.rs:477:4: unsupported call to `core::str::::parse::` +- fixtures/reject/src/lib.rs:583:2: unsupported call to `::eq` +- fixtures/reject/src/lib.rs:583:17: unsupported call to `std::any::TypeId::of::` +- fixtures/reject/src/lib.rs:610:15: unsupported call to `std::alloc::Layout::new::` +- fixtures/reject/src/lib.rs:612:11: unsupported call to `std::alloc::alloc` +- fixtures/reject/src/lib.rs:615:3: unsupported call to `std::alloc::dealloc` +- fixtures/reject/src/lib.rs:811:15: unsupported call to ` as std::iter::Iterator>::is_sorted` +- fixtures/reject/src/lib.rs:891:27: unsupported call to ` as std::cmp::PartialEq>>::eq` +- fixtures/reject/src/lib.rs:906:27: unsupported call to ` as std::cmp::PartialEq<&[Right]>>::eq` +- fixtures/reject/src/lib.rs:981:10: unsupported call to ` as std::clone::Clone>::clone_from`
a raw pointer to `_` in `_`, which the crate may put another object in place of (12) -- fixtures/reject/src/lib.rs:658:10: a raw pointer to `(u32, u32)` in `Span2`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:719:2: a raw pointer to `(u32, u32)` in `Window`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:737:15: a raw pointer to `(u32, u32)` in `std::cell::UnsafeCell<(u32, u32)>`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:770:21: a raw pointer to `std::cell::UnsafeCell` in `Hits`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:926:10: a raw pointer to `(u32, u32)` in `Plain`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:952:19: a raw pointer to `(u32, u32)` in `Track`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:972:19: a raw pointer to `(u32, u32)` in `Lane`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:1008:10: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:1009:10: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:1010:58: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:1022:19: a raw pointer to `std::mem::MaybeUninit<(u32, u32)>` in `Gap`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:1023:19: a raw pointer to `std::mem::MaybeUninit<(u32, u32)>` in `Gap`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:653:10: a raw pointer to `(u32, u32)` in `Span2`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:714:2: a raw pointer to `(u32, u32)` in `Window`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:732:15: a raw pointer to `(u32, u32)` in `std::cell::UnsafeCell<(u32, u32)>`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:765:21: a raw pointer to `std::cell::UnsafeCell` in `Hits`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:921:10: a raw pointer to `(u32, u32)` in `Plain`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:947:19: a raw pointer to `(u32, u32)` in `Track`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:967:19: a raw pointer to `(u32, u32)` in `Lane`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:1003:10: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:1004:10: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:1005:58: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:1017:19: a raw pointer to `std::mem::MaybeUninit<(u32, u32)>` in `Gap`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:1018:19: a raw pointer to `std::mem::MaybeUninit<(u32, u32)>` in `Gap`, which the crate may put another object in place of
a raw pointer to `_` in a variable assigned again while it may point there (8) -- fixtures/reject/src/lib.rs:666:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there -- fixtures/reject/src/lib.rs:674:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there -- fixtures/reject/src/lib.rs:683:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there -- fixtures/reject/src/lib.rs:691:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there -- fixtures/reject/src/lib.rs:700:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there -- fixtures/reject/src/lib.rs:708:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there -- fixtures/reject/src/lib.rs:746:15: a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there -- fixtures/reject/src/lib.rs:759:15: a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:661:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:669:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:678:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:686:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:695:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:703:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:741:15: a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:754:15: a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there
passing `_`, which drops, to `_`, which is not supported yet (5) -- fixtures/reject/src/lib.rs:374:4: passing `{closure@fixtures/reject/src/lib.rs:374:13: 374:27}`, which drops, to `str::contains`, which is not supported yet -- fixtures/reject/src/lib.rs:853:4: passing `Spent`, which drops, to `Vec::drain`, which is not supported yet -- fixtures/reject/src/lib.rs:853:29: passing `Spent`, which drops, to `VecDeque::drain`, which is not supported yet -- fixtures/reject/src/lib.rs:853:56: passing `Spent`, which drops, to `BTreeMap::range`, which is not supported yet -- fixtures/reject/src/lib.rs:859:4: passing `{closure@fixtures/reject/src/lib.rs:859:11: 859:19}`, which drops, to `String::retain`, which is not supported yet +- fixtures/reject/src/lib.rs:369:4: passing `{closure@fixtures/reject/src/lib.rs:369:13: 369:27}`, which drops, to `str::contains`, which is not supported yet +- fixtures/reject/src/lib.rs:848:4: passing `Spent`, which drops, to `Vec::drain`, which is not supported yet +- fixtures/reject/src/lib.rs:848:29: passing `Spent`, which drops, to `VecDeque::drain`, which is not supported yet +- fixtures/reject/src/lib.rs:848:56: passing `Spent`, which drops, to `BTreeMap::range`, which is not supported yet +- fixtures/reject/src/lib.rs:854:4: passing `{closure@fixtures/reject/src/lib.rs:854:11: 854:19}`, which drops, to `String::retain`, which is not supported yet
`_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it (4) -- fixtures/reject/src/lib.rs:244:16: `std::iter::Iterator::filter` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it -- fixtures/reject/src/lib.rs:244:38: `std::iter::Iterator::count` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it -- fixtures/reject/src/lib.rs:891:6: `std::collections::HashMap::::into_keys` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it -- fixtures/reject/src/lib.rs:1030:6: `std::iter::Extend::extend` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it +- fixtures/reject/src/lib.rs:239:16: `std::iter::Iterator::filter` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it +- fixtures/reject/src/lib.rs:239:38: `std::iter::Iterator::count` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it +- fixtures/reject/src/lib.rs:886:6: `std::collections::HashMap::::into_keys` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it +- fixtures/reject/src/lib.rs:1025:6: `std::iter::Extend::extend` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it
a variant of `_`, which is not supported: either is the same JS string (4) -- fixtures/reject/src/lib.rs:379:2: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string -- fixtures/reject/src/lib.rs:380:30: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string -- fixtures/reject/src/lib.rs:381:27: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string -- fixtures/reject/src/lib.rs:386:2: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string +- fixtures/reject/src/lib.rs:374:2: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string +- fixtures/reject/src/lib.rs:375:30: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string +- fixtures/reject/src/lib.rs:376:27: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string +- fixtures/reject/src/lib.rs:381:2: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string
a copy of a closure that changes what it captured (3) -- fixtures/reject/src/lib.rs:254:14: a copy of a closure that changes what it captured -- fixtures/reject/src/lib.rs:557:14: a copy of a closure that changes what it captured -- fixtures/reject/src/lib.rs:558:14: a copy of a closure that changes what it captured +- fixtures/reject/src/lib.rs:249:14: a copy of a closure that changes what it captured +- fixtures/reject/src/lib.rs:552:14: a copy of a closure that changes what it captured +- fixtures/reject/src/lib.rs:553:14: a copy of a closure that changes what it captured
an assignment through a reference to `_` (3) -- fixtures/reject/src/lib.rs:104:2: an assignment through a reference to `std::sync::MutexGuard<'_, u8>` -- fixtures/reject/src/lib.rs:128:2: an assignment through a reference to `std::pin::Pin>>` -- fixtures/reject/src/lib.rs:238:2: an assignment through a reference to `std::pin::Pin<&mut Noisy>` +- fixtures/reject/src/lib.rs:99:2: an assignment through a reference to `std::sync::MutexGuard<'_, u8>` +- fixtures/reject/src/lib.rs:123:2: an assignment through a reference to `std::pin::Pin>>` +- fixtures/reject/src/lib.rs:233:2: an assignment through a reference to `std::pin::Pin<&mut Noisy>`
replacing the value behind a reference to `_` (3) -- fixtures/reject/src/lib.rs:112:2: replacing the value behind a reference to `std::pin::Pin fn(&'a mut std::task::Context<'b>) -> std::task::Poll>>>` -- fixtures/reject/src/lib.rs:120:2: replacing the value behind a reference to `std::pin::Pin>` -- fixtures/reject/src/lib.rs:133:2: replacing the value behind a reference to `std::sync::MutexGuard<'_, u8>` +- fixtures/reject/src/lib.rs:107:2: replacing the value behind a reference to `std::pin::Pin fn(&'a mut std::task::Context<'b>) -> std::task::Poll>>>` +- fixtures/reject/src/lib.rs:115:2: replacing the value behind a reference to `std::pin::Pin>` +- fixtures/reject/src/lib.rs:128:2: replacing the value behind a reference to `std::sync::MutexGuard<'_, u8>`
@@ -372,7 +370,7 @@ The type or module each refused type or path belongs to. - fixtures/reject/src/lib.rs:7:14: unsupported type `f16` - fixtures/reject/src/lib.rs:7:25: unsupported type `f16` -- fixtures/reject/src/lib.rs:87:51: unsupported type `f16` +- fixtures/reject/src/lib.rs:82:51: unsupported type `f16` @@ -385,15 +383,15 @@ The type or module each refused type or path belongs to.
`_` of `_`, whose `None` is `rt.None`, which is not supported yet (2) -- fixtures/reject/src/lib.rs:42:4: `Iterator::scan` of `Option>`, whose `None` is `rt.None`, which is not supported yet -- fixtures/reject/src/lib.rs:260:11: `Iterator::scan` of `Option<()>`, whose `None` is `rt.None`, which is not supported yet +- fixtures/reject/src/lib.rs:37:4: `Iterator::scan` of `Option>`, whose `None` is `rt.None`, which is not supported yet +- fixtures/reject/src/lib.rs:255:11: `Iterator::scan` of `Option<()>`, whose `None` is `rt.None`, which is not supported yet
`_` of `_`, whose `clone_from` is its own, which is not supported yet (2) - fixtures/reject/src/lib.rs:21:4: `slice::fill` of `Reused`, whose `clone_from` is its own, which is not supported yet -- fixtures/reject/src/lib.rs:333:4: `slice::clone_from_slice` of `Reused`, whose `clone_from` is its own, which is not supported yet +- fixtures/reject/src/lib.rs:328:4: `slice::clone_from_slice` of `Reused`, whose `clone_from` is its own, which is not supported yet
@@ -406,79 +404,79 @@ The type or module each refused type or path belongs to.
`_`, a trait object of the generic trait `_`, which is not supported yet (2) -- fixtures/reject/src/lib.rs:507:23: `dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet -- fixtures/reject/src/lib.rs:508:4: `dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet +- fixtures/reject/src/lib.rs:502:23: `dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet +- fixtures/reject/src/lib.rs:503:4: `dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet
a coercion to `_`, which is not supported yet (2) -- fixtures/reject/src/lib.rs:498:40: a coercion to `std::sync::Weak`, which is not supported yet -- fixtures/reject/src/lib.rs:534:30: a coercion to `&Tail`, which is not supported yet +- fixtures/reject/src/lib.rs:493:40: a coercion to `std::sync::Weak`, which is not supported yet +- fixtures/reject/src/lib.rs:529:30: a coercion to `&Tail`, which is not supported yet
an iterator of the crate implementing `_`, which is not supported yet (2) -- fixtures/reject/src/lib.rs:171:1: an iterator of the crate implementing `DoubleEndedIterator`, which is not supported yet -- fixtures/reject/src/lib.rs:225:1: an iterator of the crate implementing `FusedIterator`, which is not supported yet +- fixtures/reject/src/lib.rs:166:1: an iterator of the crate implementing `DoubleEndedIterator`, which is not supported yet +- fixtures/reject/src/lib.rs:220:1: an iterator of the crate implementing `FusedIterator`, which is not supported yet
overriding `_`, which std's adaptors call in place of `next` or beside it (2) -- fixtures/reject/src/lib.rs:151:2: overriding `Iterator::fold`, which std's adaptors call in place of `next` or beside it -- fixtures/reject/src/lib.rs:205:2: overriding `Iterator::size_hint`, which std's adaptors call in place of `next` or beside it +- fixtures/reject/src/lib.rs:146:2: overriding `Iterator::fold`, which std's adaptors call in place of `next` or beside it +- fixtures/reject/src/lib.rs:200:2: overriding `Iterator::size_hint`, which std's adaptors call in place of `next` or beside it
passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet (2) -- fixtures/reject/src/lib.rs:366:13: passing `{closure@fixtures/reject/src/lib.rs:366:28: 366:35}`, a closure that owns a value that drops, to `Entry::or_insert_with`, which is not supported yet -- fixtures/reject/src/lib.rs:367:16: passing `{closure@fixtures/reject/src/lib.rs:367:25: 367:33}`, a closure that owns a value that drops, to `Iterator::for_each`, which is not supported yet +- fixtures/reject/src/lib.rs:361:13: passing `{closure@fixtures/reject/src/lib.rs:361:28: 361:35}`, a closure that owns a value that drops, to `Entry::or_insert_with`, which is not supported yet +- fixtures/reject/src/lib.rs:362:16: passing `{closure@fixtures/reject/src/lib.rs:362:25: 362:33}`, a closure that owns a value that drops, to `Iterator::for_each`, which is not supported yet
unsupported type `_` from another crate (2) -- fixtures/reject/src/lib.rs:481:32: unsupported type `std::net::AddrParseError` from another crate -- fixtures/reject/src/lib.rs:481:32: unsupported type `std::net::Ipv4Addr` from another crate +- fixtures/reject/src/lib.rs:476:32: unsupported type `std::net::AddrParseError` from another crate +- fixtures/reject/src/lib.rs:476:32: unsupported type `std::net::Ipv4Addr` from another crate
`Buf::copy_to_bytes` of `_`, a value JS copies, which is not supported (1) -- fixtures/reject/src/lib.rs:811:2: `Buf::copy_to_bytes` of `Blank`, a value JS copies, which is not supported +- fixtures/reject/src/lib.rs:806:2: `Buf::copy_to_bytes` of `Blank`, a value JS copies, which is not supported
`BufMut::put` of `_` into a `BytesMut`, which picks the methods it calls by a capacity that depends on whether the other handles of its storage dropped, which is not supported (1) -- fixtures/reject/src/lib.rs:437:2: `BufMut::put` of `Counted` into a `BytesMut`, which picks the methods it calls by a capacity that depends on whether the other handles of its storage dropped, which is not supported +- fixtures/reject/src/lib.rs:432:2: `BufMut::put` of `Counted` into a `BytesMut`, which picks the methods it calls by a capacity that depends on whether the other handles of its storage dropped, which is not supported
`Bytes::from_owner` of `_`, which would drop with the last clone of what it makes, which is not supported (1) -- fixtures/reject/src/lib.rs:422:2: `Bytes::from_owner` of `std::sync::Arc<[u8]>`, which would drop with the last clone of what it makes, which is not supported +- fixtures/reject/src/lib.rs:417:2: `Bytes::from_owner` of `std::sync::Arc<[u8]>`, which would drop with the last clone of what it makes, which is not supported
`Pointer` formatting, as in `{:p}`, is not supported (1) -- fixtures/reject/src/lib.rs:70:2: `Pointer` formatting, as in `{:p}`, is not supported +- fixtures/reject/src/lib.rs:65:2: `Pointer` formatting, as in `{:p}`, is not supported
`_` is not supported yet (1) -- fixtures/reject/src/lib.rs:390:18: `std::borrow::Cow<'_, [u8]>` is not supported yet +- fixtures/reject/src/lib.rs:385:18: `std::borrow::Cow<'_, [u8]>` is not supported yet
`_` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` (1) -- fixtures/reject/src/lib.rs:93:20: `Poll>>>` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` +- fixtures/reject/src/lib.rs:88:20: `Poll>>>` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending`
@@ -490,139 +488,139 @@ The type or module each refused type or path belongs to.
`_` is not supported: its field `_` is `_`, typed `_`, whose `Pending` would be `rt.OuterPending` as `_` (1) -- fixtures/reject/src/lib.rs:545:2: `Waiting>` is not supported: its field `poll` is `Poll`, typed `rt.Poll`, whose `Pending` would be `rt.OuterPending` as `Poll>` +- fixtures/reject/src/lib.rs:540:2: `Waiting>` is not supported: its field `poll` is `Poll`, typed `rt.Poll`, whose `Pending` would be `rt.OuterPending` as `Poll>`
`_` of `_` by `_`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:283:6: `HashMap::contains_key` of `std::collections::HashMap` by `u8`, which is not supported yet +- fixtures/reject/src/lib.rs:278:6: `HashMap::contains_key` of `std::collections::HashMap` by `u8`, which is not supported yet
`_` of `_`, which drops `_`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:55:13: `into_keys` of `std::collections::HashMap`, which drops `Noisy`, which is not supported yet +- fixtures/reject/src/lib.rs:50:13: `into_keys` of `std::collections::HashMap`, which drops `Noisy`, which is not supported yet
`_` of `_`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:588:4: `std::any::Any::type_id` of `dyn std::any::Any`, which is not supported yet +- fixtures/reject/src/lib.rs:583:4: `std::any::Any::type_id` of `dyn std::any::Any`, which is not supported yet
`_` through a held type's own, which is not supported yet (1) -- fixtures/reject/src/lib.rs:315:2: ` as PartialEq>::ne` through a held type's own, which is not supported yet +- fixtures/reject/src/lib.rs:310:2: ` as PartialEq>::ne` through a held type's own, which is not supported yet
`_` with a mutable reference to a value JS copies, which its mapping would copy (1) -- fixtures/reject/src/lib.rs:564:12: `std::sync::Mutex::::get_mut` with a mutable reference to a value JS copies, which its mapping would copy +- fixtures/reject/src/lib.rs:559:12: `std::sync::Mutex::::get_mut` with a mutable reference to a value JS copies, which its mapping would copy
`_`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:291:9: `Hasher::write`, which is not supported yet +- fixtures/reject/src/lib.rs:286:9: `Hasher::write`, which is not supported yet
`_`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported (1) -- fixtures/reject/src/lib.rs:431:6: `BytesMut::capacity`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported +- fixtures/reject/src/lib.rs:426:6: `BytesMut::capacity`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported
`fmt::Arguments` with a placeholder, or not made in place, written to `_`'s own `fmt::Write`, which is not supported yet: std splits what a placeholder writes into `write_str` calls the runtime does not make (1) -- fixtures/reject/src/lib.rs:76:10: `fmt::Arguments` with a placeholder, or not made in place, written to `Sink`'s own `fmt::Write`, which is not supported yet: std splits what a placeholder writes into `write_str` calls the runtime does not make +- fixtures/reject/src/lib.rs:71:10: `fmt::Arguments` with a placeholder, or not made in place, written to `Sink`'s own `fmt::Write`, which is not supported yet: std splits what a placeholder writes into `write_str` calls the runtime does not make
a `zip` of `_` and `_`, which std reads by index, of items that drop, which is not supported yet (1) -- fixtures/reject/src/lib.rs:233:30: a `zip` of `std::iter::Map, {closure@fixtures/reject/src/lib.rs:233:15: 233:19}>` and `std::ops::Range`, which std reads by index, of items that drop, which is not supported yet +- fixtures/reject/src/lib.rs:228:30: a `zip` of `std::iter::Map, {closure@fixtures/reject/src/lib.rs:228:15: 228:19}>` and `std::ops::Range`, which std reads by index, of items that drop, which is not supported yet
a `zip` of `_`, whose closures std calls one item further through `next` than through `fold` (1) -- fixtures/reject/src/lib.rs:184:51: a `zip` of `std::iter::Chain, {closure@fixtures/reject/src/lib.rs:184:15: 184:18}>, std::iter::Copied>>`, whose closures std calls one item further through `next` than through `fold` +- fixtures/reject/src/lib.rs:179:51: a `zip` of `std::iter::Chain, {closure@fixtures/reject/src/lib.rs:179:15: 179:18}>, std::iter::Copied>>`, whose closures std calls one item further through `next` than through `fold`
a cast from `_` to `_` (1) -- fixtures/reject/src/lib.rs:89:2: a cast from `u64` to `f16` +- fixtures/reject/src/lib.rs:84:2: a cast from `u64` to `f16`
a cast from a pointer to `_` to one to `_`, which reads the bytes of one type as another (1) -- fixtures/reject/src/lib.rs:605:27: a cast from a pointer to `u32` to one to `u8`, which reads the bytes of one type as another +- fixtures/reject/src/lib.rs:600:27: a cast from a pointer to `u32` to one to `u8`, which reads the bytes of one type as another
a coercion to `_` (1) -- fixtures/reject/src/lib.rs:338:2: a coercion to `std::sync::Arc<[u8]>` +- fixtures/reject/src/lib.rs:333:2: a coercion to `std::sync::Arc<[u8]>`
a constant of type `_`, a pointer into memory translation can't name (1) -- fixtures/reject/src/lib.rs:828:3: a constant of type `&u32`, a pointer into memory translation can't name +- fixtures/reject/src/lib.rs:823:3: a constant of type `&u32`, a pointer into memory translation can't name
a dangling pointer to `_`, a value of no bytes made of more than structs and tuples (1) -- fixtures/reject/src/lib.rs:787:11: a dangling pointer to `Only`, a value of no bytes made of more than structs and tuples +- fixtures/reject/src/lib.rs:782:11: a dangling pointer to `Only`, a value of no bytes made of more than structs and tuples
a future of `_`, which can be `rt.Pending`, as the future's own `Pending` is (1) -- fixtures/reject/src/lib.rs:98:34: a future of `std::task::Poll`, which can be `rt.Pending`, as the future's own `Pending` is +- fixtures/reject/src/lib.rs:93:34: a future of `std::task::Poll`, which can be `rt.Pending`, as the future's own `Pending` is
a mutable reference into a `Result`'s payload, passed on or kept (1) -- fixtures/reject/src/lib.rs:410:12: a mutable reference into a `Result`'s payload, passed on or kept +- fixtures/reject/src/lib.rs:405:12: a mutable reference into a `Result`'s payload, passed on or kept
a mutable static, which any code may write (1) -- fixtures/reject/src/lib.rs:82:11: a mutable static, which any code may write +- fixtures/reject/src/lib.rs:77:11: a mutable static, which any code may write
a pointer's address, which JS has no counterpart of (1) -- fixtures/reject/src/lib.rs:610:17: a pointer's address, which JS has no counterpart of +- fixtures/reject/src/lib.rs:605:17: a pointer's address, which JS has no counterpart of
a printable type must implement `Display` or `Debug` (1) -- fixtures/reject/src/lib.rs:85:1: a printable type must implement `Display` or `Debug` +- fixtures/reject/src/lib.rs:80:1: a printable type must implement `Display` or `Debug`
a raw pointer to `_` behind a reference, which is the object and not where it is kept (1) -- fixtures/reject/src/lib.rs:627:10: a raw pointer to `std::vec::Vec` behind a reference, which is the object and not where it is kept +- fixtures/reject/src/lib.rs:622:10: a raw pointer to `std::vec::Vec` behind a reference, which is the object and not where it is kept
a raw pointer to `_` in an element, a payload, or a union field, which is not supported yet (1) -- fixtures/reject/src/lib.rs:729:10: a raw pointer to `(u32, u32)` in an element, a payload, or a union field, which is not supported yet +- fixtures/reject/src/lib.rs:724:10: a raw pointer to `(u32, u32)` in an element, a payload, or a union field, which is not supported yet
@@ -634,19 +632,19 @@ The type or module each refused type or path belongs to.
a trait object of `_`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:524:26: a trait object of `[u8; 4]`, which is not supported yet +- fixtures/reject/src/lib.rs:519:26: a trait object of `[u8; 4]`, which is not supported yet
a zero-sized constant of type `_` (1) -- fixtures/reject/src/lib.rs:64:2: a zero-sized constant of type `{async closure@fixtures/reject/src/lib.rs:63:10: 63:18}` +- fixtures/reject/src/lib.rs:59:2: a zero-sized constant of type `{async closure@fixtures/reject/src/lib.rs:58:10: 58:18}`
an upcast from `_` to `_`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:582:32: an upcast from `dyn Keyed` to `dyn std::any::Any`, which is not supported yet +- fixtures/reject/src/lib.rs:577:32: an upcast from `dyn Keyed` to `dyn std::any::Any`, which is not supported yet
@@ -656,56 +654,50 @@ The type or module each refused type or path belongs to. -
collecting `_`, whose `None` is `rt.None`, which is not supported yet (1) - -- fixtures/reject/src/lib.rs:36:43: collecting `Option<()>`, whose `None` is `rt.None`, which is not supported yet - -
-
comparing `_` as a key, which is not supported yet (1) -- fixtures/reject/src/lib.rs:265:75: comparing `std::collections::BTreeSet` as a key, which is not supported yet +- fixtures/reject/src/lib.rs:260:75: comparing `std::collections::BTreeSet` as a key, which is not supported yet
comparing pointers to `()`, which has no bytes and so no address of its own (1) -- fixtures/reject/src/lib.rs:778:2: comparing pointers to `()`, which has no bytes and so no address of its own +- fixtures/reject/src/lib.rs:773:2: comparing pointers to `()`, which has no bytes and so no address of its own
comparing pointers to `_` in an atomic, which JS has no address of (1) -- fixtures/reject/src/lib.rs:827:15: comparing pointers to `u32` in an atomic, which JS has no address of +- fixtures/reject/src/lib.rs:822:15: comparing pointers to `u32` in an atomic, which JS has no address of
comparing pointers to `_`, each a place JS makes of its own (1) -- fixtures/reject/src/lib.rs:646:2: comparing pointers to `u32`, each a place JS makes of its own +- fixtures/reject/src/lib.rs:641:2: comparing pointers to `u32`, each a place JS makes of its own
constructing `_` (1) -- fixtures/reject/src/lib.rs:397:53: constructing `std::borrow::Cow<'_, std::sync::Arc>` +- fixtures/reject/src/lib.rs:392:53: constructing `std::borrow::Cow<'_, std::sync::Arc>`
hashing `_` as a key, which is not supported yet (1) -- fixtures/reject/src/lib.rs:265:75: hashing `std::collections::BTreeSet` as a key, which is not supported yet +- fixtures/reject/src/lib.rs:260:75: hashing `std::collections::BTreeSet` as a key, which is not supported yet
hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:357:16: hashing `std::vec::Vec` through `Batched`'s own `Hash::hash_slice`, which is not supported yet +- fixtures/reject/src/lib.rs:352:16: hashing `std::vec::Vec` through `Batched`'s own `Hash::hash_slice`, which is not supported yet
union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart (1) -- fixtures/reject/src/lib.rs:632:1: union `Bits`, whose fields overlap in `u32` and `f64`, which JS keeps apart +- fixtures/reject/src/lib.rs:627:1: union `Bits`, whose fields overlap in `u32` and `f64`, which JS keeps apart
diff --git a/ts/fixtures/reject/expected.txt b/ts/fixtures/reject/expected.txt index 275657c8c..392d3f74c 100644 --- a/ts/fixtures/reject/expected.txt +++ b/ts/fixtures/reject/expected.txt @@ -1,8 +1,8 @@ no item `lopsided` in the crate no item `missing` in the crate no item `bound_ranges` in the crate -a root must not be generic at fixtures/reject/src/lib.rs:87:1 -a printable type must implement `Display` or `Debug` at fixtures/reject/src/lib.rs:85:1 +a root must not be generic at fixtures/reject/src/lib.rs:82:1 +a printable type must implement `Display` or `Debug` at fixtures/reject/src/lib.rs:80:1 unsupported type `f16` at fixtures/reject/src/lib.rs:7:14 a scalar constant of type `f16` at fixtures/reject/src/lib.rs:8:2 arithmetic on `f16` at fixtures/reject/src/lib.rs:8:2 @@ -12,114 +12,113 @@ unsupported type `f16` at fixtures/reject/src/lib.rs:7:25 `Option>>` is not supported: its `None` and `Some` would both be `rt.None` at fixtures/reject/src/lib.rs:17:2 `Option>>` is not supported: its `None` and `Some` would both be `rt.None` at fixtures/reject/src/lib.rs:16:15 `slice::fill` of `Reused`, whose `clone_from` is its own, which is not supported yet at fixtures/reject/src/lib.rs:21:4 -`Iterator::scan` of `Option>`, whose `None` is `rt.None`, which is not supported yet at fixtures/reject/src/lib.rs:42:4 +`Iterator::scan` of `Option>`, whose `None` is `rt.None`, which is not supported yet at fixtures/reject/src/lib.rs:37:4 `Maybe<()>` is not supported: its field `value` is `Option`, typed `T | undefined`, whose `None` would be `rt.None` as `Option<()>` at fixtures/reject/src/lib.rs:31:2 -collecting `Option<()>`, whose `None` is `rt.None`, which is not supported yet at fixtures/reject/src/lib.rs:36:43 -`into_keys` of `std::collections::HashMap`, which drops `Noisy`, which is not supported yet at fixtures/reject/src/lib.rs:55:13 -a zero-sized constant of type `{async closure@fixtures/reject/src/lib.rs:63:10: 63:18}` at fixtures/reject/src/lib.rs:64:2 -`Pointer` formatting, as in `{:p}`, is not supported at fixtures/reject/src/lib.rs:70:11 -`fmt::Arguments` with a placeholder, or not made in place, written to `Sink`'s own `fmt::Write`, which is not supported yet: std splits what a placeholder writes into `write_str` calls the runtime does not make at fixtures/reject/src/lib.rs:76:10 -a mutable static, which any code may write at fixtures/reject/src/lib.rs:82:11 -`Poll>>>` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` at fixtures/reject/src/lib.rs:93:20 -a future of `std::task::Poll`, which can be `rt.Pending`, as the future's own `Pending` is at fixtures/reject/src/lib.rs:98:34 -an assignment through a reference to `std::sync::MutexGuard<'_, u8>` at fixtures/reject/src/lib.rs:104:2 -replacing the value behind a reference to `std::sync::MutexGuard<'_, u8>` at fixtures/reject/src/lib.rs:133:2 -replacing the value behind a reference to `std::pin::Pin fn(&'a mut std::task::Context<'b>) -> std::task::Poll>>>` at fixtures/reject/src/lib.rs:112:2 -an assignment through a reference to `std::pin::Pin>>` at fixtures/reject/src/lib.rs:128:2 -replacing the value behind a reference to `std::pin::Pin>` at fixtures/reject/src/lib.rs:120:2 -unsupported call to ` as std::iter::Iterator>::cycle` at fixtures/reject/src/lib.rs:138:11 -a `zip` of `std::iter::Chain, {closure@fixtures/reject/src/lib.rs:184:15: 184:18}>, std::iter::Copied>>`, whose closures std calls one item further through `next` than through `fold` at fixtures/reject/src/lib.rs:184:51 -unsupported call to `std::ops::Range::::contains::` at fixtures/reject/src/lib.rs:192:8 -a `zip` of `std::iter::Map, {closure@fixtures/reject/src/lib.rs:233:15: 233:19}>` and `std::ops::Range`, which std reads by index, of items that drop, which is not supported yet at fixtures/reject/src/lib.rs:233:30 -an assignment through a reference to `std::pin::Pin<&mut Noisy>` at fixtures/reject/src/lib.rs:238:2 -`std::iter::Iterator::filter` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it at fixtures/reject/src/lib.rs:244:16 -`std::iter::Iterator::count` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it at fixtures/reject/src/lib.rs:244:38 -a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:254:14 -`Iterator::scan` of `Option<()>`, whose `None` is `rt.None`, which is not supported yet at fixtures/reject/src/lib.rs:260:11 -hashing `std::collections::BTreeSet` as a key, which is not supported yet at fixtures/reject/src/lib.rs:265:75 -comparing `std::collections::BTreeSet` as a key, which is not supported yet at fixtures/reject/src/lib.rs:265:75 -`HashMap::contains_key` of `std::collections::HashMap` by `u8`, which is not supported yet at fixtures/reject/src/lib.rs:283:6 -`slice::clone_from_slice` of `Reused`, whose `clone_from` is its own, which is not supported yet at fixtures/reject/src/lib.rs:333:4 -a coercion to `std::sync::Arc<[u8]>` at fixtures/reject/src/lib.rs:338:2 -a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:379:2 -a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:381:27 -a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:380:30 -a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:386:2 -`std::borrow::Cow<'_, [u8]>` is not supported yet at fixtures/reject/src/lib.rs:390:18 -unsupported call to ` as std::ops::Deref>::deref` at fixtures/reject/src/lib.rs:391:2 -constructing `std::borrow::Cow<'_, std::sync::Arc>` at fixtures/reject/src/lib.rs:397:53 -hashing `std::vec::Vec` through `Batched`'s own `Hash::hash_slice`, which is not supported yet at fixtures/reject/src/lib.rs:357:16 -passing `{closure@fixtures/reject/src/lib.rs:366:28: 366:35}`, a closure that owns a value that drops, to `Entry::or_insert_with`, which is not supported yet at fixtures/reject/src/lib.rs:366:13 -passing `{closure@fixtures/reject/src/lib.rs:367:25: 367:33}`, a closure that owns a value that drops, to `Iterator::for_each`, which is not supported yet at fixtures/reject/src/lib.rs:367:16 -passing `{closure@fixtures/reject/src/lib.rs:374:13: 374:27}`, which drops, to `str::contains`, which is not supported yet at fixtures/reject/src/lib.rs:374:4 -unsupported call to ` as std::iter::Iterator>::sum::` at fixtures/reject/src/lib.rs:477:17 -unsupported call to ` as std::iter::Iterator>::sum::` at fixtures/reject/src/lib.rs:477:38 -a mutable reference into a `Result`'s payload, passed on or kept at fixtures/reject/src/lib.rs:410:12 -unsupported call to ` as std::cmp::PartialEq>::eq` at fixtures/reject/src/lib.rs:417:2 -`Bytes::from_owner` of `std::sync::Arc<[u8]>`, which would drop with the last clone of what it makes, which is not supported at fixtures/reject/src/lib.rs:422:2 -`BytesMut::capacity`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported at fixtures/reject/src/lib.rs:431:6 -`BufMut::put` of `Counted` into a `BytesMut`, which picks the methods it calls by a capacity that depends on whether the other handles of its storage dropped, which is not supported at fixtures/reject/src/lib.rs:437:2 -unsupported call to `core::str::::parse::` at fixtures/reject/src/lib.rs:482:4 -unsupported type `std::net::Ipv4Addr` from another crate at fixtures/reject/src/lib.rs:481:32 -unsupported type `std::net::AddrParseError` from another crate at fixtures/reject/src/lib.rs:481:32 -a coercion to `std::sync::Weak`, which is not supported yet at fixtures/reject/src/lib.rs:498:40 -`dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet at fixtures/reject/src/lib.rs:507:23 -`dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet at fixtures/reject/src/lib.rs:508:4 -a trait object of `[u8; 4]`, which is not supported yet at fixtures/reject/src/lib.rs:524:26 -a coercion to `&Tail`, which is not supported yet at fixtures/reject/src/lib.rs:534:30 -`std::sync::Mutex::::get_mut` with a mutable reference to a value JS copies, which its mapping would copy at fixtures/reject/src/lib.rs:564:12 -`Waiting>` is not supported: its field `poll` is `Poll`, typed `rt.Poll`, whose `Pending` would be `rt.OuterPending` as `Poll>` at fixtures/reject/src/lib.rs:545:2 -a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:557:14 -a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:558:14 -an upcast from `dyn Keyed` to `dyn std::any::Any`, which is not supported yet at fixtures/reject/src/lib.rs:582:32 -`std::any::Any::type_id` of `dyn std::any::Any`, which is not supported yet at fixtures/reject/src/lib.rs:588:4 -unsupported call to `std::any::TypeId::of::` at fixtures/reject/src/lib.rs:588:17 -unsupported call to `::eq` at fixtures/reject/src/lib.rs:588:2 -a cast from a pointer to `u32` to one to `u8`, which reads the bytes of one type as another at fixtures/reject/src/lib.rs:605:27 -a pointer's address, which JS has no counterpart of at fixtures/reject/src/lib.rs:610:17 -unsupported call to `std::alloc::Layout::new::` at fixtures/reject/src/lib.rs:615:15 -unsupported call to `std::alloc::alloc` at fixtures/reject/src/lib.rs:617:11 -unsupported call to `std::alloc::dealloc` at fixtures/reject/src/lib.rs:620:3 -a raw pointer to `std::vec::Vec` behind a reference, which is the object and not where it is kept at fixtures/reject/src/lib.rs:627:10 -union `Bits`, whose fields overlap in `u32` and `f64`, which JS keeps apart at fixtures/reject/src/lib.rs:638:10 -comparing pointers to `u32`, each a place JS makes of its own at fixtures/reject/src/lib.rs:646:2 -a raw pointer to `(u32, u32)` in `Span2`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:658:10 -a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:666:10 -a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:674:10 -a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:683:10 -a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:691:10 -a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:700:10 -a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:708:10 -a raw pointer to `(u32, u32)` in `Window`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:719:2 -a raw pointer to `(u32, u32)` in an element, a payload, or a union field, which is not supported yet at fixtures/reject/src/lib.rs:729:10 -a raw pointer to `(u32, u32)` in `std::cell::UnsafeCell<(u32, u32)>`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:737:15 -a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:746:15 -a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:759:15 -a raw pointer to `std::cell::UnsafeCell` in `Hits`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:770:21 -comparing pointers to `()`, which has no bytes and so no address of its own at fixtures/reject/src/lib.rs:778:2 -a dangling pointer to `Only`, a value of no bytes made of more than structs and tuples at fixtures/reject/src/lib.rs:787:11 -`Buf::copy_to_bytes` of `Blank`, a value JS copies, which is not supported at fixtures/reject/src/lib.rs:811:2 -unsupported call to ` as std::iter::Iterator>::is_sorted` at fixtures/reject/src/lib.rs:816:15 -comparing pointers to `u32` in an atomic, which JS has no address of at fixtures/reject/src/lib.rs:827:15 -a constant of type `&u32`, a pointer into memory translation can't name at fixtures/reject/src/lib.rs:828:3 -passing `Spent`, which drops, to `Vec::drain`, which is not supported yet at fixtures/reject/src/lib.rs:853:4 -passing `Spent`, which drops, to `VecDeque::drain`, which is not supported yet at fixtures/reject/src/lib.rs:853:29 -passing `Spent`, which drops, to `BTreeMap::range`, which is not supported yet at fixtures/reject/src/lib.rs:853:56 -passing `{closure@fixtures/reject/src/lib.rs:859:11: 859:19}`, which drops, to `String::retain`, which is not supported yet at fixtures/reject/src/lib.rs:859:4 -`std::collections::HashMap::::into_keys` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it at fixtures/reject/src/lib.rs:891:6 -unsupported call to ` as std::cmp::PartialEq>>::eq` at fixtures/reject/src/lib.rs:896:27 -unsupported call to ` as std::cmp::PartialEq<&[Right]>>::eq` at fixtures/reject/src/lib.rs:911:27 -a raw pointer to `(u32, u32)` in `Plain`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:926:10 -a raw pointer to `(u32, u32)` in `Track`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:952:19 -a raw pointer to `(u32, u32)` in `Lane`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:972:19 -a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1008:10 -a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1009:10 -a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1010:58 -a raw pointer to `std::mem::MaybeUninit<(u32, u32)>` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1022:19 -a raw pointer to `std::mem::MaybeUninit<(u32, u32)>` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1023:19 -`std::iter::Extend::extend` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it at fixtures/reject/src/lib.rs:1030:6 -overriding `Iterator::fold`, which std's adaptors call in place of `next` or beside it at fixtures/reject/src/lib.rs:151:2 -an iterator of the crate implementing `DoubleEndedIterator`, which is not supported yet at fixtures/reject/src/lib.rs:171:1 -overriding `Iterator::size_hint`, which std's adaptors call in place of `next` or beside it at fixtures/reject/src/lib.rs:205:2 -an iterator of the crate implementing `FusedIterator`, which is not supported yet at fixtures/reject/src/lib.rs:225:1 -`Hasher::write`, which is not supported yet at fixtures/reject/src/lib.rs:291:9 +`into_keys` of `std::collections::HashMap`, which drops `Noisy`, which is not supported yet at fixtures/reject/src/lib.rs:50:13 +a zero-sized constant of type `{async closure@fixtures/reject/src/lib.rs:58:10: 58:18}` at fixtures/reject/src/lib.rs:59:2 +`Pointer` formatting, as in `{:p}`, is not supported at fixtures/reject/src/lib.rs:65:11 +`fmt::Arguments` with a placeholder, or not made in place, written to `Sink`'s own `fmt::Write`, which is not supported yet: std splits what a placeholder writes into `write_str` calls the runtime does not make at fixtures/reject/src/lib.rs:71:10 +a mutable static, which any code may write at fixtures/reject/src/lib.rs:77:11 +`Poll>>>` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` at fixtures/reject/src/lib.rs:88:20 +a future of `std::task::Poll`, which can be `rt.Pending`, as the future's own `Pending` is at fixtures/reject/src/lib.rs:93:34 +an assignment through a reference to `std::sync::MutexGuard<'_, u8>` at fixtures/reject/src/lib.rs:99:2 +replacing the value behind a reference to `std::sync::MutexGuard<'_, u8>` at fixtures/reject/src/lib.rs:128:2 +replacing the value behind a reference to `std::pin::Pin fn(&'a mut std::task::Context<'b>) -> std::task::Poll>>>` at fixtures/reject/src/lib.rs:107:2 +an assignment through a reference to `std::pin::Pin>>` at fixtures/reject/src/lib.rs:123:2 +replacing the value behind a reference to `std::pin::Pin>` at fixtures/reject/src/lib.rs:115:2 +unsupported call to ` as std::iter::Iterator>::cycle` at fixtures/reject/src/lib.rs:133:11 +a `zip` of `std::iter::Chain, {closure@fixtures/reject/src/lib.rs:179:15: 179:18}>, std::iter::Copied>>`, whose closures std calls one item further through `next` than through `fold` at fixtures/reject/src/lib.rs:179:51 +unsupported call to `std::ops::Range::::contains::` at fixtures/reject/src/lib.rs:187:8 +a `zip` of `std::iter::Map, {closure@fixtures/reject/src/lib.rs:228:15: 228:19}>` and `std::ops::Range`, which std reads by index, of items that drop, which is not supported yet at fixtures/reject/src/lib.rs:228:30 +an assignment through a reference to `std::pin::Pin<&mut Noisy>` at fixtures/reject/src/lib.rs:233:2 +`std::iter::Iterator::filter` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it at fixtures/reject/src/lib.rs:239:16 +`std::iter::Iterator::count` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it at fixtures/reject/src/lib.rs:239:38 +a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:249:14 +`Iterator::scan` of `Option<()>`, whose `None` is `rt.None`, which is not supported yet at fixtures/reject/src/lib.rs:255:11 +hashing `std::collections::BTreeSet` as a key, which is not supported yet at fixtures/reject/src/lib.rs:260:75 +comparing `std::collections::BTreeSet` as a key, which is not supported yet at fixtures/reject/src/lib.rs:260:75 +`HashMap::contains_key` of `std::collections::HashMap` by `u8`, which is not supported yet at fixtures/reject/src/lib.rs:278:6 +`slice::clone_from_slice` of `Reused`, whose `clone_from` is its own, which is not supported yet at fixtures/reject/src/lib.rs:328:4 +a coercion to `std::sync::Arc<[u8]>` at fixtures/reject/src/lib.rs:333:2 +a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:374:2 +a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:376:27 +a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:375:30 +a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:381:2 +`std::borrow::Cow<'_, [u8]>` is not supported yet at fixtures/reject/src/lib.rs:385:18 +unsupported call to ` as std::ops::Deref>::deref` at fixtures/reject/src/lib.rs:386:2 +constructing `std::borrow::Cow<'_, std::sync::Arc>` at fixtures/reject/src/lib.rs:392:53 +hashing `std::vec::Vec` through `Batched`'s own `Hash::hash_slice`, which is not supported yet at fixtures/reject/src/lib.rs:352:16 +passing `{closure@fixtures/reject/src/lib.rs:361:28: 361:35}`, a closure that owns a value that drops, to `Entry::or_insert_with`, which is not supported yet at fixtures/reject/src/lib.rs:361:13 +passing `{closure@fixtures/reject/src/lib.rs:362:25: 362:33}`, a closure that owns a value that drops, to `Iterator::for_each`, which is not supported yet at fixtures/reject/src/lib.rs:362:16 +passing `{closure@fixtures/reject/src/lib.rs:369:13: 369:27}`, which drops, to `str::contains`, which is not supported yet at fixtures/reject/src/lib.rs:369:4 +unsupported call to ` as std::iter::Iterator>::sum::` at fixtures/reject/src/lib.rs:472:17 +unsupported call to ` as std::iter::Iterator>::sum::` at fixtures/reject/src/lib.rs:472:38 +a mutable reference into a `Result`'s payload, passed on or kept at fixtures/reject/src/lib.rs:405:12 +unsupported call to ` as std::cmp::PartialEq>::eq` at fixtures/reject/src/lib.rs:412:2 +`Bytes::from_owner` of `std::sync::Arc<[u8]>`, which would drop with the last clone of what it makes, which is not supported at fixtures/reject/src/lib.rs:417:2 +`BytesMut::capacity`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported at fixtures/reject/src/lib.rs:426:6 +`BufMut::put` of `Counted` into a `BytesMut`, which picks the methods it calls by a capacity that depends on whether the other handles of its storage dropped, which is not supported at fixtures/reject/src/lib.rs:432:2 +unsupported call to `core::str::::parse::` at fixtures/reject/src/lib.rs:477:4 +unsupported type `std::net::Ipv4Addr` from another crate at fixtures/reject/src/lib.rs:476:32 +unsupported type `std::net::AddrParseError` from another crate at fixtures/reject/src/lib.rs:476:32 +a coercion to `std::sync::Weak`, which is not supported yet at fixtures/reject/src/lib.rs:493:40 +`dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet at fixtures/reject/src/lib.rs:502:23 +`dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet at fixtures/reject/src/lib.rs:503:4 +a trait object of `[u8; 4]`, which is not supported yet at fixtures/reject/src/lib.rs:519:26 +a coercion to `&Tail`, which is not supported yet at fixtures/reject/src/lib.rs:529:30 +`std::sync::Mutex::::get_mut` with a mutable reference to a value JS copies, which its mapping would copy at fixtures/reject/src/lib.rs:559:12 +`Waiting>` is not supported: its field `poll` is `Poll`, typed `rt.Poll`, whose `Pending` would be `rt.OuterPending` as `Poll>` at fixtures/reject/src/lib.rs:540:2 +a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:552:14 +a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:553:14 +an upcast from `dyn Keyed` to `dyn std::any::Any`, which is not supported yet at fixtures/reject/src/lib.rs:577:32 +`std::any::Any::type_id` of `dyn std::any::Any`, which is not supported yet at fixtures/reject/src/lib.rs:583:4 +unsupported call to `std::any::TypeId::of::` at fixtures/reject/src/lib.rs:583:17 +unsupported call to `::eq` at fixtures/reject/src/lib.rs:583:2 +a cast from a pointer to `u32` to one to `u8`, which reads the bytes of one type as another at fixtures/reject/src/lib.rs:600:27 +a pointer's address, which JS has no counterpart of at fixtures/reject/src/lib.rs:605:17 +unsupported call to `std::alloc::Layout::new::` at fixtures/reject/src/lib.rs:610:15 +unsupported call to `std::alloc::alloc` at fixtures/reject/src/lib.rs:612:11 +unsupported call to `std::alloc::dealloc` at fixtures/reject/src/lib.rs:615:3 +a raw pointer to `std::vec::Vec` behind a reference, which is the object and not where it is kept at fixtures/reject/src/lib.rs:622:10 +union `Bits`, whose fields overlap in `u32` and `f64`, which JS keeps apart at fixtures/reject/src/lib.rs:633:10 +comparing pointers to `u32`, each a place JS makes of its own at fixtures/reject/src/lib.rs:641:2 +a raw pointer to `(u32, u32)` in `Span2`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:653:10 +a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:661:10 +a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:669:10 +a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:678:10 +a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:686:10 +a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:695:10 +a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:703:10 +a raw pointer to `(u32, u32)` in `Window`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:714:2 +a raw pointer to `(u32, u32)` in an element, a payload, or a union field, which is not supported yet at fixtures/reject/src/lib.rs:724:10 +a raw pointer to `(u32, u32)` in `std::cell::UnsafeCell<(u32, u32)>`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:732:15 +a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:741:15 +a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:754:15 +a raw pointer to `std::cell::UnsafeCell` in `Hits`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:765:21 +comparing pointers to `()`, which has no bytes and so no address of its own at fixtures/reject/src/lib.rs:773:2 +a dangling pointer to `Only`, a value of no bytes made of more than structs and tuples at fixtures/reject/src/lib.rs:782:11 +`Buf::copy_to_bytes` of `Blank`, a value JS copies, which is not supported at fixtures/reject/src/lib.rs:806:2 +unsupported call to ` as std::iter::Iterator>::is_sorted` at fixtures/reject/src/lib.rs:811:15 +comparing pointers to `u32` in an atomic, which JS has no address of at fixtures/reject/src/lib.rs:822:15 +a constant of type `&u32`, a pointer into memory translation can't name at fixtures/reject/src/lib.rs:823:3 +passing `Spent`, which drops, to `Vec::drain`, which is not supported yet at fixtures/reject/src/lib.rs:848:4 +passing `Spent`, which drops, to `VecDeque::drain`, which is not supported yet at fixtures/reject/src/lib.rs:848:29 +passing `Spent`, which drops, to `BTreeMap::range`, which is not supported yet at fixtures/reject/src/lib.rs:848:56 +passing `{closure@fixtures/reject/src/lib.rs:854:11: 854:19}`, which drops, to `String::retain`, which is not supported yet at fixtures/reject/src/lib.rs:854:4 +`std::collections::HashMap::::into_keys` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it at fixtures/reject/src/lib.rs:886:6 +unsupported call to ` as std::cmp::PartialEq>>::eq` at fixtures/reject/src/lib.rs:891:27 +unsupported call to ` as std::cmp::PartialEq<&[Right]>>::eq` at fixtures/reject/src/lib.rs:906:27 +a raw pointer to `(u32, u32)` in `Plain`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:921:10 +a raw pointer to `(u32, u32)` in `Track`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:947:19 +a raw pointer to `(u32, u32)` in `Lane`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:967:19 +a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1003:10 +a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1004:10 +a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1005:58 +a raw pointer to `std::mem::MaybeUninit<(u32, u32)>` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1017:19 +a raw pointer to `std::mem::MaybeUninit<(u32, u32)>` in `Gap`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:1018:19 +`std::iter::Extend::extend` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it at fixtures/reject/src/lib.rs:1025:6 +overriding `Iterator::fold`, which std's adaptors call in place of `next` or beside it at fixtures/reject/src/lib.rs:146:2 +an iterator of the crate implementing `DoubleEndedIterator`, which is not supported yet at fixtures/reject/src/lib.rs:166:1 +overriding `Iterator::size_hint`, which std's adaptors call in place of `next` or beside it at fixtures/reject/src/lib.rs:200:2 +an iterator of the crate implementing `FusedIterator`, which is not supported yet at fixtures/reject/src/lib.rs:220:1 +`Hasher::write`, which is not supported yet at fixtures/reject/src/lib.rs:286:9 diff --git a/ts/fixtures/reject/src/lib.rs b/ts/fixtures/reject/src/lib.rs index e8faf1f12..568d17012 100644 --- a/ts/fixtures/reject/src/lib.rs +++ b/ts/fixtures/reject/src/lib.rs @@ -31,11 +31,6 @@ pub fn generic_unit(value: Option<()>) -> bool { Maybe { value }.value.is_some() } -/// The runtime's collecting into an `Option` ends at the first `undefined`, which `Some(())` is. -pub fn collected(v: &[u8]) -> Option> { - v.iter().map(|&b| (b > 1).then_some(())).collect() -} - /// `scan` of items that can be `undefined`: its closure's `None` and `Some(None)` would both be. pub fn scanned(v: &[u8]) -> usize { v.iter() diff --git a/ts/fixtures/reject/ts.toml b/ts/fixtures/reject/ts.toml index b142d0f83..d6b62d878 100644 --- a/ts/fixtures/reject/ts.toml +++ b/ts/fixtures/reject/ts.toml @@ -6,7 +6,6 @@ roots = [ "refilled", "scanned", "generic_unit", - "collected", "Noisy", "keys", "async_closure", diff --git a/ts/runtime/rt/collections.ts b/ts/runtime/rt/collections.ts index 924a3a820..dce9f0854 100644 --- a/ts/runtime/rt/collections.ts +++ b/ts/runtime/rt/collections.ts @@ -72,6 +72,11 @@ export function cmpStr(a: string, b: string): Ordering { return a.length < b.length ? -1 : 1; } +/** `Ord::cmp` of what holds nothing, as `()` and `PhantomData`: always `Equal`. */ +export function cmpNothing(_a: undefined, _b: undefined): Ordering { + return 0; +} + /** * `Ord::cmp` of tuples, or `PartialOrd::partial_cmp`, from each field's: the first that * is not `Equal`, as `None` is not. diff --git a/ts/runtime/rt/hash.ts b/ts/runtime/rt/hash.ts index bfbeaf27f..44ed939f9 100644 --- a/ts/runtime/rt/hash.ts +++ b/ts/runtime/rt/hash.ts @@ -299,6 +299,9 @@ export function hashStr(str: string, s: Hasher): void { s.str(str); } +/** `Hash::hash` of what holds nothing, as `()` and `PhantomData`: nothing written. */ +export function hashNothing(_value: undefined, _s: Hasher): void {} + /** `Hash::hash` of tuples, from each field's. */ export function hashTuple(fields: readonly ((value: never, s: Hasher) => void)[]): (value: T, s: Hasher) => void { return (value, s) => { diff --git a/ts/runtime/rt/iter.ts b/ts/runtime/rt/iter.ts index 7478ca8fb..e47b55112 100644 --- a/ts/runtime/rt/iter.ts +++ b/ts/runtime/rt/iter.ts @@ -995,13 +995,20 @@ export function iterCollectResult(it: Iter>, into: (values return error; } -/** `collect` of `Option`s: `None` at the first `None`, or every value collected by `into`, as `iterCollectResult`. */ -export function iterCollectOption(it: Iter, into: (values: Iter) => C, drop?: Drop): C | undefined { - const shunt = new OptionShunt(it); +/** + * `collect` of `Option`s: `None` at the first `None`, or every value collected by `into`, + * as `iterCollectResult`. An item's `None` is `itemNone`, and the result's `none`, each + * `rt.None` where `undefined` is a value. + */ +export function iterCollectOption(it: Iter, into: (values: Iter) => C, drop?: Drop): C | undefined; +export function iterCollectOption(it: Iter, into: (values: Iter) => C, drop: Drop | undefined, itemNone: None): C | undefined; +export function iterCollectOption(it: Iter, into: (values: Iter) => C, drop: Drop | undefined, itemNone: None | undefined, none: None): C | None; +export function iterCollectOption(it: Iter, into: (values: Iter) => C, drop?: Drop, itemNone?: None, none?: None): C | undefined | None { + const shunt = new OptionShunt(it, itemNone); const values = into(shunt); if (!shunt.none) return values; drop?.(values); - return undefined; + return none; } // What std's iterators override to count or take the last: `count` and `last`, each of @@ -3020,15 +3027,21 @@ class ResultShunt extends Adaptor, U> { } } -/** What `iterCollectOption` collects from: values until the first `None`. */ -class OptionShunt extends Adaptor { +/** What `iterCollectOption` collects from: values until the first `None`, which is `itemNone`. */ +class OptionShunt extends Adaptor { none = false; + private readonly itemNone: None | undefined; + + constructor(inner: Iter, itemNone: None | undefined) { + super(inner); + this.itemNone = itemNone; + } next(): U | Done { if (this.none) return DONE; const item = this.inner.folded().next(); if (item === DONE) return DONE; - if (item !== undefined) return item; + if (item !== this.itemNone) return item as U; this.none = true; return DONE; } diff --git a/ts/src/lower/body.rs b/ts/src/lower/body.rs index cd2e10cec..3944cedce 100644 --- a/ts/src/lower/body.rs +++ b/ts/src/lower/body.rs @@ -229,19 +229,13 @@ impl<'b, 'a, 'tcx> Body<'b, 'a, 'tcx> { let ty::Adt(adt, _) = ty.kind() else { return Err(values); }; - match library::std_path(tcx, adt.did()) - .iter() - .map(String::as_str) - .collect::>() - .as_slice() - { - ["marker", "PhantomData"] => return Ok(Expr::undefined()), - // Typed, as what reads it may infer nothing of it. - ["iter", "sources", "empty", "Empty"] => { - let ts_ty = self.t.ty(ty, span); - return Ok(Expr::As(Box::new(Expr::rt("iterEmpty", Vec::new())), ts_ty)); - } - _ => {} + if library::nothing(tcx, ty) { + return Ok(Expr::undefined()); + } + // Typed, as what reads it may infer nothing of it. + if library::empty_iter(tcx, adt.did()) { + let ts_ty = self.t.ty(ty, span); + return Ok(Expr::As(Box::new(Expr::rt("iterEmpty", Vec::new())), ts_ty)); } let Some((make, gargs)) = super::iter::maker(self.t, ty) else { return Err(values); diff --git a/ts/src/lower/collections.rs b/ts/src/lower/collections.rs index ef8db4804..cdb5cae49 100644 --- a/ts/src/lower/collections.rs +++ b/ts/src/lower/collections.rs @@ -117,6 +117,7 @@ pub fn call<'tcx>( } let kind = b.t.std_of(t) == Some(Std::ErrorKind); if matches!(t.kind(), ty::Bool | ty::Int(_) | ty::Uint(_)) + || library::nothing(tcx, t) || bytes(b, t) || !(std_key(b, t) || kind) || !alike(b, t, rhs) @@ -802,6 +803,7 @@ fn hashing<'tcx>(b: &mut Body<'_, '_, 'tcx>, coll: Ty<'tcx>, key: Ty<'tcx>, span let key = peel(b, key); let primitive = match key.kind() { ty::Bool | ty::Char | ty::Str => true, + _ if library::nothing(b.t.tcx, key) => true, ty::Int(_) | ty::Uint(_) => !Int::of(key)?.big(), ty::Adt(..) if library::string(b.t.tcx, key) => true, ty::Adt(adt, _) if b.t.own(adt.did()) && fieldless(*adt) => derived_eq(b, key), @@ -1571,7 +1573,8 @@ fn std_key<'tcx>(b: &Body<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool { match ty.kind() { // A float is no key, but its `PartialEq` and `PartialOrd` are the runtime's. ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Str => true, - ty::Tuple(tys) => !tys.is_empty() && tys.iter().all(held), + _ if library::nothing(b.t.tcx, ty) => true, + ty::Tuple(tys) => tys.iter().all(held), _ if let Some(elem) = elements_of(b, ty) => held(elem), _ if bytes(b, ty) => true, ty::Adt(..) if let Some(inner) = option_of(b, ty).or_else(|| arc_of(b, ty)).or_else(|| reverse_of(b, ty)) => { @@ -1702,7 +1705,8 @@ pub fn cmp_fn<'tcx>(b: &mut Body<'_, '_, 'tcx>, ty: Ty<'tcx>, partial: bool, spa ty::Adt(..) if library::string(tcx, ty) => Expr::Rt("cmpStr".into()), ty::Adt(..) if b.t.std_of(ty) == Some(Std::Ordering) => Expr::Rt("cmp".into()), ty::Adt(..) if b.t.std_of(ty) == Some(Std::Duration) => Expr::Rt("durationCmp".into()), - ty::Tuple(tys) if !tys.is_empty() => { + _ if library::nothing(tcx, ty) => Expr::Rt("cmpNothing".into()), + ty::Tuple(tys) => { let fns = tys.iter().map(|t| cmp_fn(b, t, partial, span)).collect(); Expr::rt("cmpTuple", vec![Expr::Array(fns)]) } @@ -1743,11 +1747,12 @@ pub fn eq_fn<'tcx>(b: &mut Body<'_, '_, 'tcx>, ty: Ty<'tcx>, span: Span) -> Expr int.func("eq") } ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Str => Expr::Rt("same".into()), + _ if library::nothing(tcx, ty) => Expr::Rt("same".into()), ty::Adt(..) if library::string(tcx, ty) || matches!(b.t.std_of(ty), Some(Std::Ordering | Std::ErrorKind)) => { Expr::Rt("same".into()) } ty::Adt(..) if b.t.std_of(ty) == Some(Std::Duration) => Expr::Rt("durationEq".into()), - ty::Tuple(tys) if !tys.is_empty() => { + ty::Tuple(tys) => { let fns = tys.iter().map(|t| eq_fn(b, t, span)).collect(); Expr::rt("eqTuple", vec![Expr::Array(fns)]) } @@ -1803,7 +1808,8 @@ fn hash_fn<'tcx>(b: &mut Body<'_, '_, 'tcx>, ty: Ty<'tcx>, hasher: Ty<'tcx>, spa // Its derived `Hash` writes its `i8` discriminant. ty::Adt(..) if b.t.std_of(ty) == Some(Std::Ordering) => Expr::Rt("hash8".into()), ty::Adt(..) if b.t.std_of(ty) == Some(Std::Duration) => Expr::Rt("durationHash".into()), - ty::Tuple(tys) if !tys.is_empty() => { + _ if library::nothing(tcx, ty) => Expr::Rt("hashNothing".into()), + ty::Tuple(tys) => { let fns = tys.iter().map(|t| hash_fn(b, t, hasher, span)).collect(); Expr::rt("hashTuple", vec![Expr::Array(fns)]) } diff --git a/ts/src/lower/fmt.rs b/ts/src/lower/fmt.rs index cfbec2174..63d6a8d3a 100644 --- a/ts/src/lower/fmt.rs +++ b/ts/src/lower/fmt.rs @@ -275,6 +275,17 @@ pub fn std_impl<'tcx>( ty::Dynamic(preds, ..) if preds.principal_def_id().and_then(|did| Trait::of(tcx, did)) == Some(tr) => { value.call(vec![f]) } + // Unpadded, naming its type as `type_name` does. + ty::Adt(adt, args) if tr == Trait::Debug && adt.is_phantom_data() => { + let name = rustc_const_eval::util::type_name(tcx, args.type_at(0)); + rt("writeStr", vec![f, Expr::Str(format!("PhantomData<{name}>"))]) + } + // Each its name alone, unpadded. + ty::Adt(adt, _) + if tr == Trait::Debug && (library::pinned(tcx, adt.did()) || library::empty_iter(tcx, adt.did())) => + { + rt("writeStr", vec![f, Expr::Str(tcx.item_name(adt.did()).to_string())]) + } ty::Adt(adt, args) => match (Std::of(tcx, adt.did())?, tr) { (Std::String | Std::Cow, Trait::Display) if library::string(tcx, ty) => Expr::rt("fmtPad", vec![f, value]), (Std::String | Std::Cow, Trait::Debug) if library::string(tcx, ty) => rt("str", vec![value, f]), diff --git a/ts/src/lower/iter.rs b/ts/src/lower/iter.rs index 198c20c19..a1e7897da 100644 --- a/ts/src/lower/iter.rs +++ b/ts/src/lower/iter.rs @@ -936,6 +936,12 @@ fn collect<'tcx>( span: Span, ) -> Option { let tcx = b.t.tcx; + // `()`'s reads every item, each a `()` too, by `for_each`. + if ty.is_unit() { + let drops = iter_drops(b, from, span); + let each = Expr::Lambda(Vec::new(), Box::new(Expr::undefined())); + return Some(Expr::rt("iterForEach", tail(vec![iter, each], vec![drops]))); + } let ty::Adt(adt, args) = ty.kind() else { return None; }; @@ -957,15 +963,6 @@ fn collect<'tcx>( return None; }; let value = item_args.type_at(0); - // The runtime ends at the first `undefined` item, and returns `undefined` for `None`. - if std == Std::Option - && let Some(some) = [value, args.type_at(0)] - .into_iter() - .find(|&t| b.t.erases_to(t).undefined) - { - let msg = format!("collecting `Option<{some}>`, whose `None` is `rt.None`, which is not supported yet"); - b.t.err(span, msg); - } let value_ty = b.t.ty(value, span); // What it collects from is what `from` yields up to the first `Err` or `None`, which // std's collects in place of `from`'s source as it would `from`, but never trusts @@ -975,13 +972,19 @@ fn collect<'tcx>( name: "values".into(), ty: Some(Type::Rt("Iter", vec![value_ty])), }; - let collect = match std { - Std::Result => "iterCollectResult", - _ => "iterCollectOption", - }; let dropper = b.t.dropper(args.type_at(0), span); - let args = vec![iter, Expr::Lambda(vec![param], Box::new(values))]; - Some(Expr::rt(collect, tail(args, vec![dropper]))) + let collected = vec![iter, Expr::Lambda(vec![param], Box::new(values))]; + Some(match std { + Std::Result => Expr::rt("iterCollectResult", tail(collected, vec![dropper])), + // The items' `None`, and the result's, each `rt.None` where `undefined` is a value. + _ => { + let nones = [value, args.type_at(0)].map(|t| b.t.none(t)); + Expr::rt( + "iterCollectOption", + tail(collected, [vec![dropper], nones.into()].concat()), + ) + } + }) } // From chars or text, as `extend` of an empty one, but for an owned string's, which // the rest extend once `next` gives it. A `Cow` and a `Box` own the `String` diff --git a/ts/src/lower/library.rs b/ts/src/lower/library.rs index 292334e3e..ee6e8c4df 100644 --- a/ts/src/lower/library.rs +++ b/ts/src/lower/library.rs @@ -353,6 +353,28 @@ impl Flow { } } +/// Whether `ty` holds nothing, so its value is `undefined`: `()`, `PhantomData`, +/// `PhantomPinned`, or `..`, whose impls each compare equal and hash nothing. +pub fn nothing<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool { + match ty.kind() { + ty::Tuple(tys) => tys.is_empty(), + ty::Adt(adt, _) => { + adt.is_phantom_data() || pinned(tcx, adt.did()) || Std::of(tcx, adt.did()) == Some(Std::RangeFull) + } + _ => false, + } +} + +/// Whether `did` is `PhantomPinned`. +pub fn pinned(tcx: TyCtxt<'_>, did: DefId) -> bool { + tcx.is_diagnostic_item(rustc_span::Symbol::intern("PhantomPinned"), did) +} + +/// Whether `did` is `iter::Empty`, an `rt.Iter` that holds nothing. +pub fn empty_iter(tcx: TyCtxt<'_>, did: DefId) -> bool { + is_std(tcx, did) && std_path(tcx, did) == ["iter", "sources", "empty", "Empty"] +} + /// Whether a `ty`'s value is a JS string: a `str`, a `String`, or a `Cow`. pub fn string<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool { match ty.kind() { @@ -1248,9 +1270,9 @@ fn mapping<'tcx>( span, ) } - // Every `()` is equal, and no `!` is ever compared. + // Every value of a type holding nothing is equal, and no `!` is ever compared. ("PartialEq", "eq" | "ne") - if unwrapped(tcx, targ(gargs, 0)).is_unit() || unwrapped(tcx, targ(gargs, 0)).is_never() => + if nothing(tcx, unwrapped(tcx, targ(gargs, 0))) || unwrapped(tcx, targ(gargs, 0)).is_never() => { Expr::lit(if name == "eq" { "true" } else { "false" }) } @@ -1313,6 +1335,8 @@ fn mapping<'tcx>( ty::Adt(adt, _) if Std::of(tcx, adt.did()) == Some(Std::FromUtf8Error) => { Expr::rt("fromUtf8ErrorClone", vec![value]) } + // Another that holds nothing. + ty::Adt(adt, _) if empty_iter(tcx, adt.did()) => b.zero_sized_std(ty, Vec::new(), span).ok()?, // Through the reference, a slice of the bytes. _ if super::byte_array(ty) => Expr::rt("byteSliceToArray", vec![value]), ty::Adt(adt, _) if int_range(ty) => { @@ -2277,7 +2301,8 @@ pub fn default_value<'tcx>(b: &mut Body<'_, '_, 'tcx>, ty: Ty<'tcx>, span: Span, b.call_def(f, tcx.mk_args(&[ty.into()]), Vec::new(), span, out) }; Some(match ty.kind() { - ty::Tuple(parts) if parts.is_empty() => Expr::undefined(), + _ if nothing(tcx, ty) => Expr::undefined(), + ty::Adt(adt, _) if empty_iter(tcx, adt.did()) => b.zero_sized_std(ty, Vec::new(), span).ok()?, ty::Tuple(parts) => Expr::Array(parts.iter().map(|t| part(b, t, out)).collect()), ty::Array(elem, n) => { let n = n.try_to_target_usize(tcx)?; diff --git a/ts/src/lower/mir/mod.rs b/ts/src/lower/mir/mod.rs index 7149bec68..ab13c934f 100644 --- a/ts/src/lower/mir/mod.rs +++ b/ts/src/lower/mir/mod.rs @@ -596,7 +596,8 @@ impl<'m, 'b, 'a, 'tcx> Fx<'m, 'b, 'a, 'tcx> { Some(name) => super::camel(name.as_str()), None => format!("_{}", local.as_u32()), }; - let base = match self.uses[local] == 0 && local.as_usize() <= mir.arg_count { + let param = local.as_usize() <= mir.arg_count; + let base = match param && (self.uses[local] == 0 || !self.reads_value(local)) { // A parameter nothing reads, which `noUnusedParameters` wants marked. true if !base.starts_with('_') => format!("_{base}"), _ => base, @@ -816,6 +817,38 @@ impl<'m, 'b, 'a, 'tcx> Fx<'m, 'b, 'a, 'tcx> { } } + /// Whether anything reads `local` but for a part of it that holds nothing, whose value + /// is `undefined` wherever it is, so a mapping may leave the read out. + fn reads_value(&self, local: Local) -> bool { + use rustc_middle::mir::visit::{PlaceContext, Visitor}; + struct Reads<'a, 'tcx> { + mir: &'a mir::Body<'tcx>, + tcx: TyCtxt<'tcx>, + local: Local, + found: bool, + } + impl<'tcx> Visitor<'tcx> for Reads<'_, 'tcx> { + fn visit_place(&mut self, place: &Place<'tcx>, cx: PlaceContext, _: mir::Location) { + let nothing = !place.projection.is_empty() + && crate::lower::library::nothing(self.tcx, place.ty(&self.mir.local_decls, self.tcx).ty); + let indexes = place + .projection + .iter() + .any(|elem| elem == mir::ProjectionElem::Index(self.local)); + self.found |= + !matches!(cx, PlaceContext::NonUse(_)) && ((place.local == self.local && !nothing) || indexes); + } + } + let mut reads = Reads { + mir: self.mir, + tcx: self.tcx, + local, + found: false, + }; + reads.visit_body(self.mir); + reads.found + } + /// Whether a `ty` has no JS value: `()`, a function item, or `..`. fn zero_sized(&self, ty: Ty<'tcx>) -> bool { match ty.kind() { diff --git a/ts/src/lower/mod.rs b/ts/src/lower/mod.rs index d615f93fb..2bd2c5b90 100644 --- a/ts/src/lower/mod.rs +++ b/ts/src/lower/mod.rs @@ -1107,7 +1107,7 @@ impl<'a, 'tcx> Translator<'a, 'tcx> { } } }; - self.program.items.push(item); + self.program.items.push(unnamed_params(item)); self.drop_glue(adt, &info, span); info } @@ -1574,7 +1574,7 @@ impl<'a, 'tcx> Translator<'a, 'tcx> { return self.ty(inner, span); } // Nothing, as its value is. - if adt.is_phantom_data() { + if library::nothing(tcx, Ty::new_adt(tcx, adt, args)) { return Type::Builtin("undefined"); } // Every other iterator std has is an `rt.Iter` of its items. @@ -1716,7 +1716,7 @@ impl<'a, 'tcx> Translator<'a, 'tcx> { /// seen through the wrappers that erase to their contents. pub fn erases_to(&self, ty: Ty<'tcx>) -> Erased { match ty.kind() { - ty::Tuple(tys) if tys.is_empty() => Erased { + _ if library::nothing(self.tcx, ty) => Erased { undefined: true, ..Erased::default() }, @@ -1727,11 +1727,6 @@ impl<'a, 'tcx> Translator<'a, 'tcx> { // An `rt.Place`, which is an object. ty::Ref(..) if self.place_pointee(ty).is_some() => Erased::default(), ty::Ref(_, inner, _) => self.erases_to(*inner), - // Nothing, as `()` is. - ty::Adt(adt, _) if adt.is_phantom_data() => Erased { - undefined: true, - ..Erased::default() - }, ty::Adt(adt, args) => match library::Std::of(self.tcx, adt.did()) { Some( library::Std::Box @@ -1750,10 +1745,6 @@ impl<'a, 'tcx> Translator<'a, 'tcx> { Some(library::Std::ControlFlow) if library::Flow::of(self.tcx, args) == library::Flow::Option => { self.erases_to(args.type_at(1)).option() } - Some(library::Std::RangeFull) => Erased { - undefined: true, - ..Erased::default() - }, _ => Erased::default(), }, _ => Erased::default(), @@ -1924,6 +1915,22 @@ pub fn camel(name: &str) -> String { out } +/// `item` with each type parameter its type never names marked unused, as TS wants of +/// one only a `PhantomData` held. +fn unnamed_params(mut item: Item) -> Item { + let (params, types): (&mut Vec, Vec<&Type>) = match &mut item { + Item::Struct { params, fields, .. } => (params, fields.iter().map(|f| &f.ty).collect()), + Item::Union { params, ty, .. } => (params, vec![&*ty]), + _ => return item, + }; + for param in params.iter_mut() { + if !types.iter().any(|t| t.names(param)) { + *param = format!("_{param}"); + } + } + item +} + /// A field's property name: `camelCase`, or `_0` for a tuple field. pub fn field_name(name: &str, index: usize) -> String { match name.parse::() { diff --git a/ts/src/main.rs b/ts/src/main.rs index c7a4ced52..fb1ad4694 100644 --- a/ts/src/main.rs +++ b/ts/src/main.rs @@ -10,6 +10,7 @@ extern crate rustc_abi; extern crate rustc_ast; extern crate rustc_attr_ir; +extern crate rustc_const_eval; extern crate rustc_data_structures; extern crate rustc_driver; extern crate rustc_hashes; diff --git a/ts/src/ts.rs b/ts/src/ts.rs index 83c8522af..45f621154 100644 --- a/ts/src/ts.rs +++ b/ts/src/ts.rs @@ -453,6 +453,22 @@ pub enum Type { Object(Vec<(String, Type)>), } +impl Type { + /// Whether it names the type parameter `param`. + pub fn names(&self, param: &str) -> bool { + match self { + Type::Param(name) => name == param, + Type::Builtin(_) | Type::StrLit(_) => false, + Type::Rt(_, tys) | Type::Sym(_, tys) | Type::Union(tys) | Type::Tuple(tys) => { + tys.iter().any(|t| t.names(param)) + } + Type::Array(t) => t.names(param), + Type::Func(tys, ret) => ret.names(param) || tys.iter().any(|t| t.names(param)), + Type::Object(fields) => fields.iter().any(|(_, t)| t.names(param)), + } + } +} + #[derive(Clone, Debug)] pub struct Function { pub sym: SymId, From f3269c2015a8b0703be502bc87453b836e98f63f Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Fri, 30 Oct 2026 16:52:53 -0700 Subject: [PATCH 3/3] fix(ts): type collecting into `()` as `undefined` Co-Authored-By: Claude Opus 5.5 --- ts/fixtures/lang/expected/zeros.ts | 30 +++++++++++++++++++++++++++--- ts/fixtures/lang/src/zeros.rs | 17 +++++++++++++++-- ts/src/lower/iter.rs | 8 ++++++-- 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/ts/fixtures/lang/expected/zeros.ts b/ts/fixtures/lang/expected/zeros.ts index cdee19253..249f84928 100644 --- a/ts/fixtures/lang/expected/zeros.ts +++ b/ts/fixtures/lang/expected/zeros.ts @@ -337,8 +337,27 @@ export function impls(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void { } } +/** `Some(())` if every byte of `data` is below 0x80. */ +export function small(data: rt.ByteSlice): undefined | rt.None { + return rt.iterCollectOption(rt.iterMap(rt.iterSlice(rt.byteSliceView(data)), (_22: rt.u8): undefined | rt.None => { + return thenSome$1j8foe9(_22 < 128, undefined); + }), (values: rt.Iter) => rt.iterFold(values, undefined, () => undefined), undefined, rt.None, rt.None); +} + +/** `Ok(())`, or the first byte of `data` that is 0xff. */ +export function checked(data: rt.ByteSlice): rt.Result { + return rt.iterCollectResult(rt.iterMap(rt.iterSlice(rt.byteSliceView(data)), (_22: rt.u8): rt.Result => { + const b: rt.u8 = _22; + if (!(b === 255)) { + return rt.OK; + } + return rt.Err(b); + }), (values: rt.Iter) => rt.iterFold(values, undefined, () => undefined)); +} + /** `()` as a hash and B-tree key and as `collect::>`'s item. */ export function keys(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void { + let _148!: rt.u8; const _4: rt.u8 = rt.u8Rem(kind, 3); if (_4 === 0) { const hash: rt.HashSet = rt.hashNew() as rt.HashSet; @@ -386,9 +405,14 @@ export function keys(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void { }), (_27: undefined | rt.None): undefined => { rt.byteVecPush(out, 9); }), (values: rt.Iter) => rt.iterToArray(values, "next", 0), undefined, rt.None) !== undefined ? 1 : 0); - rt.byteVecPush(out, rt.iterCollectOption(rt.iterMap(rt.iterSlice(rt.byteSliceView(data)), (_210: rt.u8): undefined | rt.None => { - return thenSome$1j8foe9(_210 < 128, undefined); - }), (values: rt.Iter) => rt.iterForEach(values, () => undefined), undefined, rt.None, rt.None) !== rt.None ? 1 : 0); + rt.byteVecPush(out, small(data) !== rt.None ? 1 : 0); + const _149: rt.Result = checked(data); + if (_149.ok) { + _148 = 0; + } else { + _148 = _149.error; + } + rt.byteVecPush(out, _148); } } diff --git a/ts/fixtures/lang/src/zeros.rs b/ts/fixtures/lang/src/zeros.rs index fbf031fcd..47936e28e 100644 --- a/ts/fixtures/lang/src/zeros.rs +++ b/ts/fixtures/lang/src/zeros.rs @@ -290,6 +290,16 @@ pub fn impls(kind: u8, data: &[u8], out: &mut Vec) { } } +/// `Some(())` if every byte of `data` is below 0x80. +fn small(data: &[u8]) -> Option<()> { + data.iter().map(|&b| (b < 0x80).then_some(())).collect() +} + +/// `Ok(())`, or the first byte of `data` that is 0xff. +fn checked(data: &[u8]) -> Result<(), u8> { + data.iter().map(|&b| if b == 0xff { Err(b) } else { Ok(()) }).collect() +} + /// `()` as a hash and B-tree key and as `collect::>`'s item. pub fn keys(kind: u8, data: &[u8], out: &mut Vec) { match kind % 3 { @@ -332,8 +342,11 @@ pub fn keys(kind: u8, data: &[u8], out: &mut Vec) { .inspect(|_| out.push(9)) .collect::>>(); out.push(u8::from(count.is_some())); - let all: Option<()> = data.iter().map(|&b| (b < 0x80).then_some(())).collect(); - out.push(u8::from(all.is_some())); + out.push(u8::from(small(data).is_some())); + out.push(match checked(data) { + Ok(()) => 0, + Err(b) => b, + }); } } } diff --git a/ts/src/lower/iter.rs b/ts/src/lower/iter.rs index 039387cc4..8882e2e70 100644 --- a/ts/src/lower/iter.rs +++ b/ts/src/lower/iter.rs @@ -947,11 +947,15 @@ fn collect<'tcx>( span: Span, ) -> Option { let tcx = b.t.tcx; - // `()`'s reads every item, each a `()` too, by `for_each`. + // `()`'s reads every item, each a `()` too, by `for_each`, which folds: from `undefined`, + // so the result is typed as `()` is. if ty.is_unit() { let drops = iter_drops(b, from, span); let each = Expr::Lambda(Vec::new(), Box::new(Expr::undefined())); - return Some(Expr::rt("iterForEach", tail(vec![iter, each], vec![drops]))); + return Some(Expr::rt( + "iterFold", + tail(vec![iter, Expr::undefined(), each], vec![drops]), + )); } let ty::Adt(adt, args) = ty.kind() else { return None;