diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2024-01-11 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2024-01-11 19:39:49 +0100 |
| commit | 9d84589a96c4f14cb9ac955b8708412854f9246b (patch) | |
| tree | 8b427f87331db8c7b74b009d904358d9adf67c5c /tests/ui/structs-enums/tuple-struct-construct.rs | |
| parent | 062e7c6a951c1e4f33c0a6f6761755949cde15ec (diff) | |
| download | rust-9d84589a96c4f14cb9ac955b8708412854f9246b.tar.gz rust-9d84589a96c4f14cb9ac955b8708412854f9246b.zip | |
Waker::will_wake: Compare vtable address instead of its content
Optimize will_wake implementation by comparing vtable address instead of its content. The existing best practice to avoid false negatives from will_wake is to define a waker vtable as a static item. That approach continues to works with the new implementation. While this potentially changes the observable behaviour, the function is documented to work on a best-effort basis. The PartialEq impl for RawWaker remains as it was.
Diffstat (limited to 'tests/ui/structs-enums/tuple-struct-construct.rs')
0 files changed, 0 insertions, 0 deletions
