Add some regression tests

This commit is contained in:
Camelid 2020-10-25 22:01:37 -07:00
parent 2e8a54af60
commit 94ed9455e8
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,14 @@
// build-pass
#![allow(incomplete_features)]
#![feature(const_generics)]
struct Bug<const S: &'static str>;
fn main() {
let b: Bug::<{
unsafe {
std::mem::transmute::<&[u8], &str>(&[0xC0, 0xC1, 0xF5])
}
}>;
}

View File

@ -0,0 +1,19 @@
// check-pass
#![feature(associated_type_defaults)]
use std::io::Read;
trait View {
type Deserializers: Deserializer<Item = Self::RequestParams>;
type RequestParams = DefaultRequestParams;
}
struct DefaultRequestParams;
trait Deserializer {
type Item;
fn deserialize(r: impl Read) -> Self::Item;
}
fn main() {}