diff --git a/src/test/ui/issues/issue-75763.rs b/src/test/ui/issues/issue-75763.rs new file mode 100644 index 0000000000000..2fd9f9a60de9f --- /dev/null +++ b/src/test/ui/issues/issue-75763.rs @@ -0,0 +1,15 @@ +// build-pass + +#![allow(incomplete_features)] +#![feature(const_generics)] + +struct Bug; + +fn main() { + let b: Bug::<{ + unsafe { + // FIXME(const_generics): Decide on how to deal with invalid values as const params. + 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 0000000000000..0e086968b9056 --- /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() {}