Files
rust/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
449 B
Rust
Raw Normal View History

// An unknown source type should be gracefully handled.
#![crate_type = "lib"]
#![feature(transmutability)]
#![allow(dead_code, incomplete_features, non_camel_case_types)]
mod assert {
use std::mem::TransmuteFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: TransmuteFrom<Src>
{}
}
fn should_gracefully_handle_unknown_src() {
#[repr(C)] struct Dst;
assert::is_transmutable::<Src, Dst>(); //~ cannot find type
}