diff options
| author | Bryan Garza <1396101+bryangarza@users.noreply.github.com> | 2023-04-18 16:31:05 -0700 |
|---|---|---|
| committer | Bryan Garza <1396101+bryangarza@users.noreply.github.com> | 2023-04-18 17:33:46 -0700 |
| commit | 238756e45d88a603c143b89f7408717516a03e03 (patch) | |
| tree | 10a0da003b933abe5b50093c6772b2ae3078da64 /tests | |
| parent | 7908a1d65496b88626e4b7c193c81d777005d6f3 (diff) | |
| download | rust-238756e45d88a603c143b89f7408717516a03e03.tar.gz rust-238756e45d88a603c143b89f7408717516a03e03.zip | |
Fix ICE for transmutability in candidate assembly
Don't skip transmutability check just because there may be generics in the ParamEnv. Fixes #110467
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/transmutability/issue-110467.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/transmutability/issue-110467.rs b/tests/ui/transmutability/issue-110467.rs new file mode 100644 index 00000000000..358733b9832 --- /dev/null +++ b/tests/ui/transmutability/issue-110467.rs @@ -0,0 +1,17 @@ +// check-pass +#![crate_type = "lib"] +#![feature(transmutability)] +use std::mem::BikeshedIntrinsicFrom; +pub struct Context; + +pub fn is_maybe_transmutable<Src, Dst>() +where + Dst: BikeshedIntrinsicFrom<Src, Context>, +{ +} + +// The `T` here should not have any effect on checking +// if transmutability is allowed or not. +fn function_with_generic<T>() { + is_maybe_transmutable::<(), ()>(); +} |
