diff --git a/src/test/ui/issues/issue-75763.rs b/src/test/ui/issues/issue-75763.rs new file mode 100644 index 00000000000..2ecc16be7f6 --- /dev/null +++ b/src/test/ui/issues/issue-75763.rs @@ -0,0 +1,14 @@ +// build-pass + +#![allow(incomplete_features)] +#![feature(const_generics)] + +struct Bug; + +fn main() { + let b: Bug::<{ + unsafe { + std::mem::transmute::<&[u8], &str>(&[0xC0, 0xC1, 0xF5]) + } + }>; +} diff --git a/src/test/ui/issues/issue-76179.rs b/src/test/ui/issues/issue-76179.rs new file mode 100644 index 00000000000..0e086968b90 --- /dev/null +++ b/src/test/ui/issues/issue-76179.rs @@ -0,0 +1,19 @@ +// check-pass + +#![feature(associated_type_defaults)] + +use std::io::Read; + +trait View { + type Deserializers: Deserializer; + type RequestParams = DefaultRequestParams; +} + +struct DefaultRequestParams; + +trait Deserializer { + type Item; + fn deserialize(r: impl Read) -> Self::Item; +} + +fn main() {}