Conversation
42e9149 to
650df6a
Compare
|
I added a |
227763c to
f8bd5db
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1298 +/- ##
==========================================
- Coverage 87.42% 87.31% -0.11%
==========================================
Files 15 15
Lines 5152 5289 +137
==========================================
+ Hits 4504 4618 +114
- Misses 648 671 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
I went ahead and committed an example of how having a KnownLayout bound can be used to improve our diagnostics. Generally speaking, I think we should consistently have Src: Deref and Dst: ?Sized + KnownLayout on our Display and Error impls. We can always relax the bounds later.
I can't think, right now, of how it might be useful for ValidityError, but who knows — depending on how we evolve that trait, an opportunity might arise.
|
Discussed offline with @jswrenn. Here's the plan:
|
9155b18 to
bd81c69
Compare
While we're here, also relax `Dispaly for AlignmentError<Src, Dst>` to permit `Dst: ?Sized` in exchange for `Dst: KnownLayout`. This is an important relaxation since our APIs permit performing conversions into unsized destination types with runtime alignment checking. Also make all errors `Send + Sync` regardless of `Dst`, which only exists at the type level, but is never instantiated. Finally, make `Display`'s verbosity conditional on `debug_assertions`. Makes progress on #1297 Co-authored-by: John Wrenn <jswrenn@amazon.com>
While we're here, also relax
Dispaly for AlignmentError<Src, Dst>to permitDst: ?Sizedin exchange forDst: KnownLayout. This is an important relaxation since our APIs permit performing conversions into unsized destination types with runtime alignment checking.Makes progress on #1297