diff --git a/quest/m3/README.md b/quest/m3/README.md index 36039e942..eee38e6ce 100644 --- a/quest/m3/README.md +++ b/quest/m3/README.md @@ -28,7 +28,8 @@ generic std gap is planned here even when moq never calls it. - [References to byte arrays std takes](/quest/m3/ts-byte-refs-taken.md) - `extend` by references to arrays, adaptors' closures over held arrays, and a collection of both forms translate - [Waiting: a slice object for a mutable part of other values](/quest/m3/ts-slice-object.md) - waits on a moq profile showing the `Proxy` view's traps matter, then decides on an `rt.ByteSlice`-like form - [Port the workflow guard to kixelated/quest](/quest/m3/quest-workflow-guard.md) - quest's environment guard parses YAML as this repository's does -- [Equality through a held type's own ne](/quest/m3/ts-eq-own-ne.md) - `==` of slices of a type whose `ne` the crate overrides, and `!=` of a tuple or `Arc` of one, translate +- [Equality of Cell and RefCell](/quest/m3/ts-eq-cells.md) - `==` and `!=` of `Cell`s and `RefCell`s translate +- [Cow of a slice, and Wrapping](/quest/m3/ts-cow-slices.md) - `Cow<[T]>` and `Wrapping` translate, `PartialEq` included - [std iterators' Debug](/quest/m3/ts-iter-debug.md) - `{:?}` of std's iterators translates, writing std's text, a deque's two slices included - [LinkedList](/quest/m3/ts-linked-list.md) - `LinkedList` and its methods translate - [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 diff --git a/quest/m3/ts-cow-slices.md b/quest/m3/ts-cow-slices.md new file mode 100644 index 000000000..43de1a9a9 --- /dev/null +++ b/quest/m3/ts-cow-slices.md @@ -0,0 +1,14 @@ +# [M] Cow of a slice, and Wrapping + +## Goal + +[rust2-ts](/ts/README.md) translates `Cow<[T]>` and `Wrapping` and their std impls, +`PartialEq` included, proven by differential tests against native Rust. + +## Plan + +Found auditing std's `PartialEq` impls that forward `ne`: constructing a `Cow<[T]>` +refuses, as `Cow` does not, and any `Wrapping` refuses as an unsupported type from +another crate. No consumer uses either yet; they are planned here as part of std. A +`Cow`'s and a `Wrapping`'s `ne` are `!eq`, though a `Cow<[T]>`'s `eq` still calls each +item's `ne`. diff --git a/quest/m3/ts-eq-cells.md b/quest/m3/ts-eq-cells.md new file mode 100644 index 000000000..80b7a5f54 --- /dev/null +++ b/quest/m3/ts-eq-cells.md @@ -0,0 +1,15 @@ +# [S] Equality of Cell and RefCell + +## Goal + +[rust2-ts](/ts/README.md) translates `==` and `!=` of `Cell`s and `RefCell`s, proven by +differential tests against native Rust, a `RefCell` mutably borrowed while compared +included. + +## Plan + +Found auditing std's `PartialEq` impls that forward `ne`: both types translate, but +` as PartialEq>::eq` and ` as PartialEq>::eq` refuse as an +unsupported call. std's compare what they hold by `eq`, and their `ne` is `!eq`, even +where the held type overrides `ne`; a `RefCell`'s borrows each side and panics if either +is mutably borrowed. diff --git a/quest/m3/ts-eq-own-ne.md b/quest/m3/ts-eq-own-ne.md deleted file mode 100644 index 356b06cb9..000000000 --- a/quest/m3/ts-eq-own-ne.md +++ /dev/null @@ -1,16 +0,0 @@ -# [S] Equality through a held type's own ne - -## Goal - -`==` of slices, `Vec`s, and `VecDeque`s of a crate's type whose `PartialEq` overrides `ne`, -and `!=` of a tuple or an `Arc` holding one, translate, proven by a differential test -against native Rust. - -## Plan - -Refused today with "through a held type's own" at the comparison's span: the runtime's -`eqSlice`, `eqTuple`, and `eqArc` compare by `eq`, where std's slices call each item's -`ne`, and a tuple's and an `Arc`'s `ne` call what they hold's. Items of unlike types -already compare by `!ne` through the crate's impl (`item_eq` in the collections -lowering); items of one type could do the same, and a tuple's or `Arc`'s `ne` could -lower by its fields' `ne`. diff --git a/ts/README.md b/ts/README.md index 6c57e022f..8f5f8c565 100644 --- a/ts/README.md +++ b/ts/README.md @@ -303,7 +303,8 @@ other elements, order by their elements and then their length, and compare and h whatever their form, so a map of `Vec` finds a `&[u8]` and one of `[u16; 2]` a `&[u16]`. Slices, arrays, `Vec`s, and `VecDeque`s compare against each other as std's do, by their lengths and then each pair of items in order, through the -items' own `PartialEq`, and its `ne` where the crate overrides it. A collection's reference to a byte array it holds, as `keys`, +items' own `PartialEq`, and its `ne` where the crate overrides it, which a tuple's and +an `Arc`'s `!=` call as well. A collection's reference to a byte array it holds, as `keys`, `HashSet::get`, and `retain`'s closure get one, is an `rt.ByteSlice` of its bytes, as a `&[u8; N]` is elsewhere; a `&mut` writes where the collection holds them. A `&mut` to a value a map holds that JS copies, such as a number, from `get_mut` or the entry API, is an `rt.Place` whose `v` reads and @@ -700,8 +701,8 @@ built natively for wasm32 and run beside its translation on the same inputs by closures that log what each adaptor reads, `Option`'s and `Result`'s combinators, with closures that log each call, and std's collections, over keys whose own `Hash`, `Eq`, and `Ord` - disagree with JS's, sequences compared across forms and item types by an `eq` and `ne` - that disagree, `vec![x; n]` of types whose `Clone` counts its clones, `&mut` + disagree with JS's, sequences, tuples, and `Arc`s compared across forms and item types by an + `eq` and `ne` that disagree, `vec![x; n]` of types whose `Clone` counts its clones, `&mut` to values JS copies, of locals, fields, elements, and a map's values, passed on, returned, kept in a struct, and captured, a `Vec`'s edits and sorts, with closures that log what each is called with, std's `Bound`, `Reverse`, and `NonZero`, and raw diff --git a/ts/fixtures/lang/caller.ts b/ts/fixtures/lang/caller.ts index a564143b8..6996d31d6 100644 --- a/ts/fixtures/lang/caller.ts +++ b/ts/fixtures/lang/caller.ts @@ -554,4 +554,8 @@ const unlikeEqs = [[], [5], [1, 2], [0, 7, 2, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3]].f Array.from({ length: 128 }, (_, kind) => Uint8Array.of(unlikeEqsOp, kind, ...bytes)), ); -export const cases: Uint8Array[] = [...loops, ...durations, ...ints(), ...utf8, ...floats, ...formats, ...parsed, ...singlesCases, ...singlesFormats, ...singlesParsed, ...dyns, ...cells, ...shared, ...locks, ...onces, ...bounds, ...unsafeCells, ...edits, ...subslices, ...consumers, ...closures, ...elements, ...ranges, ...reducers, ...sliceEdits, ...drains, ...iters, ...hinted, ...peekedOthers, ...hints, ...reserves, ...setOps, ...zeros, ...floatsMulAdds, ...singlesMulAdds, ...unlikeEqs]; +/** `collections::own_nes` of the same positions, lengths, and items as `unlike_eqs`. */ +const ownNesOp = op("collections::own_nes"); +const ownNes = unlikeEqs.map((input) => Uint8Array.of(ownNesOp, ...input.subarray(1))); + +export const cases: Uint8Array[] = [...loops, ...durations, ...ints(), ...utf8, ...floats, ...formats, ...parsed, ...singlesCases, ...singlesFormats, ...singlesParsed, ...dyns, ...cells, ...shared, ...locks, ...onces, ...bounds, ...unsafeCells, ...edits, ...subslices, ...consumers, ...closures, ...elements, ...ranges, ...reducers, ...sliceEdits, ...drains, ...iters, ...hinted, ...peekedOthers, ...hints, ...reserves, ...setOps, ...zeros, ...floatsMulAdds, ...singlesMulAdds, ...unlikeEqs, ...ownNes]; diff --git a/ts/fixtures/lang/expected/collections.Picky.ts b/ts/fixtures/lang/expected/collections.Picky.ts new file mode 100644 index 000000000..a870829b7 --- /dev/null +++ b/ts/fixtures/lang/expected/collections.Picky.ts @@ -0,0 +1,32 @@ +// Generated by rust2-ts. Do not edit. + +import * as rt from "./rt.ts"; + +export function clone$Clone(self: Picky): Picky { + return { _0: self._0, _1: self._1 }; +} + +/** + * An item whose `ne` sees the remainder by 3 where its `eq` sees it by 4, so what `==` and + * `!=` find tells which std calls. Each call adds to the log, in order. + */ +export interface Picky { + _0: rt.u16; + _1: rt.Cell; +} + +export function log(self: Picky, other: Picky, by: rt.u16): void { + rt.cellSet(self._1, rt.u16WrappingAdd(rt.u16WrappingMul(self._1.v, 31), self._0 ^ ((other._0 << 4) & 0xffff) ^ by)); +} + +export function eq$PartialEq(self: Picky, other: Picky): boolean { + log(self, other, 256); + return rt.u16Rem(self._0, 4) === rt.u16Rem(other._0, 4); +} + +export function ne$PartialEq(self: Picky, other: Picky): boolean { + log(self, other, 512); + return rt.u16Rem(self._0, 3) !== rt.u16Rem(other._0, 3); +} + +//# sourceMappingURL=collections.Picky.ts.map diff --git a/ts/fixtures/lang/expected/collections.ts b/ts/fixtures/lang/expected/collections.ts index 3539eabcd..69f377321 100644 --- a/ts/fixtures/lang/expected/collections.ts +++ b/ts/fixtures/lang/expected/collections.ts @@ -1,7 +1,7 @@ // Generated by rust2-ts. Do not edit. import * as rt from "./rt.ts"; -import { copy$Bumped, copy$Option_Tally, copy$Tally, copy$Wrap_u8, copy$u8_Tally, copy$u8_u16, copy$u8_u16s, copy$u8_u8, copy$u8_u8s, copy$u8s } from "./lib.ts"; +import { copy$Bumped, copy$Option_Tally, copy$Tally, copy$Wrap_u8, copy$u8_Tally, copy$u8_u16, copy$u8_u16s, copy$u8_u8, copy$u8_u8s, copy$u8s, drop$Arc_Picky_u8 } from "./lib.ts"; import * as Clash from "./collections.Clash.ts"; import * as Cloned from "./collections.Cloned.ts"; import * as Dir from "./collections.Dir.ts"; @@ -11,11 +11,12 @@ import * as Left from "./collections.Left.ts"; import * as Nibble from "./collections.Nibble.ts"; import * as Odd from "./collections.Odd.ts"; import * as Pair from "./collections.Pair.ts"; +import * as Picky from "./collections.Picky.ts"; import * as Rank from "./collections.Rank.ts"; import * as Right from "./collections.Right.ts"; import * as Tally from "./collections.Tally.ts"; import { thenSome$0d5am30 } from "./core/bool.ts"; -import { unwrapOr$1j4op5y, unwrapOr$0r2bmpr, map$09ua5et, map$0oc32h1, mapOr$0q0ymkh, mapOr$1xztl8h, mapOr$1to2ul4, mapOr$1ht002r, mapOr$099335t, mapOr$0z4mj8g, mapOr$1surhce, mapOr$0mmpeqx, mapOr$1nlkf9b, mapOr$1t0muvr, mapOr$1w1gbwl, mapOr$02k4ito, clone$14nprly, flatten$1nwzx42 } from "./core/option.ts"; +import { unwrapOr$1j4op5y, unwrapOr$0r2bmpr, map$09ua5et, map$0oc32h1, mapOr$0q0ymkh, mapOr$1xztl8h, mapOr$0bnr5nu, mapOr$1to2ul4, mapOr$1ht002r, mapOr$099335t, mapOr$0z4mj8g, mapOr$1surhce, mapOr$0mmpeqx, mapOr$1nlkf9b, mapOr$1t0muvr, mapOr$1w1gbwl, mapOr$02k4ito, clone$14nprly, flatten$1nwzx42 } from "./core/option.ts"; import * as Wrap from "./generics.Wrap.ts"; import * as Bumped from "./iters.Bumped.ts"; @@ -3781,4 +3782,329 @@ export function unlikeEqs(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): voi rt.byteVecPush(out, rt.iterCount(it2) & 0xff); } +/** + * `v` in a deque wrapped around its buffer: the first half pushed to the front backwards, + * the rest to the back. + */ +export function wrapped$Picky(v: Picky.Picky[]): rt.VecDeque { + const half: rt.usize = rt.usizeDiv(v.length, 2); + const q: rt.VecDeque = rt.dequeNew() as rt.VecDeque; + const iter: rt.Iter = rt.iterRev(rt.iterSlice(rt.sliceRange(v, 0, half))); + while (true) { + const _12: Picky.Picky | rt.Done = iter.next(); + if (_12 === rt.DONE) { + break; + } + const _18: Picky.Picky = Picky.clone$Clone(_12); + rt.dequePushFront(q, _18); + } + const _21: rt.Iter = rt.iterMap(rt.iterSlice(rt.sliceRange(v, half)), Picky.clone$Clone); + rt.dequeExtend(q, _21, undefined, 8, true); + return q; +} + +/** `f` of each of `v`. */ +export function each$Picky_Arc_Picky_own_nes_closure16(v: Picky.Picky[], f: (a0: Picky.Picky) => rt.Arc): rt.Arc[] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 4, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Arc_Picky_own_nes_closure17(v: Picky.Picky[], f: (a0: Picky.Picky) => rt.Arc): rt.Arc[] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 4, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Box_Picky_own_nes_closure14(v: Picky.Picky[], f: (a0: Picky.Picky) => Picky.Picky): Picky.Picky[] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 4, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Box_Picky_own_nes_closure15(v: Picky.Picky[], f: (a0: Picky.Picky) => Picky.Picky): Picky.Picky[] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 4, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Option_Picky_own_nes_closure10(v: Picky.Picky[], f: (a0: Picky.Picky) => Picky.Picky | undefined): Array { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 8, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Option_Picky_own_nes_closure11(v: Picky.Picky[], f: (a0: Picky.Picky) => Picky.Picky | undefined): Array { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 8, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Picky_u8_own_nes_closure6(v: Picky.Picky[], f: (a0: Picky.Picky) => [Picky.Picky, rt.u8]): [Picky.Picky, rt.u8][] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 12, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Picky_u8_own_nes_closure7(v: Picky.Picky[], f: (a0: Picky.Picky) => [Picky.Picky, rt.u8]): [Picky.Picky, rt.u8][] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 12, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Picky_u8_own_nes_closure8(v: Picky.Picky[], f: (a0: Picky.Picky) => [Picky.Picky, rt.u8]): [Picky.Picky, rt.u8][] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 12, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Picky_u8_own_nes_closure9(v: Picky.Picky[], f: (a0: Picky.Picky) => [Picky.Picky, rt.u8]): [Picky.Picky, rt.u8][] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 12, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Reverse_Picky_own_nes_closure12(v: Picky.Picky[], f: (a0: Picky.Picky) => Picky.Picky): Picky.Picky[] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 8, true); +} + +/** `f` of each of `v`. */ +export function each$Picky_Reverse_Picky_own_nes_closure13(v: Picky.Picky[], f: (a0: Picky.Picky) => Picky.Picky): Picky.Picky[] { + return rt.iterToArray(rt.iterMap(rt.iterSlice(v), f), undefined, 8, true); +} + +/** + * `==` and `!=` of what holds a `Picky`, whose `ne` std's of tuples, `Arc`s, `Rc`s, and + * `Box`es call, and std's `==` of slices calls of each item, but which an `Option`'s and + * a `Reverse`'s `ne`, as `!eq`, does not: of unequal lengths, empty, nested, and with + * items `eq` and `ne` disagree on at the positions `kind` picks. + */ +export function ownNes(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void { + const _34: (a0: Picky.Picky[], a1: rt.usize) => rt.u16 = (v: Picky.Picky[], i: rt.usize): rt.u16 => { + return mapOr$0bnr5nu(rt.sliceGet(v, i), 0, (p: Picky.Picky): rt.u16 => { + return p._0; + }); + }; + const log: rt.Cell = new rt.Cell(0); + const _7: [rt.usize, rt.usize] = [(kind & 7) as rt.usize, ((kind >> 3) & 7) as rt.usize]; + const byNe: rt.usize = _7[0]; + const byEq: rt.usize = _7[1]; + const step: (a0: rt.usize) => rt.u16 = (i2: rt.usize): rt.u16 => { + if (!(i2 === byEq)) { + if (!(i2 === byNe)) { + return 12; + } + return 4; + } + return 3; + }; + const a: Picky.Picky[] = rt.iterToArray(rt.iterMap(rt.iterSlice(rt.byteSliceView(data)), (_2: rt.u8): Picky.Picky => { + return { _0: _2 as rt.u16, _1: log }; + }), undefined, 8, true); + const b: Picky.Picky[] = rt.iterToArray(rt.iterMap(rt.iterEnumerate(rt.iterSlice(rt.byteSliceView(data))), (_22: [rt.usize, rt.u8]): Picky.Picky => { + return { _0: rt.u16Add(_22[1] as rt.u16, step(_22[0])), _1: log }; + }), undefined, 8, true); + if ((kind & 64) !== 0) { + b.pop(); + } + const one: (a0: Picky.Picky[], a1: rt.usize) => Picky.Picky = (v2: Picky.Picky[], i4: rt.usize): Picky.Picky => { + return { _0: _34(v2, i4), _1: log }; + }; + putEq(rt.eqSlice((a2: Picky.Picky, b2: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a2, b2); + })(a, b), log, out); + putEq(!rt.eqSlice((a3: Picky.Picky, b3: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a3, b3); + })(a, b), log, out); + const _50: Picky.Picky[] = rt.sliceRange(a, 0); + const _52: Picky.Picky[] = rt.sliceRange(b, 0); + putEq(rt.eqSlice((a4: Picky.Picky, b4: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a4, b4); + })(_50, _52), log, out); + const _59: Picky.Picky[] = rt.sliceRange(a, 0); + const _63: Picky.Picky[] = rt.sliceRange(b, 0); + putEq(!rt.eqSlice((a5: Picky.Picky, b5: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a5, b5); + })(_59, _63), log, out); + const _69: Picky.Picky[] = []; + const _71: Picky.Picky[] = []; + putEq(rt.eqSlice((a6: Picky.Picky, b6: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a6, b6); + })(_69, _71), log, out); + const _76: Picky.Picky[] = []; + putEq(!rt.eqSlice((a7: Picky.Picky, b7: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a7, b7); + })(_76, b), log, out); + const _81: [Picky.Picky[], Picky.Picky[]] = [[one(a, 0), one(a, 1)], [one(b, 0), one(b, 1)]]; + const pa: Picky.Picky[] = _81[0]; + const pb: Picky.Picky[] = _81[1]; + putEq(rt.eqSlice((a8: Picky.Picky, b8: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a8, b8); + })(pa, pb), log, out); + putEq(!rt.eqSlice((a9: Picky.Picky, b9: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a9, b9); + })(pa, pb), log, out); + const _117: Picky.Picky[] = rt.sliceRange(b, 0); + putEq(rt.eqSlice((a10: Picky.Picky, b10: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a10, b10); + })(pa, _117), log, out); + const _123: Picky.Picky[][] = [a.map(Picky.clone$Clone), a.map(Picky.clone$Clone)]; + const _130: Picky.Picky[][] = [a.map(Picky.clone$Clone), b.map(Picky.clone$Clone)]; + putEq(rt.eqSlice(rt.eqSlice((a11: Picky.Picky, b11: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a11, b11); + }))(_123, _130), log, out); + const _139: Picky.Picky[][] = [a.map(Picky.clone$Clone), b.map(Picky.clone$Clone)]; + const _146: Picky.Picky[][] = [a.map(Picky.clone$Clone), a.map(Picky.clone$Clone)]; + putEq(!rt.eqSlice(rt.eqSlice((a20: Picky.Picky, b12: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a20, b12); + }))(_139, _146), log, out); + const tuple: (a0: Picky.Picky[]) => [Picky.Picky, rt.u8, Picky.Picky] = (v3: Picky.Picky[]): [Picky.Picky, rt.u8, Picky.Picky] => { + return [one(v3, 0), _34(v3, 2) & 0xff, one(v3, 1)] as [Picky.Picky, rt.u8, Picky.Picky]; + }; + const _158: [Picky.Picky, rt.u8, Picky.Picky] = tuple(a); + const _164: [Picky.Picky, rt.u8, Picky.Picky] = tuple(b); + putEq(!rt.eqTuple([(a21: Picky.Picky, b13: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a21, b13); + }, rt.same, (a22: Picky.Picky, b14: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a22, b14); + }])(_158, _164), log, out); + const _173: [Picky.Picky, rt.u8, Picky.Picky] = tuple(a); + const _179: [Picky.Picky, rt.u8, Picky.Picky] = tuple(b); + putEq(rt.eqTuple([Picky.eq$PartialEq, rt.same, Picky.eq$PartialEq])(_173, _179), log, out); + const _188: [[Picky.Picky, rt.u8, Picky.Picky], rt.u8] = [tuple(a), 1]; + const _195: [[Picky.Picky, rt.u8, Picky.Picky], rt.u8] = [tuple(b), 1]; + putEq(!rt.eqTuple([rt.eqTuple([(a23: Picky.Picky, b15: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a23, b15); + }, rt.same, (a24: Picky.Picky, b16: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a24, b16); + }]), rt.same])(_188, _195), log, out); + const _205: [Picky.Picky, rt.u8][] = each$Picky_Picky_u8_own_nes_closure6(a, (p2: Picky.Picky): [Picky.Picky, rt.u8] => { + return [Picky.clone$Clone(p2), p2._0 & 0xff] as [Picky.Picky, rt.u8]; + }); + const _209: [Picky.Picky, rt.u8][] = each$Picky_Picky_u8_own_nes_closure7(b, (p3: Picky.Picky): [Picky.Picky, rt.u8] => { + return [Picky.clone$Clone(p3), p3._0 & 0xff] as [Picky.Picky, rt.u8]; + }); + putEq(rt.eqSlice(rt.eqTuple([(a25: Picky.Picky, b17: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a25, b17); + }, rt.same]))(_205, _209), log, out); + const _217: [Picky.Picky, rt.u8][] = rt.sliceRange(each$Picky_Picky_u8_own_nes_closure8(a, (p4: Picky.Picky): [Picky.Picky, rt.u8] => { + return [Picky.clone$Clone(p4), p4._0 & 0xff] as [Picky.Picky, rt.u8]; + }), 0); + const _224: [Picky.Picky, rt.u8][] = rt.sliceRange(each$Picky_Picky_u8_own_nes_closure9(b, (p5: Picky.Picky): [Picky.Picky, rt.u8] => { + return [Picky.clone$Clone(p5), p5._0 & 0xff] as [Picky.Picky, rt.u8]; + }), 0); + putEq(!rt.eqSlice(rt.eqTuple([(a26: Picky.Picky, b18: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a26, b18); + }, rt.same]))(_217, _224), log, out); + const _233: [Picky.Picky | undefined] = [one(a, 0)]; + const _241: [Picky.Picky | undefined] = [one(b, 0)]; + putEq(!rt.eqTuple([rt.eqOption(Picky.eq$PartialEq)])(_233, _241), log, out); + const _252: [Picky.Picky] = [one(a, 0)]; + const _260: [Picky.Picky] = [one(b, 0)]; + putEq(!rt.eqTuple([Picky.eq$PartialEq])(_252, _260), log, out); + const _271: [Picky.Picky] = [one(a, 0)]; + const _279: [Picky.Picky] = [one(b, 0)]; + putEq(!rt.eqTuple([(a27: Picky.Picky, b19: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a27, b19); + }])(_271, _279), log, out); + const _290: [Picky.Picky] = [one(a, 0)]; + const _298: [Picky.Picky] = [one(b, 0)]; + putEq(!rt.eqTuple([(a28: Picky.Picky, b20: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a28, b20); + }])(_290, _298), log, out); + const _309: Array = each$Picky_Option_Picky_own_nes_closure10(a, (p6: Picky.Picky): Picky.Picky | undefined => { + return Picky.clone$Clone(p6); + }); + const _313: Array = each$Picky_Option_Picky_own_nes_closure11(b, (p7: Picky.Picky): Picky.Picky | undefined => { + return Picky.clone$Clone(p7); + }); + putEq(rt.eqSlice(rt.eqOption(Picky.eq$PartialEq))(_309, _313), log, out); + const _320: Picky.Picky[] = each$Picky_Reverse_Picky_own_nes_closure12(a, (p8: Picky.Picky): Picky.Picky => { + return Picky.clone$Clone(p8); + }); + const _324: Picky.Picky[] = each$Picky_Reverse_Picky_own_nes_closure13(b, (p9: Picky.Picky): Picky.Picky => { + return Picky.clone$Clone(p9); + }); + putEq(rt.eqSlice(Picky.eq$PartialEq)(_320, _324), log, out); + const _331: Picky.Picky[] = each$Picky_Box_Picky_own_nes_closure14(a, (p10: Picky.Picky): Picky.Picky => { + return Picky.clone$Clone(p10); + }); + const _335: Picky.Picky[] = each$Picky_Box_Picky_own_nes_closure15(b, (p11: Picky.Picky): Picky.Picky => { + return Picky.clone$Clone(p11); + }); + putEq(rt.eqSlice((a29: Picky.Picky, b21: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a29, b21); + })(_331, _335), log, out); + const arc: rt.Arc = new rt.Arc(one(a, 0)); + const _349: rt.Arc = rt.arcClone(arc); + putEq(!rt.eqArc((a30: Picky.Picky, b22: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a30, b22); + }, true)(arc, _349), log, out); + _349[Symbol.dispose](); + const _356: rt.Arc = rt.arcClone(arc); + putEq(rt.eqArc(Picky.eq$PartialEq, true)(arc, _356), log, out); + _356[Symbol.dispose](); + const _362: rt.Arc = new rt.Arc(one(a, 0)); + const _369: rt.Arc = new rt.Arc(one(b, 0)); + putEq(!rt.eqArc((a31: Picky.Picky, b23: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a31, b23); + }, true)(_362, _369), log, out); + _369[Symbol.dispose](); + _362[Symbol.dispose](); + const floated: rt.Arc<[Picky.Picky, rt.f32]> = new rt.Arc([one(a, 0), 0.5] as [Picky.Picky, rt.f32]); + const _387: rt.Arc<[Picky.Picky, rt.f32]> = rt.arcClone(floated); + putEq(!rt.eqArc(rt.eqTuple([(a32: Picky.Picky, b24: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a32, b24); + }, rt.same]))(floated, _387), log, out); + _387[Symbol.dispose](); + const _394: rt.Arc<[Picky.Picky, rt.f32]> = new rt.Arc([one(b, 0), 0.5] as [Picky.Picky, rt.f32]); + putEq(!rt.eqArc(rt.eqTuple([(a33: Picky.Picky, b25: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a33, b25); + }, rt.same]))(floated, _394), log, out); + _394[Symbol.dispose](); + const _405: rt.Arc = new rt.Arc(one(a, 1)); + const _412: rt.Arc = new rt.Arc(one(b, 1)); + putEq(!rt.eqArc((a34: Picky.Picky, b26: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a34, b26); + }, true)(_405, _412), log, out); + _412[Symbol.dispose](); + _405[Symbol.dispose](); + const shared: rt.Arc[] = each$Picky_Arc_Picky_own_nes_closure16(a, (p12: Picky.Picky): rt.Arc => { + return new rt.Arc(Picky.clone$Clone(p12)); + }); + const _426: rt.Arc[] = shared.map((a041: rt.Arc): rt.Arc => { + return rt.arcClone(a041); + }); + putEq(rt.eqSlice(rt.eqArc((a35: Picky.Picky, b27: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a35, b27); + }, true))(shared, _426), log, out); + rt.dropAll(_426); + const _433: rt.Arc[] = each$Picky_Arc_Picky_own_nes_closure17(b, (p13: Picky.Picky): rt.Arc => { + return new rt.Arc(Picky.clone$Clone(p13)); + }); + putEq(rt.eqSlice(rt.eqArc((a36: Picky.Picky, b28: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a36, b28); + }, true))(shared, _433), log, out); + rt.dropAll(_433); + const _440: [rt.Arc, rt.u8] = [rt.arcClone(arc), 0]; + const _444: [rt.Arc, rt.u8] = [new rt.Arc(one(b, 0)), 0]; + putEq(!rt.eqTuple([rt.eqArc((a37: Picky.Picky, b29: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a37, b29); + }, true), rt.same])(_440, _444), log, out); + drop$Arc_Picky_u8(_444); + drop$Arc_Picky_u8(_440); + const _455: rt.VecDeque = wrapped$Picky(a); + const _459: rt.VecDeque = wrapped$Picky(b); + putEq(rt.eqSeq((a38: Picky.Picky, b30: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a38, b30); + })(_455, _459), log, out); + const _466: rt.VecDeque = wrapped$Picky(a); + const _470: rt.VecDeque = wrapped$Picky(b); + putEq(!rt.eqSeq((a39: Picky.Picky, b31: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a39, b31); + })(_466, _470), log, out); + const _477: rt.VecDeque = wrapped$Picky(a); + putEq(rt.eqSeq((a40: Picky.Picky, b32: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a40, b32); + })(_477, b), log, out); + const _485: rt.VecDeque = wrapped$Picky(a); + const _490: Picky.Picky[] = rt.sliceRange(b, 0); + putEq(rt.eqSeq((a41: Picky.Picky, b33: Picky.Picky): boolean => { + return !Picky.ne$PartialEq(a41, b33); + })(_485, _490), log, out); + rt.dropAll(shared); + floated[Symbol.dispose](); + arc[Symbol.dispose](); +} + //# sourceMappingURL=collections.ts.map diff --git a/ts/fixtures/lang/expected/core/option.ts b/ts/fixtures/lang/expected/core/option.ts index c76d85f62..ea949c049 100644 --- a/ts/fixtures/lang/expected/core/option.ts +++ b/ts/fixtures/lang/expected/core/option.ts @@ -4,6 +4,7 @@ import * as rt from "../rt.ts"; import type * as Noisy from "../borrows.Noisy.ts"; import type * as Item from "../bounds.Item.ts"; import type * as Nibble from "../collections.Nibble.ts"; +import type * as Picky from "../collections.Picky.ts"; import type * as Rank from "../collections.Rank.ts"; import type * as Tally from "../collections.Tally.ts"; import type * as ArcNode from "../counts.ArcNode.ts"; @@ -700,6 +701,13 @@ export function mapOr$1w5qtj7(self: undefined | rt.None, default_: rt.u8, f: (a0 return f(self); } +export function mapOr$0bnr5nu(self: Picky.Picky | undefined, default_: rt.u16, f: (a0: Picky.Picky) => rt.u16): rt.u16 { + if (self === undefined) { + return default_; + } + return f(self); +} + export function mapOr$0rtdylj(self: Point.Point | undefined, default_: rt.u8, f: (a0: Point.Point) => rt.u8): rt.u8 { if (self === undefined) { return default_; diff --git a/ts/fixtures/lang/expected/harness.ts b/ts/fixtures/lang/expected/harness.ts index 841bb3215..204dd4e99 100644 --- a/ts/fixtures/lang/expected/harness.ts +++ b/ts/fixtures/lang/expected/harness.ts @@ -9,7 +9,7 @@ import { captures } from "./captures.ts"; import { cells } from "./cells.ts"; import { chars } from "./chars.ts"; import { chunks } from "./chunks.ts"; -import { hashMaps, sets, btreeMaps, deques, vecs, stores, optionals, setOps, unlikeEqs } from "./collections.ts"; +import { hashMaps, sets, btreeMaps, deques, vecs, stores, optionals, setOps, unlikeEqs, ownNes } from "./collections.ts"; import { combinators } from "./combinators.ts"; import { arcs, clonedArcs, cyclicArcs, uniqueArcs, clonedRcs, cyclicRcs, rcs, uniqueRcs, copies } from "./counts.ts"; import { cows } from "./cows.ts"; @@ -194,7 +194,7 @@ export function cases(): [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) 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], ["fmt::collections", (_2171: rt.u8, data71: rt.ByteSlice, out72: rt.ByteVec): undefined => { collections(data71, out72); - }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::unlike_eqs", unlikeEqs 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], ["keys::arrays", arrays as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::zips", zips as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::zips_back", zipsBack 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], ["collections::unlike_eqs", unlikeEqs 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], ["keys::arrays", arrays as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::zips", zips as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::zips_back", zipsBack as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::own_nes", ownNes 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/lib.ts b/ts/fixtures/lang/expected/lib.ts index 3775161e7..1f52b43ed 100644 --- a/ts/fixtures/lang/expected/lib.ts +++ b/ts/fixtures/lang/expected/lib.ts @@ -1,6 +1,7 @@ // Generated by rust2-ts. Do not edit. import * as rt from "./rt.ts"; +import type * as Picky from "./collections.Picky.ts"; import type * as Tally from "./collections.Tally.ts"; import type * as Any from "./core/any.Any.ts"; import type * as ArcReleasing from "./counts.ArcReleasing.ts"; @@ -338,6 +339,10 @@ export function copy$units(v: undefined[]): undefined[] { return v.slice(); } +export function drop$Arc_Picky_u8(_1: [rt.Arc, rt.u8]): void { + _1[0][Symbol.dispose](); +} + export function drop$List_Arc_u8(_1: List.List>): void { List.drop$Drop_Arc_u8(_1); } diff --git a/ts/fixtures/lang/src/collections.rs b/ts/fixtures/lang/src/collections.rs index 5dfa50662..d6d64c5f3 100644 --- a/ts/fixtures/lang/src/collections.rs +++ b/ts/fixtures/lang/src/collections.rs @@ -1353,3 +1353,143 @@ pub fn unlike_eqs(kind: u8, data: &[u8], out: &mut Vec) { put_eq(it.next_if_eq(&stepped).is_some(), &log, out); out.push(it.count() as u8); } + +/// `v` in a deque wrapped around its buffer: the first half pushed to the front backwards, +/// the rest to the back. +fn wrapped(v: &[T]) -> VecDeque { + let half = v.len() / 2; + let mut q = VecDeque::new(); + for item in v[..half].iter().rev() { + q.push_front(item.clone()); + } + q.extend(v[half..].iter().cloned()); + q +} + +/// `f` of each of `v`. +fn each(v: &[T], f: impl Fn(&T) -> U) -> Vec { + v.iter().map(f).collect() +} + +/// An item whose `ne` sees the remainder by 3 where its `eq` sees it by 4, so what `==` and +/// `!=` find tells which std calls. Each call adds to the log, in order. +#[derive(Clone)] +struct Picky<'a>(u16, &'a std::cell::Cell); + +impl Picky<'_> { + fn log(&self, other: &Self, by: u16) { + self.1 + .set(self.1.get().wrapping_mul(31).wrapping_add(self.0 ^ other.0 << 4 ^ by)); + } +} + +impl PartialEq for Picky<'_> { + fn eq(&self, other: &Self) -> bool { + self.log(other, 0x100); + self.0 % 4 == other.0 % 4 + } + + fn ne(&self, other: &Self) -> bool { + self.log(other, 0x200); + self.0 % 3 != other.0 % 3 + } +} + +/// Which an `Arc` or an `Rc` of one finds equal to itself before comparing. +impl Eq for Picky<'_> {} + +/// `==` and `!=` of what holds a `Picky`, whose `ne` std's of tuples, `Arc`s, `Rc`s, and +/// `Box`es call, and std's `==` of slices calls of each item, but which an `Option`'s and +/// a `Reverse`'s `ne`, as `!eq`, does not: of unequal lengths, empty, nested, and with +/// items `eq` and `ne` disagree on at the positions `kind` picks. +pub fn own_nes(kind: u8, data: &[u8], out: &mut Vec) { + use std::rc::Rc; + use std::sync::Arc; + + let log = std::cell::Cell::new(0); + let (by_ne, by_eq) = (usize::from(kind & 7), usize::from(kind >> 3 & 7)); + let step = |i: usize| match i { + _ if i == by_eq => 3, + _ if i == by_ne => 4, + _ => 12, + }; + let a: Vec = data.iter().map(|&x| Picky(x.into(), &log)).collect(); + let mut b: Vec = data + .iter() + .enumerate() + .map(|(i, &x)| Picky(u16::from(x) + step(i), &log)) + .collect(); + if kind & 0x40 != 0 { + b.pop(); + } + let at = |v: &[Picky<'_>], i: usize| v.get(i).map_or(0, |p| p.0); + let one = |v: &[Picky<'_>], i: usize| Picky(at(v, i), &log); + + put_eq(a == b, &log, out); + put_eq(a != b, &log, out); + put_eq(a[..] == b[..], &log, out); + put_eq(&a[..] != &b[..], &log, out); + put_eq(Vec::::new() == Vec::new(), &log, out); + put_eq(Vec::::new() != b, &log, out); + let (pa, pb) = ([one(&a, 0), one(&a, 1)], [one(&b, 0), one(&b, 1)]); + put_eq(pa == pb, &log, out); + put_eq(pa != pb, &log, out); + put_eq(pa == b[..], &log, out); + put_eq(vec![a.clone(), a.clone()] == [a.clone(), b.clone()], &log, out); + put_eq(vec![a.clone(), b.clone()] != [a.clone(), a.clone()], &log, out); + + // A tuple's `!=` stops at the first field whose `ne` finds it unequal. + let tuple = |v: &[Picky<'_>]| (one(v, 0), at(v, 2) as u8, one(v, 1)); + put_eq(tuple(&a) != tuple(&b), &log, out); + put_eq(tuple(&a) == tuple(&b), &log, out); + put_eq((tuple(&a), 1u8) != (tuple(&b), 1u8), &log, out); + put_eq( + each(&a, |p| (p.clone(), p.0 as u8)) == each(&b, |p| (p.clone(), p.0 as u8)), + &log, + out, + ); + put_eq( + &each(&a, |p| (p.clone(), p.0 as u8))[..] != &each(&b, |p| (p.clone(), p.0 as u8))[..], + &log, + out, + ); + put_eq((Some(one(&a, 0)),) != (Some(one(&b, 0)),), &log, out); + put_eq((Reverse(one(&a, 0)),) != (Reverse(one(&b, 0)),), &log, out); + put_eq((Box::new(one(&a, 0)),) != (Box::new(one(&b, 0)),), &log, out); + put_eq((&one(&a, 0),) != (&one(&b, 0),), &log, out); + put_eq( + each(&a, |p| Some(p.clone())) == each(&b, |p| Some(p.clone())), + &log, + out, + ); + put_eq( + each(&a, |p| Reverse(p.clone())) == each(&b, |p| Reverse(p.clone())), + &log, + out, + ); + put_eq( + each(&a, |p| Box::new(p.clone())) == each(&b, |p| Box::new(p.clone())), + &log, + out, + ); + + // An `Arc` of an `Eq` finds itself equal without comparing; of a tuple with a float, + // which is no `Eq`, it compares even itself. + let arc = Arc::new(one(&a, 0)); + put_eq(arc != arc.clone(), &log, out); + put_eq(arc == arc.clone(), &log, out); + put_eq(Arc::new(one(&a, 0)) != Arc::new(one(&b, 0)), &log, out); + let floated = Arc::new((one(&a, 0), 0.5f32)); + put_eq(floated != floated.clone(), &log, out); + put_eq(floated != Arc::new((one(&b, 0), 0.5)), &log, out); + put_eq(Rc::new(one(&a, 1)) != Rc::new(one(&b, 1)), &log, out); + let shared = each(&a, |p| Arc::new(p.clone())); + put_eq(shared == shared.clone(), &log, out); + put_eq(shared == each(&b, |p| Arc::new(p.clone())), &log, out); + put_eq((arc.clone(), 0u8) != (Arc::new(one(&b, 0)), 0u8), &log, out); + + put_eq(wrapped(&a) == wrapped(&b), &log, out); + put_eq(wrapped(&a) != wrapped(&b), &log, out); + put_eq(wrapped(&a) == b, &log, out); + put_eq(wrapped(&a) == &b[..], &log, out); +} diff --git a/ts/fixtures/lang/src/harness.rs b/ts/fixtures/lang/src/harness.rs index ad6fb7bdf..9e3b2ad92 100644 --- a/ts/fixtures/lang/src/harness.rs +++ b/ts/fixtures/lang/src/harness.rs @@ -178,6 +178,7 @@ fn cases() -> Vec<(&'static str, Case)> { ("keys::arrays", keys::arrays), ("iters::zips", iters::zips), ("iters::zips_back", iters::zips_back), + ("collections::own_nes", collections::own_nes), ] } diff --git a/ts/fixtures/reject/census.md b/ts/fixtures/reject/census.md index d473a38f4..dcf22a8b8 100644 --- a/ts/fixtures/reject/census.md +++ b/ts/fixtures/reject/census.md @@ -1,7 +1,7 @@ # Census of `reject-fixture` -- Refusals: 118 -- Function instances: 142 +- Refusals: 117 +- Function instances: 139 - Generic functions no instance reached, lowered over their type parameters: 10 ## By construct @@ -9,10 +9,10 @@ | Count | Construct | First | | ---: | --- | --- | | 15 | unsupported call to `_` | fixtures/reject/src/lib.rs:124:11 | -| 12 | a raw pointer to `_` in `_`, which the crate may put another object in place of | fixtures/reject/src/lib.rs:645:10 | -| 8 | a raw pointer to `_` in a variable assigned again while it may point there | fixtures/reject/src/lib.rs:653:10 | +| 12 | a raw pointer to `_` in `_`, which the crate may put another object in place of | fixtures/reject/src/lib.rs:628:10 | +| 8 | a raw pointer to `_` in a variable assigned again while it may point there | fixtures/reject/src/lib.rs:636:10 | | 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:232:16 | -| 4 | a variant of `_`, which is not supported: either is the same JS string | fixtures/reject/src/lib.rs:366:2 | +| 4 | a variant of `_`, which is not supported: either is the same JS string | fixtures/reject/src/lib.rs:349:2 | | 3 | a copy of a closure that changes what it captured | fixtures/reject/src/lib.rs:242:14 | | 3 | an assignment through a reference to `_` | fixtures/reject/src/lib.rs:90:2 | | 3 | replacing the value behind a reference to `_` | fixtures/reject/src/lib.rs:98:2 | @@ -21,55 +21,54 @@ | 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:494:23 | -| 2 | a coercion to `_`, which is not supported yet | fixtures/reject/src/lib.rs:485:40 | +| 2 | `_`, a trait object of the generic trait `_`, which is not supported yet | fixtures/reject/src/lib.rs:477:23 | +| 2 | a coercion to `_`, which is not supported yet | fixtures/reject/src/lib.rs:468:40 | | 2 | an iterator of the crate implementing `_`, which is not supported yet | fixtures/reject/src/lib.rs:157:1 | | 2 | overriding `_`, which std's adaptors call in place of `next` or beside it | fixtures/reject/src/lib.rs:137:2 | -| 2 | passing `_`, which drops, to `_`, which is not supported yet | fixtures/reject/src/lib.rs:361:4 | -| 2 | unsupported type `_` from another crate | fixtures/reject/src/lib.rs:468:32 | -| 1 | `Buf::copy_to_bytes` of `_`, a value JS copies, which is not supported | fixtures/reject/src/lib.rs:798: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:424: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:409:2 | +| 2 | passing `_`, which drops, to `_`, which is not supported yet | fixtures/reject/src/lib.rs:344:4 | +| 2 | unsupported type `_` from another crate | fixtures/reject/src/lib.rs:451:32 | +| 1 | `Buf::copy_to_bytes` of `_`, a value JS copies, which is not supported | fixtures/reject/src/lib.rs:781: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:407: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:392:2 | | 1 | `Pointer` formatting, as in `{:p}`, is not supported | fixtures/reject/src/lib.rs:56:2 | -| 1 | `_` is not supported yet | fixtures/reject/src/lib.rs:377:18 | +| 1 | `_` is not supported yet | fixtures/reject/src/lib.rs:360:18 | | 1 | `_` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` | fixtures/reject/src/lib.rs:79: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:532:2 | +| 1 | `_` is not supported: its field `_` is `_`, typed `_`, whose `Pending` would be `rt.OuterPending` as `_` | fixtures/reject/src/lib.rs:515:2 | | 1 | `_` of `_` by `_`, which is not supported yet | fixtures/reject/src/lib.rs:271:6 | -| 1 | `_` of `_`, which is not supported yet | fixtures/reject/src/lib.rs:575:4 | -| 1 | `_` through a held type's own, which is not supported yet | fixtures/reject/src/lib.rs:303:2 | -| 1 | `_` with a mutable reference to a value JS copies, which its mapping would copy | fixtures/reject/src/lib.rs:551:12 | +| 1 | `_` of `_`, which is not supported yet | fixtures/reject/src/lib.rs:558:4 | +| 1 | `_` with a mutable reference to a value JS copies, which its mapping would copy | fixtures/reject/src/lib.rs:534:12 | | 1 | `_`, which is not supported yet | fixtures/reject/src/lib.rs:279: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:418:6 | +| 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:401: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:62:10 | | 1 | a `collect` in place of `_`, a zip std reads by index, holding values that drop, which is not supported yet | fixtures/reject/src/lib.rs:221:40 | | 1 | a `skip` of `_`, a zip std reads by index, of items that drop, which is not supported yet | fixtures/reject/src/lib.rs:214:8 | | 1 | a cast from `_` to `_` | fixtures/reject/src/lib.rs:75: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:592:27 | -| 1 | a coercion to `_` | fixtures/reject/src/lib.rs:326:2 | -| 1 | a constant of type `_`, a pointer into memory translation can't name | fixtures/reject/src/lib.rs:815:3 | -| 1 | a dangling pointer to `_`, a value of no bytes made of more than structs and tuples | fixtures/reject/src/lib.rs:774:11 | +| 1 | a cast from a pointer to `_` to one to `_`, which reads the bytes of one type as another | fixtures/reject/src/lib.rs:575:27 | +| 1 | a coercion to `_` | fixtures/reject/src/lib.rs:309:2 | +| 1 | a constant of type `_`, a pointer into memory translation can't name | fixtures/reject/src/lib.rs:798:3 | +| 1 | a dangling pointer to `_`, a value of no bytes made of more than structs and tuples | fixtures/reject/src/lib.rs:757:11 | | 1 | a future of `_`, which can be `rt.Pending`, as the future's own `Pending` is | fixtures/reject/src/lib.rs:84:34 | -| 1 | a mutable reference into a `Result`'s payload, passed on or kept | fixtures/reject/src/lib.rs:397:12 | +| 1 | a mutable reference into a `Result`'s payload, passed on or kept | fixtures/reject/src/lib.rs:380:12 | | 1 | a mutable static, which any code may write | fixtures/reject/src/lib.rs:68:11 | -| 1 | a pointer's address, which JS has no counterpart of | fixtures/reject/src/lib.rs:597:17 | +| 1 | a pointer's address, which JS has no counterpart of | fixtures/reject/src/lib.rs:580:17 | | 1 | a printable type must implement `Display` or `Debug` | fixtures/reject/src/lib.rs:71:1 | -| 1 | a raw pointer to `_` behind a reference, which is the object and not where it is kept | fixtures/reject/src/lib.rs:614: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:716:10 | +| 1 | a raw pointer to `_` behind a reference, which is the object and not where it is kept | fixtures/reject/src/lib.rs:597: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:699: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:511:26 | +| 1 | a trait object of `_`, which is not supported yet | fixtures/reject/src/lib.rs:494:26 | | 1 | a zero-sized constant of type `_` | fixtures/reject/src/lib.rs:50:2 | -| 1 | an upcast from `_` to `_`, which is not supported yet | fixtures/reject/src/lib.rs:569:32 | +| 1 | an upcast from `_` to `_`, which is not supported yet | fixtures/reject/src/lib.rs:552:32 | | 1 | arithmetic on `_` | fixtures/reject/src/lib.rs:8:2 | | 1 | comparing `_` as a key, which is not supported yet | fixtures/reject/src/lib.rs:253:75 | -| 1 | comparing pointers to `()`, which has no bytes and so no address of its own | fixtures/reject/src/lib.rs:765:2 | -| 1 | comparing pointers to `_` in an atomic, which JS has no address of | fixtures/reject/src/lib.rs:814:15 | -| 1 | comparing pointers to `_`, each a place JS makes of its own | fixtures/reject/src/lib.rs:633:2 | -| 1 | constructing `_` | fixtures/reject/src/lib.rs:384:53 | +| 1 | comparing pointers to `()`, which has no bytes and so no address of its own | fixtures/reject/src/lib.rs:748:2 | +| 1 | comparing pointers to `_` in an atomic, which JS has no address of | fixtures/reject/src/lib.rs:797:15 | +| 1 | comparing pointers to `_`, each a place JS makes of its own | fixtures/reject/src/lib.rs:616:2 | +| 1 | constructing `_` | fixtures/reject/src/lib.rs:367:53 | | 1 | hashing `_` as a key, which is not supported yet | fixtures/reject/src/lib.rs:253:75 | -| 1 | hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet | fixtures/reject/src/lib.rs:345:16 | -| 1 | passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet | fixtures/reject/src/lib.rs:354:13 | -| 1 | union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart | fixtures/reject/src/lib.rs:619:1 | +| 1 | hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet | fixtures/reject/src/lib.rs:328:16 | +| 1 | passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet | fixtures/reject/src/lib.rs:337:13 | +| 1 | union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart | fixtures/reject/src/lib.rs:602:1 | ## By API @@ -77,77 +76,77 @@ The type or module each refused type or path belongs to. | Count | API | First | | ---: | --- | --- | -| 16 | `(u32, u32)` | fixtures/reject/src/lib.rs:645:10 | -| 7 | `std::borrow::Cow` | fixtures/reject/src/lib.rs:366:2 | +| 16 | `(u32, u32)` | fixtures/reject/src/lib.rs:628:10 | +| 7 | `std::borrow::Cow` | fixtures/reject/src/lib.rs:349:2 | | 6 | `f16` | fixtures/reject/src/lib.rs:7:14 | -| 5 | `Gap` | fixtures/reject/src/lib.rs:950:10 | +| 5 | `Gap` | fixtures/reject/src/lib.rs:933:10 | | 5 | `Option` | fixtures/reject/src/lib.rs:16:15 | -| 5 | `u32` | fixtures/reject/src/lib.rs:592:27 | +| 5 | `u32` | fixtures/reject/src/lib.rs:575:27 | | 4 | `Iterator` | fixtures/reject/src/lib.rs:37:4 | -| 4 | `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:724:15 | +| 4 | `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:707:15 | | 4 | `std::pin::Pin` | fixtures/reject/src/lib.rs:98:2 | -| 3 | `std::sync::Arc` | fixtures/reject/src/lib.rs:303:2 | -| 3 | `std::vec::Vec` | fixtures/reject/src/lib.rs:345:16 | +| 3 | `std::vec::Vec` | fixtures/reject/src/lib.rs:328:16 | | 3 | `u8` | fixtures/reject/src/lib.rs:271:6 | -| 3 | `{closure}` | fixtures/reject/src/lib.rs:354:13 | +| 3 | `{closure}` | fixtures/reject/src/lib.rs:337:13 | | 2 | `Poll` | fixtures/reject/src/lib.rs:79:20 | | 2 | `Reused` | fixtures/reject/src/lib.rs:21:4 | -| 2 | `Scaled` | fixtures/reject/src/lib.rs:494:23 | -| 2 | `dyn Scaled` | fixtures/reject/src/lib.rs:494:23 | -| 2 | `dyn std::any::Any` | fixtures/reject/src/lib.rs:569:32 | +| 2 | `Scaled` | fixtures/reject/src/lib.rs:477:23 | +| 2 | `dyn Scaled` | fixtures/reject/src/lib.rs:477:23 | +| 2 | `dyn std::any::Any` | fixtures/reject/src/lib.rs:552: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:575:2 | +| 2 | `std::any::TypeId` | fixtures/reject/src/lib.rs:558:2 | | 2 | `std::collections::BTreeSet` | fixtures/reject/src/lib.rs:253:75 | | 2 | `std::collections::HashMap` | fixtures/reject/src/lib.rs:271:6 | | 2 | `std::iter::Iterator` | fixtures/reject/src/lib.rs:232:16 | -| 2 | `std::mem::MaybeUninit` | fixtures/reject/src/lib.rs:964:19 | -| 2 | `std::std` | fixtures/reject/src/lib.rs:604:11 | +| 2 | `std::mem::MaybeUninit` | fixtures/reject/src/lib.rs:947:19 | +| 2 | `std::std` | fixtures/reject/src/lib.rs:587:11 | +| 2 | `std::sync::Arc` | fixtures/reject/src/lib.rs:309:2 | | 2 | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:90:2 | -| 2 | `std::vec::IntoIter` | fixtures/reject/src/lib.rs:464:17 | -| 1 | `Batched` | fixtures/reject/src/lib.rs:345:16 | -| 1 | `Bits` | fixtures/reject/src/lib.rs:619:1 | -| 1 | `Blank` | fixtures/reject/src/lib.rs:798:2 | -| 1 | `BytesMut` | fixtures/reject/src/lib.rs:418:6 | -| 1 | `Counted` | fixtures/reject/src/lib.rs:424:2 | +| 2 | `std::vec::IntoIter` | fixtures/reject/src/lib.rs:447:17 | +| 1 | `Batched` | fixtures/reject/src/lib.rs:328:16 | +| 1 | `Bits` | fixtures/reject/src/lib.rs:602:1 | +| 1 | `Blank` | fixtures/reject/src/lib.rs:781:2 | +| 1 | `BytesMut` | fixtures/reject/src/lib.rs:401:6 | +| 1 | `Counted` | fixtures/reject/src/lib.rs:407:2 | | 1 | `DoubleEndedIterator` | fixtures/reject/src/lib.rs:157:1 | -| 1 | `Entry` | fixtures/reject/src/lib.rs:354:13 | +| 1 | `Entry` | fixtures/reject/src/lib.rs:337:13 | | 1 | `FusedIterator` | fixtures/reject/src/lib.rs:205:1 | | 1 | `HashMap` | fixtures/reject/src/lib.rs:271:6 | | 1 | `Hasher` | fixtures/reject/src/lib.rs:279:9 | -| 1 | `Hits` | fixtures/reject/src/lib.rs:757:21 | -| 1 | `Lane` | fixtures/reject/src/lib.rs:914:19 | +| 1 | `Hits` | fixtures/reject/src/lib.rs:740:21 | +| 1 | `Lane` | fixtures/reject/src/lib.rs:897:19 | | 1 | `Maybe` | fixtures/reject/src/lib.rs:31:2 | -| 1 | `Only` | fixtures/reject/src/lib.rs:774:11 | -| 1 | `Plain` | fixtures/reject/src/lib.rs:868:10 | +| 1 | `Only` | fixtures/reject/src/lib.rs:757:11 | +| 1 | `Plain` | fixtures/reject/src/lib.rs:851:10 | | 1 | `Sink` | fixtures/reject/src/lib.rs:62:10 | -| 1 | `Span2` | fixtures/reject/src/lib.rs:645:10 | -| 1 | `String` | fixtures/reject/src/lib.rs:821:4 | +| 1 | `Span2` | fixtures/reject/src/lib.rs:628:10 | +| 1 | `String` | fixtures/reject/src/lib.rs:804:4 | | 1 | `T \| undefined` | fixtures/reject/src/lib.rs:31:2 | -| 1 | `Tail` | fixtures/reject/src/lib.rs:521:30 | -| 1 | `Track` | fixtures/reject/src/lib.rs:894:19 | -| 1 | `Waiting` | fixtures/reject/src/lib.rs:532:2 | -| 1 | `Window` | fixtures/reject/src/lib.rs:706:2 | -| 1 | `[u8; 4]` | fixtures/reject/src/lib.rs:511:26 | -| 1 | `dyn Keyed` | fixtures/reject/src/lib.rs:569:32 | -| 1 | `poll` | fixtures/reject/src/lib.rs:532:2 | -| 1 | `rt.Poll` | fixtures/reject/src/lib.rs:532:2 | -| 1 | `std::any::Any` | fixtures/reject/src/lib.rs:575:4 | -| 1 | `std::iter::Extend` | fixtures/reject/src/lib.rs:972:6 | +| 1 | `Tail` | fixtures/reject/src/lib.rs:504:30 | +| 1 | `Track` | fixtures/reject/src/lib.rs:877:19 | +| 1 | `Waiting` | fixtures/reject/src/lib.rs:515:2 | +| 1 | `Window` | fixtures/reject/src/lib.rs:689:2 | +| 1 | `[u8; 4]` | fixtures/reject/src/lib.rs:494:26 | +| 1 | `dyn Keyed` | fixtures/reject/src/lib.rs:552:32 | +| 1 | `poll` | fixtures/reject/src/lib.rs:515:2 | +| 1 | `rt.Poll` | fixtures/reject/src/lib.rs:515:2 | +| 1 | `std::any::Any` | fixtures/reject/src/lib.rs:558:4 | +| 1 | `std::iter::Extend` | fixtures/reject/src/lib.rs:955:6 | | 1 | `std::iter::Map` | fixtures/reject/src/lib.rs:221:40 | | 1 | `std::iter::Zip` | fixtures/reject/src/lib.rs:214:8 | -| 1 | `std::net::AddrParseError` | fixtures/reject/src/lib.rs:468:32 | -| 1 | `std::net::Ipv4Addr` | fixtures/reject/src/lib.rs:468:32 | +| 1 | `std::net::AddrParseError` | fixtures/reject/src/lib.rs:451:32 | +| 1 | `std::net::Ipv4Addr` | fixtures/reject/src/lib.rs:451:32 | | 1 | `std::ops::Range` | fixtures/reject/src/lib.rs:172:8 | -| 1 | `std::option::Option` | fixtures/reject/src/lib.rs:404:2 | -| 1 | `std::slice::IterMut` | fixtures/reject/src/lib.rs:803:15 | +| 1 | `std::option::Option` | fixtures/reject/src/lib.rs:387:2 | +| 1 | `std::slice::IterMut` | fixtures/reject/src/lib.rs:786:15 | | 1 | `std::slice::Iter` | fixtures/reject/src/lib.rs:124:11 | -| 1 | `std::std::Layout` | fixtures/reject/src/lib.rs:602:15 | -| 1 | `std::str` | fixtures/reject/src/lib.rs:469:4 | -| 1 | `std::sync::Mutex` | fixtures/reject/src/lib.rs:551:12 | -| 1 | `std::sync::Weak` | fixtures/reject/src/lib.rs:485:40 | +| 1 | `std::std::Layout` | fixtures/reject/src/lib.rs:585:15 | +| 1 | `std::str` | fixtures/reject/src/lib.rs:452:4 | +| 1 | `std::sync::Mutex` | fixtures/reject/src/lib.rs:534:12 | +| 1 | `std::sync::Weak` | fixtures/reject/src/lib.rs:468:40 | | 1 | `std::task::Poll` | fixtures/reject/src/lib.rs:84:34 | -| 1 | `str` | fixtures/reject/src/lib.rs:361:4 | +| 1 | `str` | fixtures/reject/src/lib.rs:344:4 | | 1 | `u64` | fixtures/reject/src/lib.rs:75:2 | | 1 | `value` | fixtures/reject/src/lib.rs:31:2 | | 1 | `{async closure}` | fixtures/reject/src/lib.rs:50:2 | @@ -156,94 +155,93 @@ The type or module each refused type or path belongs to. | 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:653:10 | -| 4 | a variant of `_`, which is not supported: either is the same JS string | `std::borrow::Cow` | fixtures/reject/src/lib.rs:366: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:950:10 | +| 6 | a raw pointer to `_` in a variable assigned again while it may point there | `(u32, u32)` | fixtures/reject/src/lib.rs:636:10 | +| 4 | a variant of `_`, which is not supported: either is the same JS string | `std::borrow::Cow` | fixtures/reject/src/lib.rs:349: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:933: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: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:494: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:964:19 | -| 2 | a raw pointer to `_` in a variable assigned again while it may point there | `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:733:15 | +| 2 | `_`, a trait object of the generic trait `_`, which is not supported yet | `dyn Scaled`, `Scaled` | fixtures/reject/src/lib.rs:477: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:947:19 | +| 2 | a raw pointer to `_` in a variable assigned again while it may point there | `std::cell::UnsafeCell` | fixtures/reject/src/lib.rs:716:15 | | 2 | an assignment through a reference to `_` | `std::pin::Pin` | fixtures/reject/src/lib.rs:114:2 | | 2 | replacing the value behind a reference to `_` | `std::pin::Pin` | fixtures/reject/src/lib.rs:98:2 | -| 2 | unsupported call to `_` | `::sum` | fixtures/reject/src/lib.rs:464:17 | -| 1 | `Buf::copy_to_bytes` of `_`, a value JS copies, which is not supported | `Blank` | fixtures/reject/src/lib.rs:798: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:424: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:409:2 | -| 1 | `_` is not supported yet | `std::borrow::Cow` | fixtures/reject/src/lib.rs:377:18 | +| 2 | unsupported call to `_` | `::sum` | fixtures/reject/src/lib.rs:447:17 | +| 1 | `Buf::copy_to_bytes` of `_`, a value JS copies, which is not supported | `Blank` | fixtures/reject/src/lib.rs:781: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:407: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:392:2 | +| 1 | `_` is not supported yet | `std::borrow::Cow` | fixtures/reject/src/lib.rs:360:18 | | 1 | `_` is not supported: its `Pending` and `Ready` would both be `rt.OuterPending` | `Poll` | fixtures/reject/src/lib.rs:79: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:532: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:515:2 | | 1 | `_` of `_` by `_`, which is not supported yet | `HashMap::contains_key`, `std::collections::HashMap`, `u8` | fixtures/reject/src/lib.rs:271:6 | -| 1 | `_` of `_`, which is not supported yet | `std::any::Any::type_id`, `dyn std::any::Any` | fixtures/reject/src/lib.rs:575:4 | -| 1 | `_` of `_`, whose `clone_from` is its own, which is not supported yet | `slice::clone_from_slice`, `Reused` | fixtures/reject/src/lib.rs:321:4 | +| 1 | `_` of `_`, which is not supported yet | `std::any::Any::type_id`, `dyn std::any::Any` | fixtures/reject/src/lib.rs:558:4 | +| 1 | `_` of `_`, whose `clone_from` is its own, which is not supported yet | `slice::clone_from_slice`, `Reused` | fixtures/reject/src/lib.rs:304: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:853: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:972: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::collections::HashMap::into_keys` | fixtures/reject/src/lib.rs:836: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:955: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:232: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:232:16 | -| 1 | `_` through a held type's own, which is not supported yet | `::ne` | fixtures/reject/src/lib.rs:303: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:551:12 | +| 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:534:12 | | 1 | `_`, which is not supported yet | `Hasher::write` | fixtures/reject/src/lib.rs:279: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:418:6 | +| 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:401: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:62:10 | | 1 | a `collect` in place of `_`, a zip std reads by index, holding values that drop, which is not supported yet | `std::iter::Map` | fixtures/reject/src/lib.rs:221:40 | | 1 | a `skip` of `_`, a zip std reads by index, of items that drop, which is not supported yet | `std::iter::Zip` | fixtures/reject/src/lib.rs:214:8 | | 1 | a cast from `_` to `_` | `u64`, `f16` | fixtures/reject/src/lib.rs:75: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:592:27 | -| 1 | a coercion to `_` | `std::sync::Arc` | fixtures/reject/src/lib.rs:326:2 | -| 1 | a coercion to `_`, which is not supported yet | `&Tail` | fixtures/reject/src/lib.rs:521:30 | -| 1 | a coercion to `_`, which is not supported yet | `std::sync::Weak` | fixtures/reject/src/lib.rs:485:40 | -| 1 | a constant of type `_`, a pointer into memory translation can't name | `&u32` | fixtures/reject/src/lib.rs:815:3 | -| 1 | a dangling pointer to `_`, a value of no bytes made of more than structs and tuples | `Only` | fixtures/reject/src/lib.rs:774:11 | +| 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:575:27 | +| 1 | a coercion to `_` | `std::sync::Arc` | fixtures/reject/src/lib.rs:309:2 | +| 1 | a coercion to `_`, which is not supported yet | `&Tail` | fixtures/reject/src/lib.rs:504:30 | +| 1 | a coercion to `_`, which is not supported yet | `std::sync::Weak` | fixtures/reject/src/lib.rs:468:40 | +| 1 | a constant of type `_`, a pointer into memory translation can't name | `&u32` | fixtures/reject/src/lib.rs:798:3 | +| 1 | a dangling pointer to `_`, a value of no bytes made of more than structs and tuples | `Only` | fixtures/reject/src/lib.rs:757: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:84: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:614: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:914: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:868: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:645: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:894: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:706: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:724: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:757: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:716:10 | +| 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:597: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:897: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:851: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:628: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:877: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:689: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:707: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:740: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:699: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:511:26 | +| 1 | a trait object of `_`, which is not supported yet | `[u8; 4]` | fixtures/reject/src/lib.rs:494:26 | | 1 | a zero-sized constant of type `_` | `{async closure}` | fixtures/reject/src/lib.rs:50:2 | | 1 | an assignment through a reference to `_` | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:90:2 | | 1 | an iterator of the crate implementing `_`, which is not supported yet | `DoubleEndedIterator` | fixtures/reject/src/lib.rs:157:1 | | 1 | an iterator of the crate implementing `_`, which is not supported yet | `FusedIterator` | fixtures/reject/src/lib.rs:205:1 | -| 1 | an upcast from `_` to `_`, which is not supported yet | `dyn Keyed`, `dyn std::any::Any` | fixtures/reject/src/lib.rs:569:32 | +| 1 | an upcast from `_` to `_`, which is not supported yet | `dyn Keyed`, `dyn std::any::Any` | fixtures/reject/src/lib.rs:552:32 | | 1 | arithmetic on `_` | `f16` | fixtures/reject/src/lib.rs:8:2 | | 1 | comparing `_` as a key, which is not supported yet | `std::collections::BTreeSet` | fixtures/reject/src/lib.rs:253:75 | -| 1 | comparing pointers to `_` in an atomic, which JS has no address of | `u32` | fixtures/reject/src/lib.rs:814:15 | -| 1 | comparing pointers to `_`, each a place JS makes of its own | `u32` | fixtures/reject/src/lib.rs:633:2 | -| 1 | constructing `_` | `std::borrow::Cow` | fixtures/reject/src/lib.rs:384:53 | +| 1 | comparing pointers to `_` in an atomic, which JS has no address of | `u32` | fixtures/reject/src/lib.rs:797:15 | +| 1 | comparing pointers to `_`, each a place JS makes of its own | `u32` | fixtures/reject/src/lib.rs:616:2 | +| 1 | constructing `_` | `std::borrow::Cow` | fixtures/reject/src/lib.rs:367:53 | | 1 | hashing `_` as a key, which is not supported yet | `std::collections::BTreeSet` | fixtures/reject/src/lib.rs:253:75 | -| 1 | hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet | `std::vec::Vec`, `Batched` | fixtures/reject/src/lib.rs:345:16 | +| 1 | hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet | `std::vec::Vec`, `Batched` | fixtures/reject/src/lib.rs:328:16 | | 1 | overriding `_`, which std's adaptors call in place of `next` or beside it | `Iterator::fold` | fixtures/reject/src/lib.rs:137:2 | | 1 | overriding `_`, which std's adaptors call in place of `next` or beside it | `Iterator::size_hint` | fixtures/reject/src/lib.rs:185: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:354:13 | -| 1 | passing `_`, which drops, to `_`, which is not supported yet | `{closure}`, `String::retain` | fixtures/reject/src/lib.rs:821:4 | -| 1 | passing `_`, which drops, to `_`, which is not supported yet | `{closure}`, `str::contains` | fixtures/reject/src/lib.rs:361:4 | +| 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:337:13 | +| 1 | passing `_`, which drops, to `_`, which is not supported yet | `{closure}`, `String::retain` | fixtures/reject/src/lib.rs:804:4 | +| 1 | passing `_`, which drops, to `_`, which is not supported yet | `{closure}`, `str::contains` | fixtures/reject/src/lib.rs:344:4 | | 1 | replacing the value behind a reference to `_` | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:119:2 | -| 1 | union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart | `Bits`, `u32` | fixtures/reject/src/lib.rs:619:1 | -| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:575:2 | -| 1 | unsupported call to `_` | `::deref` | fixtures/reject/src/lib.rs:378:2 | -| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:404:2 | +| 1 | union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart | `Bits`, `u32` | fixtures/reject/src/lib.rs:602:1 | +| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:558:2 | +| 1 | unsupported call to `_` | `::deref` | fixtures/reject/src/lib.rs:361:2 | +| 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:387:2 | | 1 | unsupported call to `_` | `::cycle` | fixtures/reject/src/lib.rs:124:11 | -| 1 | unsupported call to `_` | `::is_sorted` | fixtures/reject/src/lib.rs:803:15 | -| 1 | unsupported call to `_` | `::clone_from` | fixtures/reject/src/lib.rs:928:10 | -| 1 | unsupported call to `_` | `::hash` | fixtures/reject/src/lib.rs:336:10 | -| 1 | unsupported call to `_` | `std::any::TypeId::of` | fixtures/reject/src/lib.rs:575:17 | +| 1 | unsupported call to `_` | `::is_sorted` | fixtures/reject/src/lib.rs:786:15 | +| 1 | unsupported call to `_` | `::clone_from` | fixtures/reject/src/lib.rs:911:10 | +| 1 | unsupported call to `_` | `::hash` | fixtures/reject/src/lib.rs:319:10 | +| 1 | unsupported call to `_` | `std::any::TypeId::of` | fixtures/reject/src/lib.rs:558:17 | | 1 | unsupported call to `_` | `std::ops::Range::contains` | fixtures/reject/src/lib.rs:172:8 | -| 1 | unsupported call to `_` | `std::std::Layout::new` | fixtures/reject/src/lib.rs:602:15 | -| 1 | unsupported call to `_` | `std::std::alloc` | fixtures/reject/src/lib.rs:604:11 | -| 1 | unsupported call to `_` | `std::std::dealloc` | fixtures/reject/src/lib.rs:607:3 | -| 1 | unsupported call to `_` | `std::str::parse` | fixtures/reject/src/lib.rs:469:4 | -| 1 | unsupported type `_` from another crate | `std::net::AddrParseError` | fixtures/reject/src/lib.rs:468:32 | -| 1 | unsupported type `_` from another crate | `std::net::Ipv4Addr` | fixtures/reject/src/lib.rs:468:32 | +| 1 | unsupported call to `_` | `std::std::Layout::new` | fixtures/reject/src/lib.rs:585:15 | +| 1 | unsupported call to `_` | `std::std::alloc` | fixtures/reject/src/lib.rs:587:11 | +| 1 | unsupported call to `_` | `std::std::dealloc` | fixtures/reject/src/lib.rs:590:3 | +| 1 | unsupported call to `_` | `std::str::parse` | fixtures/reject/src/lib.rs:452:4 | +| 1 | unsupported type `_` from another crate | `std::net::AddrParseError` | fixtures/reject/src/lib.rs:451:32 | +| 1 | unsupported type `_` from another crate | `std::net::Ipv4Addr` | fixtures/reject/src/lib.rs:451:32 | ## Spans @@ -251,49 +249,49 @@ The type or module each refused type or path belongs to. - fixtures/reject/src/lib.rs:124:11: unsupported call to ` as std::iter::Iterator>::cycle` - fixtures/reject/src/lib.rs:172:8: unsupported call to `std::ops::Range::::contains::` -- fixtures/reject/src/lib.rs:336:10: unsupported call to `::hash::` -- fixtures/reject/src/lib.rs:378:2: unsupported call to ` as std::ops::Deref>::deref` -- fixtures/reject/src/lib.rs:404:2: unsupported call to ` as std::cmp::PartialEq>::eq` -- fixtures/reject/src/lib.rs:464:17: unsupported call to ` as std::iter::Iterator>::sum::` -- fixtures/reject/src/lib.rs:464:38: unsupported call to ` as std::iter::Iterator>::sum::` -- fixtures/reject/src/lib.rs:469:4: unsupported call to `core::str::::parse::` -- fixtures/reject/src/lib.rs:575:2: unsupported call to `::eq` -- fixtures/reject/src/lib.rs:575:17: unsupported call to `std::any::TypeId::of::` -- fixtures/reject/src/lib.rs:602:15: unsupported call to `std::alloc::Layout::new::` -- fixtures/reject/src/lib.rs:604:11: unsupported call to `std::alloc::alloc` -- fixtures/reject/src/lib.rs:607:3: unsupported call to `std::alloc::dealloc` -- fixtures/reject/src/lib.rs:803:15: unsupported call to ` as std::iter::Iterator>::is_sorted` -- fixtures/reject/src/lib.rs:928:10: unsupported call to ` as std::clone::Clone>::clone_from` +- fixtures/reject/src/lib.rs:319:10: unsupported call to `::hash::` +- fixtures/reject/src/lib.rs:361:2: unsupported call to ` as std::ops::Deref>::deref` +- fixtures/reject/src/lib.rs:387:2: unsupported call to ` as std::cmp::PartialEq>::eq` +- fixtures/reject/src/lib.rs:447:17: unsupported call to ` as std::iter::Iterator>::sum::` +- fixtures/reject/src/lib.rs:447:38: unsupported call to ` as std::iter::Iterator>::sum::` +- fixtures/reject/src/lib.rs:452:4: unsupported call to `core::str::::parse::` +- fixtures/reject/src/lib.rs:558:2: unsupported call to `::eq` +- fixtures/reject/src/lib.rs:558:17: unsupported call to `std::any::TypeId::of::` +- fixtures/reject/src/lib.rs:585:15: unsupported call to `std::alloc::Layout::new::` +- fixtures/reject/src/lib.rs:587:11: unsupported call to `std::alloc::alloc` +- fixtures/reject/src/lib.rs:590:3: unsupported call to `std::alloc::dealloc` +- fixtures/reject/src/lib.rs:786:15: unsupported call to ` as std::iter::Iterator>::is_sorted` +- fixtures/reject/src/lib.rs:911: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:645:10: a raw pointer to `(u32, u32)` in `Span2`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:706:2: a raw pointer to `(u32, u32)` in `Window`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:724: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:757: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:868:10: a raw pointer to `(u32, u32)` in `Plain`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:894:19: a raw pointer to `(u32, u32)` in `Track`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:914:19: a raw pointer to `(u32, u32)` in `Lane`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:950:10: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:951:10: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:952:58: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of -- fixtures/reject/src/lib.rs:964: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:965: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:628:10: a raw pointer to `(u32, u32)` in `Span2`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:689:2: a raw pointer to `(u32, u32)` in `Window`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:707: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:740: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:851:10: a raw pointer to `(u32, u32)` in `Plain`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:877:19: a raw pointer to `(u32, u32)` in `Track`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:897:19: a raw pointer to `(u32, u32)` in `Lane`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:933:10: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:934:10: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:935:58: a raw pointer to `(u32, u32)` in `Gap`, which the crate may put another object in place of +- fixtures/reject/src/lib.rs:947: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:948: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:636:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:644:10: a raw pointer to `(u32, u32)` in a variable assigned again while it may point there - fixtures/reject/src/lib.rs:653:10: a raw pointer to `(u32, u32)` 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:670: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:687: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:733:15: a raw pointer to `std::cell::UnsafeCell` 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:716:15: a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there +- fixtures/reject/src/lib.rs:729:15: a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there
@@ -301,25 +299,25 @@ The type or module each refused type or path belongs to. - fixtures/reject/src/lib.rs:232: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:232: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:853: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:972: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:836: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:955: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:366:2: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string -- fixtures/reject/src/lib.rs:367:30: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string -- fixtures/reject/src/lib.rs:368:27: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string -- fixtures/reject/src/lib.rs:373:2: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string +- fixtures/reject/src/lib.rs:349:2: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string +- fixtures/reject/src/lib.rs:350:30: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string +- fixtures/reject/src/lib.rs:351:27: a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string +- fixtures/reject/src/lib.rs:356: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:242:14: a copy of a closure that changes what it captured -- fixtures/reject/src/lib.rs:544:14: a copy of a closure that changes what it captured -- fixtures/reject/src/lib.rs:545:14: a copy of a closure that changes what it captured +- fixtures/reject/src/lib.rs:527:14: a copy of a closure that changes what it captured +- fixtures/reject/src/lib.rs:528:14: a copy of a closure that changes what it captured
@@ -364,7 +362,7 @@ The type or module each refused type or path belongs to.
`_` 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:321:4: `slice::clone_from_slice` of `Reused`, whose `clone_from` is its own, which is not supported yet +- fixtures/reject/src/lib.rs:304:4: `slice::clone_from_slice` of `Reused`, whose `clone_from` is its own, which is not supported yet
@@ -377,15 +375,15 @@ 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:494:23: `dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet -- fixtures/reject/src/lib.rs:495:4: `dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet +- fixtures/reject/src/lib.rs:477:23: `dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet +- fixtures/reject/src/lib.rs:478: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:485:40: a coercion to `std::sync::Weak`, which is not supported yet -- fixtures/reject/src/lib.rs:521:30: a coercion to `&Tail`, which is not supported yet +- fixtures/reject/src/lib.rs:468:40: a coercion to `std::sync::Weak`, which is not supported yet +- fixtures/reject/src/lib.rs:504:30: a coercion to `&Tail`, which is not supported yet
@@ -405,33 +403,33 @@ The type or module each refused type or path belongs to.
passing `_`, which drops, to `_`, which is not supported yet (2) -- fixtures/reject/src/lib.rs:361:4: passing `{closure@fixtures/reject/src/lib.rs:361:13: 361:27}`, which drops, to `str::contains`, which is not supported yet -- fixtures/reject/src/lib.rs:821:4: passing `{closure@fixtures/reject/src/lib.rs:821:11: 821:19}`, which drops, to `String::retain`, which is not supported yet +- fixtures/reject/src/lib.rs:344:4: passing `{closure@fixtures/reject/src/lib.rs:344:13: 344:27}`, which drops, to `str::contains`, which is not supported yet +- fixtures/reject/src/lib.rs:804:4: passing `{closure@fixtures/reject/src/lib.rs:804:11: 804:19}`, which drops, to `String::retain`, which is not supported yet
unsupported type `_` from another crate (2) -- fixtures/reject/src/lib.rs:468:32: unsupported type `std::net::AddrParseError` from another crate -- fixtures/reject/src/lib.rs:468:32: unsupported type `std::net::Ipv4Addr` from another crate +- fixtures/reject/src/lib.rs:451:32: unsupported type `std::net::AddrParseError` from another crate +- fixtures/reject/src/lib.rs:451: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:798:2: `Buf::copy_to_bytes` of `Blank`, a value JS copies, which is not supported +- fixtures/reject/src/lib.rs:781: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:424: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:407: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:409: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:392:2: `Bytes::from_owner` of `std::sync::Arc<[u8]>`, which would drop with the last clone of what it makes, which is not supported
@@ -443,7 +441,7 @@ The type or module each refused type or path belongs to.
`_` is not supported yet (1) -- fixtures/reject/src/lib.rs:377:18: `std::borrow::Cow<'_, [u8]>` is not supported yet +- fixtures/reject/src/lib.rs:360:18: `std::borrow::Cow<'_, [u8]>` is not supported yet
@@ -461,7 +459,7 @@ 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:532: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:515:2: `Waiting>` is not supported: its field `poll` is `Poll`, typed `rt.Poll`, whose `Pending` would be `rt.OuterPending` as `Poll>`
@@ -473,19 +471,13 @@ The type or module each refused type or path belongs to.
`_` of `_`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:575: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:303:2: ` as PartialEq>::ne` through a held type's own, which is not supported yet +- fixtures/reject/src/lib.rs:558:4: `std::any::Any::type_id` of `dyn std::any::Any`, 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:551: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:534:12: `std::sync::Mutex::::get_mut` with a mutable reference to a value JS copies, which its mapping would copy
@@ -497,7 +489,7 @@ The type or module each refused type or path belongs to.
`_`, 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:418: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:401:6: `BytesMut::capacity`, which reads a capacity that depends on whether the other handles of its storage dropped, which is not supported
@@ -527,25 +519,25 @@ The type or module each refused type or path belongs to.
a cast from a pointer to `_` to one to `_`, which reads the bytes of one type as another (1) -- fixtures/reject/src/lib.rs:592: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:575: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:326:2: a coercion to `std::sync::Arc<[u8]>` +- fixtures/reject/src/lib.rs:309: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:815:3: a constant of type `&u32`, a pointer into memory translation can't name +- fixtures/reject/src/lib.rs:798: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:774:11: a dangling pointer to `Only`, a value of no bytes made of more than structs and tuples +- fixtures/reject/src/lib.rs:757:11: a dangling pointer to `Only`, a value of no bytes made of more than structs and tuples
@@ -557,7 +549,7 @@ The type or module each refused type or path belongs to.
a mutable reference into a `Result`'s payload, passed on or kept (1) -- fixtures/reject/src/lib.rs:397:12: a mutable reference into a `Result`'s payload, passed on or kept +- fixtures/reject/src/lib.rs:380:12: a mutable reference into a `Result`'s payload, passed on or kept
@@ -569,7 +561,7 @@ The type or module each refused type or path belongs to.
a pointer's address, which JS has no counterpart of (1) -- fixtures/reject/src/lib.rs:597:17: a pointer's address, which JS has no counterpart of +- fixtures/reject/src/lib.rs:580:17: a pointer's address, which JS has no counterpart of
@@ -581,13 +573,13 @@ The type or module each refused type or path belongs to.
a raw pointer to `_` behind a reference, which is the object and not where it is kept (1) -- fixtures/reject/src/lib.rs:614: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:597: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:716: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:699:10: a raw pointer to `(u32, u32)` in an element, a payload, or a union field, which is not supported yet
@@ -599,7 +591,7 @@ 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:511:26: a trait object of `[u8; 4]`, which is not supported yet +- fixtures/reject/src/lib.rs:494:26: a trait object of `[u8; 4]`, which is not supported yet
@@ -611,7 +603,7 @@ The type or module each refused type or path belongs to.
an upcast from `_` to `_`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:569:32: an upcast from `dyn Keyed` to `dyn std::any::Any`, which is not supported yet +- fixtures/reject/src/lib.rs:552:32: an upcast from `dyn Keyed` to `dyn std::any::Any`, which is not supported yet
@@ -629,25 +621,25 @@ The type or module each refused type or path belongs to.
comparing pointers to `()`, which has no bytes and so no address of its own (1) -- fixtures/reject/src/lib.rs:765:2: comparing pointers to `()`, which has no bytes and so no address of its own +- fixtures/reject/src/lib.rs:748: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:814:15: comparing pointers to `u32` in an atomic, which JS has no address of +- fixtures/reject/src/lib.rs:797: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:633:2: comparing pointers to `u32`, each a place JS makes of its own +- fixtures/reject/src/lib.rs:616:2: comparing pointers to `u32`, each a place JS makes of its own
constructing `_` (1) -- fixtures/reject/src/lib.rs:384:53: constructing `std::borrow::Cow<'_, std::sync::Arc>` +- fixtures/reject/src/lib.rs:367:53: constructing `std::borrow::Cow<'_, std::sync::Arc>`
@@ -659,18 +651,18 @@ The type or module each refused type or path belongs to.
hashing `_` through `_`'s own `Hash::hash_slice`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:345:16: hashing `std::vec::Vec` through `Batched`'s own `Hash::hash_slice`, which is not supported yet +- fixtures/reject/src/lib.rs:328:16: hashing `std::vec::Vec` through `Batched`'s own `Hash::hash_slice`, which is not supported yet
passing `_`, a closure that owns a value that drops, to `_`, which is not supported yet (1) -- fixtures/reject/src/lib.rs:354:13: passing `{closure@fixtures/reject/src/lib.rs:354:28: 354:35}`, a closure that owns a value that drops, to `Entry::or_insert_with`, which is not supported yet +- fixtures/reject/src/lib.rs:337:13: passing `{closure@fixtures/reject/src/lib.rs:337:28: 337:35}`, a closure that owns a value that drops, to `Entry::or_insert_with`, which is not supported yet
union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart (1) -- fixtures/reject/src/lib.rs:619:1: union `Bits`, whose fields overlap in `u32` and `f64`, which JS keeps apart +- fixtures/reject/src/lib.rs:602: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 12dd64674..0557fb059 100644 --- a/ts/fixtures/reject/expected.txt +++ b/ts/fixtures/reject/expected.txt @@ -37,79 +37,79 @@ a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs: hashing `std::collections::BTreeSet` as a key, which is not supported yet at fixtures/reject/src/lib.rs:253:75 comparing `std::collections::BTreeSet` as a key, which is not supported yet at fixtures/reject/src/lib.rs:253:75 `HashMap::contains_key` of `std::collections::HashMap` by `u8`, which is not supported yet at fixtures/reject/src/lib.rs:271:6 -`slice::clone_from_slice` of `Reused`, whose `clone_from` is its own, which is not supported yet at fixtures/reject/src/lib.rs:321:4 -a coercion to `std::sync::Arc<[u8]>` at fixtures/reject/src/lib.rs:326:2 -a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:366:2 -a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:368:27 -a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:367:30 -a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:373:2 -`std::borrow::Cow<'_, [u8]>` is not supported yet at fixtures/reject/src/lib.rs:377:18 -unsupported call to ` as std::ops::Deref>::deref` at fixtures/reject/src/lib.rs:378:2 -constructing `std::borrow::Cow<'_, std::sync::Arc>` at fixtures/reject/src/lib.rs:384:53 -hashing `std::vec::Vec` through `Batched`'s own `Hash::hash_slice`, which is not supported yet at fixtures/reject/src/lib.rs:345:16 -passing `{closure@fixtures/reject/src/lib.rs:354:28: 354: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:354:13 -passing `{closure@fixtures/reject/src/lib.rs:361:13: 361:27}`, which drops, to `str::contains`, which is not supported yet at fixtures/reject/src/lib.rs:361:4 -unsupported call to ` as std::iter::Iterator>::sum::` at fixtures/reject/src/lib.rs:464:17 -unsupported call to ` as std::iter::Iterator>::sum::` at fixtures/reject/src/lib.rs:464:38 -a mutable reference into a `Result`'s payload, passed on or kept at fixtures/reject/src/lib.rs:397:12 -unsupported call to ` as std::cmp::PartialEq>::eq` at fixtures/reject/src/lib.rs:404: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:409: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:418: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:424:2 -unsupported call to `core::str::::parse::` at fixtures/reject/src/lib.rs:469:4 -unsupported type `std::net::Ipv4Addr` from another crate at fixtures/reject/src/lib.rs:468:32 -unsupported type `std::net::AddrParseError` from another crate at fixtures/reject/src/lib.rs:468:32 -a coercion to `std::sync::Weak`, which is not supported yet at fixtures/reject/src/lib.rs:485:40 -`dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet at fixtures/reject/src/lib.rs:494:23 -`dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet at fixtures/reject/src/lib.rs:495:4 -a trait object of `[u8; 4]`, which is not supported yet at fixtures/reject/src/lib.rs:511:26 -a coercion to `&Tail`, which is not supported yet at fixtures/reject/src/lib.rs:521: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:551: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:532:2 -a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:544:14 -a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:545:14 -an upcast from `dyn Keyed` to `dyn std::any::Any`, which is not supported yet at fixtures/reject/src/lib.rs:569:32 -`std::any::Any::type_id` of `dyn std::any::Any`, which is not supported yet at fixtures/reject/src/lib.rs:575:4 -unsupported call to `std::any::TypeId::of::` at fixtures/reject/src/lib.rs:575:17 -unsupported call to `::eq` at fixtures/reject/src/lib.rs:575: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:592:27 -a pointer's address, which JS has no counterpart of at fixtures/reject/src/lib.rs:597:17 -unsupported call to `std::alloc::Layout::new::` at fixtures/reject/src/lib.rs:602:15 -unsupported call to `std::alloc::alloc` at fixtures/reject/src/lib.rs:604:11 -unsupported call to `std::alloc::dealloc` at fixtures/reject/src/lib.rs:607: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:614:10 -union `Bits`, whose fields overlap in `u32` and `f64`, which JS keeps apart at fixtures/reject/src/lib.rs:625:10 -comparing pointers to `u32`, each a place JS makes of its own at fixtures/reject/src/lib.rs:633: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:645:10 +`slice::clone_from_slice` of `Reused`, whose `clone_from` is its own, which is not supported yet at fixtures/reject/src/lib.rs:304:4 +a coercion to `std::sync::Arc<[u8]>` at fixtures/reject/src/lib.rs:309:2 +a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:349:2 +a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:351:27 +a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:350:30 +a variant of `std::borrow::Cow<'_, str>`, which is not supported: either is the same JS string at fixtures/reject/src/lib.rs:356:2 +`std::borrow::Cow<'_, [u8]>` is not supported yet at fixtures/reject/src/lib.rs:360:18 +unsupported call to ` as std::ops::Deref>::deref` at fixtures/reject/src/lib.rs:361:2 +constructing `std::borrow::Cow<'_, std::sync::Arc>` at fixtures/reject/src/lib.rs:367:53 +hashing `std::vec::Vec` through `Batched`'s own `Hash::hash_slice`, which is not supported yet at fixtures/reject/src/lib.rs:328:16 +passing `{closure@fixtures/reject/src/lib.rs:337:28: 337: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:337:13 +passing `{closure@fixtures/reject/src/lib.rs:344:13: 344:27}`, which drops, to `str::contains`, which is not supported yet at fixtures/reject/src/lib.rs:344:4 +unsupported call to ` as std::iter::Iterator>::sum::` at fixtures/reject/src/lib.rs:447:17 +unsupported call to ` as std::iter::Iterator>::sum::` at fixtures/reject/src/lib.rs:447:38 +a mutable reference into a `Result`'s payload, passed on or kept at fixtures/reject/src/lib.rs:380:12 +unsupported call to ` as std::cmp::PartialEq>::eq` at fixtures/reject/src/lib.rs:387: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:392: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:401: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:407:2 +unsupported call to `core::str::::parse::` at fixtures/reject/src/lib.rs:452:4 +unsupported type `std::net::Ipv4Addr` from another crate at fixtures/reject/src/lib.rs:451:32 +unsupported type `std::net::AddrParseError` from another crate at fixtures/reject/src/lib.rs:451:32 +a coercion to `std::sync::Weak`, which is not supported yet at fixtures/reject/src/lib.rs:468:40 +`dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet at fixtures/reject/src/lib.rs:477:23 +`dyn Scaled`, a trait object of the generic trait `Scaled`, which is not supported yet at fixtures/reject/src/lib.rs:478:4 +a trait object of `[u8; 4]`, which is not supported yet at fixtures/reject/src/lib.rs:494:26 +a coercion to `&Tail`, which is not supported yet at fixtures/reject/src/lib.rs:504: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:534: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:515:2 +a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:527:14 +a copy of a closure that changes what it captured at fixtures/reject/src/lib.rs:528:14 +an upcast from `dyn Keyed` to `dyn std::any::Any`, which is not supported yet at fixtures/reject/src/lib.rs:552:32 +`std::any::Any::type_id` of `dyn std::any::Any`, which is not supported yet at fixtures/reject/src/lib.rs:558:4 +unsupported call to `std::any::TypeId::of::` at fixtures/reject/src/lib.rs:558:17 +unsupported call to `::eq` at fixtures/reject/src/lib.rs:558: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:575:27 +a pointer's address, which JS has no counterpart of at fixtures/reject/src/lib.rs:580:17 +unsupported call to `std::alloc::Layout::new::` at fixtures/reject/src/lib.rs:585:15 +unsupported call to `std::alloc::alloc` at fixtures/reject/src/lib.rs:587:11 +unsupported call to `std::alloc::dealloc` at fixtures/reject/src/lib.rs:590: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:597:10 +union `Bits`, whose fields overlap in `u32` and `f64`, which JS keeps apart at fixtures/reject/src/lib.rs:608:10 +comparing pointers to `u32`, each a place JS makes of its own at fixtures/reject/src/lib.rs:616: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:628:10 +a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:636:10 +a raw pointer to `(u32, u32)` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:644:10 a raw pointer to `(u32, u32)` in a variable assigned again while it may point there 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:670: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:687: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 `Window`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:706: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:716: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:724:15 -a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:733: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 `Hits`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:757:21 -comparing pointers to `()`, which has no bytes and so no address of its own at fixtures/reject/src/lib.rs:765:2 -a dangling pointer to `Only`, a value of no bytes made of more than structs and tuples at fixtures/reject/src/lib.rs:774:11 -`Buf::copy_to_bytes` of `Blank`, a value JS copies, which is not supported at fixtures/reject/src/lib.rs:798:2 -unsupported call to ` as std::iter::Iterator>::is_sorted` at fixtures/reject/src/lib.rs:803:15 -comparing pointers to `u32` in an atomic, which JS has no address of at fixtures/reject/src/lib.rs:814:15 -a constant of type `&u32`, a pointer into memory translation can't name at fixtures/reject/src/lib.rs:815:3 -passing `{closure@fixtures/reject/src/lib.rs:821:11: 821:19}`, which drops, to `String::retain`, which is not supported yet at fixtures/reject/src/lib.rs:821: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:853:6 -a raw pointer to `(u32, u32)` in `Plain`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:868: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:894: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:914: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:950: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:951: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:952: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:964: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:965: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:972:6 +a raw pointer to `(u32, u32)` in `Window`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:689: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:699: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:707:15 +a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:716:15 +a raw pointer to `std::cell::UnsafeCell` in a variable assigned again while it may point there at fixtures/reject/src/lib.rs:729: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:740:21 +comparing pointers to `()`, which has no bytes and so no address of its own at fixtures/reject/src/lib.rs:748:2 +a dangling pointer to `Only`, a value of no bytes made of more than structs and tuples at fixtures/reject/src/lib.rs:757:11 +`Buf::copy_to_bytes` of `Blank`, a value JS copies, which is not supported at fixtures/reject/src/lib.rs:781:2 +unsupported call to ` as std::iter::Iterator>::is_sorted` at fixtures/reject/src/lib.rs:786:15 +comparing pointers to `u32` in an atomic, which JS has no address of at fixtures/reject/src/lib.rs:797:15 +a constant of type `&u32`, a pointer into memory translation can't name at fixtures/reject/src/lib.rs:798:3 +passing `{closure@fixtures/reject/src/lib.rs:804:11: 804:19}`, which drops, to `String::retain`, which is not supported yet at fixtures/reject/src/lib.rs:804: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:836:6 +a raw pointer to `(u32, u32)` in `Plain`, which the crate may put another object in place of at fixtures/reject/src/lib.rs:851: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:877: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:897: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:933: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:934: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:935: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:947: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:948: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:955:6 overriding `Iterator::fold`, which std's adaptors call in place of `next` or beside it at fixtures/reject/src/lib.rs:137:2 an iterator of the crate implementing `DoubleEndedIterator`, which is not supported yet at fixtures/reject/src/lib.rs:157:1 overriding `Iterator::size_hint`, which std's adaptors call in place of `next` or beside it at fixtures/reject/src/lib.rs:185:2 diff --git a/ts/fixtures/reject/src/lib.rs b/ts/fixtures/reject/src/lib.rs index c42190a6b..0c5ee99b5 100644 --- a/ts/fixtures/reject/src/lib.rs +++ b/ts/fixtures/reject/src/lib.rs @@ -286,23 +286,6 @@ pub fn raw_keys() -> usize { map.len() } -pub struct Picky(pub u8); - -impl PartialEq for Picky { - fn eq(&self, other: &Self) -> bool { - self.0 == other.0 - } - - fn ne(&self, other: &Self) -> bool { - self.0 > other.0 - } -} - -/// An `Arc`'s `!=` calls `Picky`'s own `ne`, which `!eq` would not. -pub fn picky(a: &std::sync::Arc, b: &std::sync::Arc) -> bool { - a != b -} - /// `max` drops the operand it doesn't return, which the runtime's leaves undropped. pub fn widest(a: std::sync::Arc, b: std::sync::Arc) -> std::sync::Arc { a.max(b) diff --git a/ts/src/lower/collections.rs b/ts/src/lower/collections.rs index 9a5e59dab..73b71278b 100644 --- a/ts/src/lower/collections.rs +++ b/ts/src/lower/collections.rs @@ -129,15 +129,11 @@ pub fn call<'tcx>( { return Err(args); } - // A tuple's and an `Arc`'s `ne` call what they hold's, which `!eq` stands for - // only while that is the default. - if name == "ne" && own_ne(b, t) { - return Ok(Some(b.err( - span, - format!("`<{t} as PartialEq>::ne` through a held type's own, which is not supported yet"), - ))); - } - let eq = match (eq_fn(b, t, span), <[Expr; 2]>::try_from(args)) { + let eq = match name { + "eq" => eq_fn(b, t, span), + _ => not_ne_fn(b, t, span), + }; + let eq = match (eq, <[Expr; 2]>::try_from(args)) { (Expr::Rt(same), Ok([l, r])) if same == "same" => l.binary("===", r), (eq, Ok(args)) => eq.call(args.into()), (_, Err(args)) => return Err(args), @@ -849,16 +845,14 @@ fn local<'tcx>(b: &Body<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool { matches!(ty.kind(), ty::Adt(adt, _) if b.t.own(adt.did()) || b.t.bound_drops(adt.did()).is_some()) } -/// Whether `ty`'s `ne` reaches the crate's own `ne` of a type it holds: through tuples, -/// `Arc`s, `Reverse`s, and the elements of slices, but not an `Option`, whose `ne` is -/// `!eq`. +/// Whether `ty`'s `ne` reaches the crate's own `ne` of a type it holds: through tuples and +/// `Arc`s, but not slices, `Option`s, or `Reverse`s, whose `ne` is `!eq`. fn own_ne<'tcx>(b: &Body<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool { let tcx = b.t.tcx; let ty = peel(b, ty); match ty.kind() { ty::Tuple(tys) => tys.iter().any(|t| own_ne(b, t)), - _ if let Some(elem) = elements_of(b, ty) => own_ne(b, elem), - ty::Adt(..) if let Some(inner) = arc_of(b, ty).or_else(|| reverse_of(b, ty)) => own_ne(b, inner), + ty::Adt(..) if let Some(inner) = arc_of(b, ty) => own_ne(b, inner), _ if local(b, ty) => { let ne = trait_fn(tcx, "PartialEq", "ne"); Instance::try_resolve(tcx, b.t.typing_env_pub(), ne, tcx.mk_args(&[ty.into(), ty.into()])) @@ -1810,27 +1804,12 @@ pub fn eq_fn<'tcx>(b: &mut Body<'_, '_, 'tcx>, ty: Ty<'tcx>, span: Span) -> Expr eq => Expr::rt("eqOption", [eq].into_iter().chain(b.t.none_arg(inner)).collect()), }, ty::Adt(..) if let Some(inner) = reverse_of(b, ty) => eq_fn(b, inner, span), - // A slice compares its elements by `!=`, which `!eq` stands for only while that is - // the default. - _ if let Some(elem) = elements_of(b, ty) - && own_ne(b, elem) => - { - b.err( - span, - format!( - "comparing `{ty}` by `<{elem} as PartialEq>::ne` through a held type's own, which is not supported yet" - ), - ) - } - _ if let Some(elem) = elements_of(b, ty) => Expr::rt("eqSlice", vec![eq_fn(b, elem, span)]), + // A slice compares its elements by `!=`. + _ if let Some(elem) = elements_of(b, ty) => Expr::rt("eqSlice", vec![not_ne_fn(b, elem, span)]), _ if bytes(b, ty) => Expr::Rt("eqBytes".into()), ty::Adt(..) if let Some(inner) = arc_of(b, ty) => { - let mut values = vec![eq_fn(b, inner, span)]; - // std's `Arc` finds itself equal before comparing a value that is `Eq`. - if super::iter::implements(b.t, inner, "Eq") { - values.push(Expr::lit("true")); - } - Expr::rt("eqArc", values) + let eq = eq_fn(b, inner, span); + arc_eq(b, inner, eq) } ty::Adt(..) if local(b, ty) || b.t.std_of(ty).is_some_and(|std| std == Std::Result || std.error()) => { let eq = trait_fn(tcx, "PartialEq", "eq"); @@ -1841,6 +1820,36 @@ pub fn eq_fn<'tcx>(b: &mut Body<'_, '_, 'tcx>, ty: Ty<'tcx>, span: Span) -> Expr } } +/// `!::ne`, as a function: `eq_fn`'s, but through the crate's own `ne` of +/// `ty` or of what a tuple or an `Arc` holds, which std's `ne` of each calls. +fn not_ne_fn<'tcx>(b: &mut Body<'_, '_, 'tcx>, ty: Ty<'tcx>, span: Span) -> Expr { + let ty = peel(b, ty); + match ty.kind() { + _ if !own_ne(b, ty) => eq_fn(b, ty, span), + // `!(a.0 != b.0 || ...)`: each field's `!ne` in turn. + ty::Tuple(tys) => { + let fns = tys.iter().map(|t| not_ne_fn(b, t, span)).collect(); + Expr::rt("eqTuple", vec![Expr::Array(fns)]) + } + ty::Adt(..) if let Some(inner) = arc_of(b, ty) => { + let eq = not_ne_fn(b, inner, span); + arc_eq(b, inner, eq) + } + _ => impl_eq(b, "ne", ty, ty, [ty, ty], span), + } +} + +/// `PartialEq::eq` of `Arc`s of `inner`, as a function, which compares what they hold by +/// `eq`. +fn arc_eq<'tcx>(b: &Body<'_, '_, 'tcx>, inner: Ty<'tcx>, eq: Expr) -> Expr { + let mut values = vec![eq]; + // std's `Arc` finds itself equal before comparing a value that is `Eq`. + if super::iter::implements(b.t, inner, "Eq") { + values.push(Expr::lit("true")); + } + Expr::rt("eqArc", values) +} + /// `PartialEq::eq` of sequences of types `t` and `u`, as a function, where the runtime's of /// keys does not compare them: a `VecDeque` against another sequence, or items that are no /// key or compare by their own `PartialEq`. Else `None`. @@ -1853,7 +1862,7 @@ fn seq_eq<'tcx>(b: &mut Body<'_, '_, 'tcx>, t: Ty<'tcx>, u: Ty<'tcx>, span: Span if !deque && alike(b, t, u) && std_key(b, t) { return None; } - Some(Expr::rt("eqSeq", vec![item_eq(b, t, ti, ui, span)])) + Some(Expr::rt("eqSeq", vec![item_eq(b, ti, ui, span)])) } /// What a slice, an array, a `Vec`, or a `VecDeque` of type `ty` holds, bytes included. @@ -1865,9 +1874,9 @@ fn seq_item<'tcx>(b: &Body<'_, '_, 'tcx>, ty: Ty<'tcx>) -> Option> { } } -/// What std's `!=` of a `t` and a `u` that sequence `seq` holds finds equal, as a function: -/// `>::ne`, which `!eq` stands for unless the crate overrides it. -fn item_eq<'tcx>(b: &mut Body<'_, '_, 'tcx>, seq: Ty<'tcx>, t: Ty<'tcx>, u: Ty<'tcx>, span: Span) -> Expr { +/// What std's `!=` of a `t` and a `u` that a sequence holds finds equal, as a function: +/// `!>::ne`, which `eq` stands for unless the crate overrides it. +fn item_eq<'tcx>(b: &mut Body<'_, '_, 'tcx>, t: Ty<'tcx>, u: Ty<'tcx>, span: Span) -> Expr { let tcx = b.t.tcx; if let Some(eq) = seq_eq(b, t, u, span) { return eq; @@ -1877,15 +1886,7 @@ fn item_eq<'tcx>(b: &mut Body<'_, '_, 'tcx>, seq: Ty<'tcx>, t: Ty<'tcx>, u: Ty<' return Expr::undefined(); } if alike(b, t, u) { - if own_ne(b, pt) { - return b.err( - span, - format!( - "comparing `{seq}` by `<{pt} as PartialEq>::ne` through a held type's own, which is not supported yet" - ), - ); - } - return eq_fn(b, pt, span); + return not_ne_fn(b, pt, span); } let (pt, pu) = peel_pair(b, t, u); let ne = trait_fn(tcx, "PartialEq", "ne");