Skip to content

Commit

Permalink
Rollup merge of #78388 - camelid:regression-tests, r=lcnr
Browse files Browse the repository at this point in the history
Add some regression tests

Closes #75763.
Closes #76179.
  • Loading branch information
JohnTitor authored Oct 26, 2020
2 parents b72d70e + 4641d2e commit 98e2a95
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/ui/issues/issue-75763.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// build-pass

#![allow(incomplete_features)]
#![feature(const_generics)]

struct Bug<const S: &'static str>;

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])
}
}>;
}
19 changes: 19 additions & 0 deletions src/test/ui/issues/issue-76179.rs
Original file line number Diff line number Diff line change
@@ -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 98e2a95

Please sign in to comment.