2024-01-17 14:26:26 +00:00
|
|
|
// This test checks that data layout mismatches emit an error.
|
|
|
|
|
//
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ build-fail
|
|
|
|
|
//@ needs-llvm-components: x86
|
|
|
|
|
//@ compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options
|
2024-12-25 22:12:17 +11:00
|
|
|
//@ normalize-stderr: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`"
|
|
|
|
|
//@ normalize-stderr: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`"
|
2024-01-17 14:26:26 +00:00
|
|
|
|
|
|
|
|
#![feature(lang_items, no_core, auto_traits)]
|
|
|
|
|
#![no_core]
|
|
|
|
|
|
2025-01-23 11:25:12 +00:00
|
|
|
#[lang = "pointee_sized"]
|
|
|
|
|
pub trait PointeeSized {}
|
|
|
|
|
|
|
|
|
|
#[lang = "meta_sized"]
|
|
|
|
|
pub trait MetaSized: PointeeSized {}
|
|
|
|
|
|
2024-01-17 14:26:26 +00:00
|
|
|
#[lang = "sized"]
|
2025-01-23 11:25:12 +00:00
|
|
|
pub trait Sized: MetaSized {}
|
2025-03-29 02:41:32 +03:00
|
|
|
|
|
|
|
|
//~? ERROR differs from LLVM target's
|