Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some regression tests #78388

Merged
merged 2 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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])
camelid marked this conversation as resolved.
Show resolved Hide resolved
}
}>;
}
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() {}