Skip to content

Commit f8cbf95

Browse files
committed
cranelift/gcc: add const {Meta,}Sized to minicore
As before, but adding constness.
1 parent 5157ce7 commit f8cbf95

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

compiler/rustc_codegen_cranelift/example/mini_core.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
transparent_unions,
1010
auto_traits,
1111
freeze_impls,
12-
thread_local
12+
thread_local,
13+
const_trait_impl
1314
)]
1415
#![no_core]
1516
#![allow(dead_code, internal_features, ambiguous_wide_pointer_comparisons)]
@@ -18,9 +19,11 @@
1819
pub trait PointeeSized {}
1920

2021
#[lang = "meta_sized"]
22+
#[const_trait]
2123
pub trait MetaSized: PointeeSized {}
2224

2325
#[lang = "sized"]
26+
#[const_trait]
2427
pub trait Sized: MetaSized {}
2528

2629
#[lang = "destruct"]

compiler/rustc_codegen_gcc/example/mini_core.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![feature(
22
no_core, lang_items, intrinsics, unboxed_closures, extern_types,
33
decl_macro, rustc_attrs, transparent_unions, auto_traits, freeze_impls,
4-
thread_local
4+
thread_local, const_trait_impl
55
)]
66
#![no_core]
77
#![allow(dead_code, internal_features, ambiguous_wide_pointer_comparisons)]
@@ -15,9 +15,11 @@ unsafe extern "C" fn _Unwind_Resume() {
1515
pub trait PointeeSized {}
1616

1717
#[lang = "meta_sized"]
18+
#[const_trait]
1819
pub trait MetaSized: PointeeSized {}
1920

2021
#[lang = "sized"]
22+
#[const_trait]
2123
pub trait Sized: MetaSized {}
2224

2325
#[lang = "destruct"]

0 commit comments

Comments
 (0)