mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
Add some regression tests
This commit is contained in:
@@ -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])
|
||||
}
|
||||
}>;
|
||||
}
|
||||
@@ -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() {}
|
||||
Reference in New Issue
Block a user