Matthias Krüger
6ef8648a48
more clippy fixes: clippy::{iter_cloned_collect, unwarp_or_else_default, option_map_or_none}
2023-04-16 12:45:51 +02:00
Bryan Garza
36febe1f4d
Improve safe transmute error reporting
...
This patch updates the error reporting when Safe Transmute is not
possible between 2 types by including the reason.
Also, fix some small bugs that occur when computing the `Answer` for
transmutability.
2023-04-13 21:57:08 +00:00
Oli Scherer
936bf29d4c
s/eval_usize/eval_target_usize/ for clarity
2023-02-14 08:51:19 +00:00
bors
6b8d9dd0a0
Auto merge of #103831 - chenyukang:yukang/fix-103751-ice, r=nagisa
...
Fix capacity overflow issue during transmutability check
Fixes #103751
2022-11-05 13:48:30 +00:00
yukang
749afe57c3
fix #103751 : Fix capacity overflow issue during transmutability check
2022-11-01 15:46:58 +08:00
yukang
55568419ac
fix #103783 , fix ICE checking transmutability of NaughtyLenArray
2022-10-30 06:21:27 +08:00
Josh Stone
a72666ed56
rustc_transmute: fix big-endian discriminants
2022-09-20 13:03:43 -07:00
Oli Scherer
ee3c835018
Always import all tracing macros for the entire crate instead of piecemeal by module
2022-09-01 14:54:27 +00:00
Dezhi Wu
b1430fb7ca
Fix a bunch of typo
...
This PR will fix some typos detected by [typos].
I only picked the ones I was sure were spelling errors to fix, mostly in
the comments.
[typos]: https://github.com/crate-ci/typos
2022-08-31 18:24:55 +08:00
David Tolnay
39809c5f68
Replace a try_fold in rustc_transmute to use ControlFlow instead of Result
2022-08-17 17:20:42 -07:00
David Tolnay
83f081fc01
Remove unstable Result::into_ok_or_err
2022-08-17 17:20:42 -07:00
Jack Wrenn
c0d0ce95eb
safe transmute: tweak tracing
...
ref: https://github.com/rust-lang/rust/pull/92268#discussion_r925246903
ref: https://github.com/rust-lang/rust/pull/92268#discussion_r925250811
ref: https://github.com/rust-lang/rust/pull/92268#discussion_r925255782
2022-07-27 17:33:56 +00:00
Jack Wrenn
bc4a1dea41
Initial (incomplete) implementation of transmutability trait.
...
This initial implementation handles transmutations between types with specified layouts, except when references are involved.
Co-authored-by: Igor null <m1el.2027@gmail.com>
2022-07-27 17:33:56 +00:00