diff options
| author | Thom Chiovoloni <thom@shift.click> | 2022-10-19 19:07:24 -0700 |
|---|---|---|
| committer | Thom Chiovoloni <thom@shift.click> | 2022-10-19 22:36:14 -0700 |
| commit | afd08175de04e890ec542b02d2b72a7b525e86d6 (patch) | |
| tree | 44bc3b6ce28e986cbe367f24a8ed2d664dac523c /library/core/tests | |
| parent | 57781b24c54f9548722927ba88c343ff28da94ce (diff) | |
| download | rust-afd08175de04e890ec542b02d2b72a7b525e86d6.tar.gz rust-afd08175de04e890ec542b02d2b72a7b525e86d6.zip | |
Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input vs output
Diffstat (limited to 'library/core/tests')
| -rw-r--r-- | library/core/tests/mem.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/library/core/tests/mem.rs b/library/core/tests/mem.rs index b0cc08a15f0..0362e1c8afb 100644 --- a/library/core/tests/mem.rs +++ b/library/core/tests/mem.rs @@ -130,7 +130,11 @@ fn test_transmute_copy_grow_panics() { payload .downcast::<&'static str>() .and_then(|s| { - if *s == "cannot transmute_copy if U is larger than T" { Ok(s) } else { Err(s) } + if *s == "cannot transmute_copy if Dst is larger than Src" { + Ok(s) + } else { + Err(s) + } }) .unwrap_or_else(|p| panic::resume_unwind(p)); } |
