Skip to content

Commit

Permalink
Add some regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Oct 26, 2020
1 parent 2e8a54a commit 94ed945
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/ui/issues/issue-75763.rs
@@ -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])
}
}>;
}
19 changes: 19 additions & 0 deletions 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<Item = Self::RequestParams>;
type RequestParams = DefaultRequestParams;
}

struct DefaultRequestParams;

trait Deserializer {
type Item;
fn deserialize(r: impl Read) -> Self::Item;
}

fn main() {}

0 comments on commit 94ed945

Please sign in to comment.