{
type PlaceInfo<'a> = PI;
@@ -192,7 +196,7 @@ pub mod noop {
}
#[derive(Default)]
- pub struct NoOpOperandHandler(PhantomData<(P, O)>);
+ pub struct NoOpOperandHandler
(PhantomData<(P, O)>);
impl
OperandHandler for NoOpOperandHandler
{
type Operand = O;
@@ -220,7 +224,7 @@ pub mod noop {
}
#[derive(Default)]
- pub struct NoOpAssignmentHandler
(PhantomData<(P, O)>);
+ pub struct NoOpAssignmentHandler
(PhantomData<(P, O)>);
impl
AssignmentHandler for NoOpAssignmentHandler
{
type Place = P;
@@ -313,7 +317,7 @@ pub mod noop {
}
#[derive(Default)]
- pub struct NoOpRawMemoryHandler
(PhantomData<(P, O)>);
+ pub struct NoOpRawMemoryHandler
(PhantomData<(P, O)>);
impl RawMemoryHandler for NoOpRawMemoryHandler {
type Place = P;
@@ -393,7 +397,7 @@ pub mod noop {
}
}
- pub struct NoOpConstraintHandler(PhantomData);
+ pub struct NoOpConstraintHandler(PhantomData);
impl Default for NoOpConstraintHandler {
fn default() -> Self {
@@ -433,6 +437,64 @@ pub mod noop {
}
}
+ #[derive(Default)]
+ pub struct NoOpCallHandler(PhantomData<(P, O)>);
+
+ impl
CallHandler for NoOpCallHandler
{
+ type Place = P;
+ type Operand = O;
+
+ fn before_call(self, _def: CalleeDef, _call_site: BasicBlockIndex) {}
+
+ fn before_call_some(self) {}
+
+ fn take_data_before_call(
+ self,
+ _func: Self::Operand,
+ _args: impl IntoIterator- ,
+ _are_args_tupled: bool,
+ ) {
+ }
+
+ fn enter(self, _def: FuncDef) {}
+
+ fn emplace_arguments(
+ self,
+ _arg_places: Vec,
+ _ret_val_place: Self::Place,
+ _tupling: ArgsTupling,
+ ) {
+ }
+
+ fn override_return_value(self, _value: Self::Operand) {}
+
+ fn ret(self, _ret_point: BasicBlockIndex) {}
+
+ fn after_call(self, _assignment_id: AssignmentId, _result_dest: Self::Place) {}
+ }
+
+ #[derive(Default)]
+ pub struct NoOpDropHandler
(PhantomData<(P, O)>);
+
+ impl
DropHandler for NoOpDropHandler
{
+ type Place = P;
+ type Operand = O;
+
+ fn before_drop(self, _def: CalleeDef, _call_site: BasicBlockIndex) {}
+
+ fn before_drop_some(self) {}
+
+ fn take_data_before_drop(
+ self,
+ _func: Self::Operand,
+ _arg: Self::Operand,
+ _place: Self::Place,
+ ) {
+ }
+
+ fn after_drop(self) {}
+ }
+
#[derive(Default)]
pub struct NoOpAnnotationHandler;
diff --git a/runtime/lib/src/pri/late_init.rs b/runtime/lib/src/pri/late_init.rs
index f8c71822..a28bb27f 100644
--- a/runtime/lib/src/pri/late_init.rs
+++ b/runtime/lib/src/pri/late_init.rs
@@ -1,10 +1,5 @@
-#[derive(Default)]
-pub struct LateInitPri
{
- _phantom: core::marker::PhantomData
,
-}
-
#[macro_export]
-macro_rules! late_init_func_defs {
+macro_rules! def_late_init {
($(#[$($attr: meta)*])* fn init_runtime_lib ($($(#[$($arg_attr: meta)*])* $arg:ident : $arg_type:ty),* $(,)?) $(-> $ret_ty:ty)?;) => {
$(#[$($attr)*])*
#[inline(always)]
@@ -35,22 +30,26 @@ macro_rules! late_init_func_defs {
}
#[macro_export]
-macro_rules! impl_pri_for_late_init_pri_of {
+macro_rules! make_late_init_pri_of {
($t:ident) => {
paste::paste! {
#[allow(non_snake_case)]
mod [<_for_ $t>] {
use common::pri::*;
- use $crate::{abs, pri::{LateInitPri, NoOpPri}};
-
+ use $crate::{abs, pri::NoOpPri};
use super::*;
type MainPri = $t;
static mut IS_ACTIVE: bool = false;
- impl common::pri::ProgramRuntimeInterface for LateInitPri {
+ #[derive(Default)]
+ pub struct [<$t LateInit>] {
+ _phantom: core::marker::PhantomData,
+ }
+
+ impl common::pri::ProgramRuntimeInterface for [<$t LateInit>] {
type U128 = u128;
type Char = char;
type ConstStr = &'static str;
@@ -65,9 +64,10 @@ macro_rules! impl_pri_for_late_init_pri_of {
type DebugInfo = common::pri::DebugInfo;
type Tag = abs::Tag;
- common::pri::list_func_decls! { modifier: $crate::late_init_func_defs, (from Self) }
+ common::pri::list_func_decls! { modifier: $crate::def_late_init, (from Self) }
}
}
+ pub use [<_for_ $t>]::[<$t LateInit>];
}
};
}
diff --git a/runtime/lib/src/pri/late_init_x.rs b/runtime/lib/src/pri/late_init_x.rs
deleted file mode 100644
index ff59dc76..00000000
--- a/runtime/lib/src/pri/late_init_x.rs
+++ /dev/null
@@ -1,74 +0,0 @@
-#[macro_export]
-macro_rules! def_late_init {
- ($(#[$($attr: meta)*])* fn init_runtime_lib ($($(#[$($arg_attr: meta)*])* $arg:ident : $arg_type:ty),* $(,)?) $(-> $ret_ty:ty)?;) => {
- $(#[$($attr)*])*
- #[inline(always)]
- fn init_runtime_lib ($($(#[$($arg_attr)*])* $arg : $arg_type),*) $(-> $ret_ty)? {
- MainPri::init_runtime_lib($($arg.into()),*);
- unsafe { IS_ACTIVE = true; }
- }
- };
- ($(#[$($attr: meta)*])* fn shutdown_runtime_lib ($($(#[$($arg_attr: meta)*])* $arg:ident : $arg_type:ty),* $(,)?) $(-> $ret_ty:ty)?;) => {
- $(#[$($attr)*])*
- #[inline(always)]
- fn shutdown_runtime_lib ($($(#[$($arg_attr)*])* $arg : $arg_type),*) $(-> $ret_ty)? {
- MainPri::shutdown_runtime_lib($($arg.into()),*);
- unsafe { IS_ACTIVE = false; }
- }
- };
- ($(#[$($attr: meta)*])* fn $name:ident ($($(#[$($arg_attr: meta)*])* $arg:ident : $arg_type:ty),* $(,)?) $(-> $ret_ty:ty)?;) => {
- $(#[$($attr)*])*
- #[inline(always)]
- fn $name ($($(#[$($arg_attr)*])* $arg : $arg_type),*) $(-> $ret_ty)? {
- if core::hint::likely(unsafe { IS_ACTIVE }) {
- MainPri::$name($($arg.into()),*).into()
- } else {
- NoOpPri::$name($($arg.into()),*).into()
- }
- }
- };
-}
-
-#[macro_export]
-macro_rules! make_late_init_pri_of {
- ($t:ident) => {
- paste::paste! {
- #[allow(non_snake_case)]
- mod [<_for_ $t>] {
- use common::pri::*;
-
- use $crate::{abs, pri::{LateInitPri, NoOpPri}};
-
- use super::*;
-
- type MainPri = $t;
-
- static mut IS_ACTIVE: bool = false;
-
- #[derive(Default)]
- pub struct [<$t LateInit>] {
- _phantom: core::marker::PhantomData,
- }
-
- impl common::pri::ProgramRuntimeInterface for [<$t LateInit>] {
- type U128 = u128;
- type Char = char;
- type ConstStr = &'static str;
- type ConstByteStr = &'static [u8];
- type Slice<'a, T: 'a> = &'a [T];
- type TypeId = abs::TypeId;
- type PrimitiveType = abs::PrimitiveType;
- type BinaryOp = abs::BinaryOp;
- type UnaryOp = abs::UnaryOp;
- type AtomicOrdering = abs::AtomicOrdering;
- type AtomicBinaryOp = abs::AtomicBinaryOp;
- type DebugInfo = common::pri::DebugInfo;
- type Tag = abs::Tag;
-
- common::pri::list_func_decls! { modifier: $crate::def_late_init, (from Self) }
- }
- }
- pub use [<_for_ $t>]::[<$t LateInit>];
- }
- };
-}
diff --git a/runtime/lib/src/pri/mod.rs b/runtime/lib/src/pri/mod.rs
index 972bd156..36d9ef5a 100644
--- a/runtime/lib/src/pri/mod.rs
+++ b/runtime/lib/src/pri/mod.rs
@@ -1,9 +1,7 @@
mod ffi;
pub mod fluent;
-mod late_init;
-pub mod late_init_x;
+pub mod late_init;
mod noop;
pub mod refs;
-pub use late_init::LateInitPri;
pub use noop::NoOpPri;
diff --git a/samples/.test_compile_rs.ignore b/samples/.test_compile_rs.ignore
index a4f3873b..7f370f1a 100644
--- a/samples/.test_compile_rs.ignore
+++ b/samples/.test_compile_rs.ignore
@@ -1,3 +1,3 @@
crates/
-projection/unwrap_unsafe_binder/main.rs
+place/projection/unwrap_unsafe_binder/main.rs
playground/
\ No newline at end of file
diff --git a/samples/.test_execution_rs.ignore b/samples/.test_execution_rs.ignore
index 4f1c06e1..dbfd41b4 100644
--- a/samples/.test_execution_rs.ignore
+++ b/samples/.test_execution_rs.ignore
@@ -6,7 +6,7 @@ casting/pointer/expose/sym_ptr_to_usize.rs
casting/transmute/sym_partial_mid.rs
function/async/basic.rs
function/coroutines/basic.rs
-projection/unwrap_unsafe_binder/main.rs
+place/projection/unwrap_unsafe_binder/main.rs
sym_place/read/addr_of.rs
sym_place/read/agg_raw_ptr.rs
sym_place/read/deref_ptr.rs
diff --git a/samples/casting/numeric/discr/main.rs b/samples/assignment/casting/numeric/discr/main.rs
similarity index 100%
rename from samples/casting/numeric/discr/main.rs
rename to samples/assignment/casting/numeric/discr/main.rs
diff --git a/samples/casting/numeric/floats/main.rs b/samples/assignment/casting/numeric/floats/main.rs
similarity index 100%
rename from samples/casting/numeric/floats/main.rs
rename to samples/assignment/casting/numeric/floats/main.rs
diff --git a/samples/casting/numeric/int_only/main.rs b/samples/assignment/casting/numeric/int_only/main.rs
similarity index 100%
rename from samples/casting/numeric/int_only/main.rs
rename to samples/assignment/casting/numeric/int_only/main.rs
diff --git a/samples/casting/numeric/int_only/multi.rs b/samples/assignment/casting/numeric/int_only/multi.rs
similarity index 100%
rename from samples/casting/numeric/int_only/multi.rs
rename to samples/assignment/casting/numeric/int_only/multi.rs
diff --git a/samples/casting/numeric/int_only/sym_main.rs b/samples/assignment/casting/numeric/int_only/sym_main.rs
similarity index 100%
rename from samples/casting/numeric/int_only/sym_main.rs
rename to samples/assignment/casting/numeric/int_only/sym_main.rs
diff --git a/samples/casting/pointer/expose/ptr_to_usize.rs b/samples/assignment/casting/pointer/expose/ptr_to_usize.rs
similarity index 100%
rename from samples/casting/pointer/expose/ptr_to_usize.rs
rename to samples/assignment/casting/pointer/expose/ptr_to_usize.rs
diff --git a/samples/casting/pointer/expose/sym_ptr_to_usize.rs b/samples/assignment/casting/pointer/expose/sym_ptr_to_usize.rs
similarity index 100%
rename from samples/casting/pointer/expose/sym_ptr_to_usize.rs
rename to samples/assignment/casting/pointer/expose/sym_ptr_to_usize.rs
diff --git a/samples/casting/pointer/to_pointer/fn_ptr_to_another_ptr.rs b/samples/assignment/casting/pointer/to_pointer/fn_ptr_to_another_ptr.rs
similarity index 100%
rename from samples/casting/pointer/to_pointer/fn_ptr_to_another_ptr.rs
rename to samples/assignment/casting/pointer/to_pointer/fn_ptr_to_another_ptr.rs
diff --git a/samples/casting/pointer/to_pointer/mut_to_const_ptr.rs b/samples/assignment/casting/pointer/to_pointer/mut_to_const_ptr.rs
similarity index 100%
rename from samples/casting/pointer/to_pointer/mut_to_const_ptr.rs
rename to samples/assignment/casting/pointer/to_pointer/mut_to_const_ptr.rs
diff --git a/samples/casting/pointer/to_pointer/ptr_to_another_ptr.rs b/samples/assignment/casting/pointer/to_pointer/ptr_to_another_ptr.rs
similarity index 100%
rename from samples/casting/pointer/to_pointer/ptr_to_another_ptr.rs
rename to samples/assignment/casting/pointer/to_pointer/ptr_to_another_ptr.rs
diff --git a/samples/casting/pointer/to_pointer/usize_to_ptr.rs b/samples/assignment/casting/pointer/to_pointer/usize_to_ptr.rs
similarity index 100%
rename from samples/casting/pointer/to_pointer/usize_to_ptr.rs
rename to samples/assignment/casting/pointer/to_pointer/usize_to_ptr.rs
diff --git a/samples/casting/pointer/unsize_dyn/main.rs b/samples/assignment/casting/pointer/unsize_dyn/main.rs
similarity index 100%
rename from samples/casting/pointer/unsize_dyn/main.rs
rename to samples/assignment/casting/pointer/unsize_dyn/main.rs
diff --git a/samples/casting/pointer/unsize_slice/main.rs b/samples/assignment/casting/pointer/unsize_slice/main.rs
similarity index 100%
rename from samples/casting/pointer/unsize_slice/main.rs
rename to samples/assignment/casting/pointer/unsize_slice/main.rs
diff --git a/samples/casting/subtype/main.rs b/samples/assignment/casting/subtype/main.rs
similarity index 100%
rename from samples/casting/subtype/main.rs
rename to samples/assignment/casting/subtype/main.rs
diff --git a/samples/casting/transmute/basic.rs b/samples/assignment/casting/transmute/basic.rs
similarity index 100%
rename from samples/casting/transmute/basic.rs
rename to samples/assignment/casting/transmute/basic.rs
diff --git a/samples/casting/transmute/sym_partial.rs b/samples/assignment/casting/transmute/sym_partial.rs
similarity index 100%
rename from samples/casting/transmute/sym_partial.rs
rename to samples/assignment/casting/transmute/sym_partial.rs
diff --git a/samples/casting/transmute/sym_partial_mid.rs b/samples/assignment/casting/transmute/sym_partial_mid.rs
similarity index 100%
rename from samples/casting/transmute/sym_partial_mid.rs
rename to samples/assignment/casting/transmute/sym_partial_mid.rs
diff --git a/samples/assignment/shallow_init_box/main.rs b/samples/assignment/shallow_init_box/main.rs
deleted file mode 100644
index febb58ba..00000000
--- a/samples/assignment/shallow_init_box/main.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn main() {
- let a = vec![1, 2, 3];
-}
\ No newline at end of file
diff --git a/samples/branching/match_enum/range.rs b/samples/branching/match_enum/range.rs
new file mode 100644
index 00000000..3de231a9
--- /dev/null
+++ b/samples/branching/match_enum/range.rs
@@ -0,0 +1,14 @@
+fn main() {
+ let x = core::hint::black_box(10u8);
+ #[cfg(leafc)]
+ let x: u8 = {
+ use leaf::annotations::*;
+ x.mark_symbolic()
+ };
+
+ match x % 5 {
+ 1..=2 => core::hint::black_box(()),
+ 3..=4 => core::hint::black_box(()),
+ _ => core::hint::black_box(()),
+ }
+}
diff --git a/samples/branching/match_range/main.rs b/samples/branching/match_range/main.rs
deleted file mode 100644
index a5a3a5bb..00000000
--- a/samples/branching/match_range/main.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-use leaf::annotations::*;
-
-fn main() {
- let x = 10u8.mark_symbolic();
-
- match x % 5 {
- 1..=3 => foo(),
- 4 => foo(),
- _ => foo(),
- }
-}
-
-fn foo() {}
diff --git a/samples/assignment/const/addr.rs b/samples/const/addr.rs
similarity index 100%
rename from samples/assignment/const/addr.rs
rename to samples/const/addr.rs
diff --git a/samples/assignment/const/blocks.rs b/samples/const/blocks.rs
similarity index 81%
rename from samples/assignment/const/blocks.rs
rename to samples/const/blocks.rs
index 594ff591..0be5a400 100644
--- a/samples/assignment/const/blocks.rs
+++ b/samples/const/blocks.rs
@@ -44,11 +44,10 @@ impl TestTrait for TestStruct {
const TRAIT_TEST: &dyn TestTrait = &TestStruct { a: 10 };
-// Not supported yet
-// const UNION_TEST: TestUnion = TestUnion { a: 10 };
-// const CLOSURE_TEST: fn(i32) -> i32 = |x| x + 1;
-// const RAW_PTR_TEST: *const i32 = &2 as *const i32;
-// const FN_PTR_TEST: fn() -> () = foo;
+const UNION_TEST: TestUnion = TestUnion { a: 10 };
+const CLOSURE_TEST: fn(i32) -> i32 = |x| x + 1;
+const RAW_PTR_TEST: *const i32 = &2 as *const i32;
+const FN_PTR_TEST: fn() -> () = foo;
fn main() {
use_item(BOOL_TEST);
@@ -80,11 +79,10 @@ fn main() {
let const_param = bar::<20>();
use_item(const_param);
- // Not supported yet
- // use_item(UNION_TEST);
- // use_item(CLOSURE_TEST);
- // use_item(RAW_PTR_TEST);
- // use_item(FN_PTR_TEST);
+ use_item(UNION_TEST);
+ use_item(CLOSURE_TEST);
+ use_item(RAW_PTR_TEST);
+ use_item(FN_PTR_TEST);
}
fn use_item(x: T) -> () {
diff --git a/samples/assignment/const/main.rs b/samples/const/main.rs
similarity index 100%
rename from samples/assignment/const/main.rs
rename to samples/const/main.rs
diff --git a/samples/assignment/const/zst.rs b/samples/const/zst.rs
similarity index 100%
rename from samples/assignment/const/zst.rs
rename to samples/const/zst.rs
diff --git a/samples/crates/sym_basic_bin/Cargo.lock b/samples/crates/sym_basic_bin/Cargo.lock
deleted file mode 100644
index 16203e21..00000000
--- a/samples/crates/sym_basic_bin/Cargo.lock
+++ /dev/null
@@ -1,7 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 3
-
-[[package]]
-name = "sym_basic_bin"
-version = "0.1.0"
diff --git a/samples/crates/sym_basic_bin/Cargo.toml b/samples/crates/sym_basic_bin/Cargo.toml
deleted file mode 100644
index b2beb989..00000000
--- a/samples/crates/sym_basic_bin/Cargo.toml
+++ /dev/null
@@ -1,8 +0,0 @@
-[package]
-name = "sym_basic_bin"
-version = "0.1.0"
-edition = "2021"
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
-
-[dependencies]
diff --git a/samples/crates/sym_basic_bin/src/child.rs b/samples/crates/sym_basic_bin/src/child.rs
deleted file mode 100644
index 3c49f43d..00000000
--- a/samples/crates/sym_basic_bin/src/child.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-use super::*;
-
-pub fn calc(x: i32, y: i32) {
- if x < y {
- foo();
- } else {
- bar();
- }
-}
diff --git a/samples/crates/sym_basic_bin/src/main.rs b/samples/crates/sym_basic_bin/src/main.rs
deleted file mode 100644
index 73c7aad9..00000000
--- a/samples/crates/sym_basic_bin/src/main.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-use leaf::annotations::Symbolizable;
-
-mod child;
-
-use child::calc;
-
-fn main() {
- let x = 0.mark_symbolic();
- calc(x, 5);
-}
-
-fn foo() {}
-
-fn bar() {}
diff --git a/samples/drop/drop_in_place.rs b/samples/drop/drop_glue.rs
similarity index 100%
rename from samples/drop/drop_in_place.rs
rename to samples/drop/drop_glue.rs
diff --git a/samples/function/return_unit/main.rs b/samples/function/call_basic/return_unit.rs
similarity index 96%
rename from samples/function/return_unit/main.rs
rename to samples/function/call_basic/return_unit.rs
index e2af6cba..3249052d 100644
--- a/samples/function/return_unit/main.rs
+++ b/samples/function/call_basic/return_unit.rs
@@ -4,4 +4,4 @@ fn main() {
fn foo() -> () {
// Nothing
-}
\ No newline at end of file
+}
diff --git a/samples/function/println/hello_world.rs b/samples/function/println/hello_world.rs
deleted file mode 100644
index 2fe40a14..00000000
--- a/samples/function/println/hello_world.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn main() {
- println!("hello world!");
-}
diff --git a/samples/hello_world.rs b/samples/hello_world.rs
index 17940788..a5970bbc 100644
--- a/samples/hello_world.rs
+++ b/samples/hello_world.rs
@@ -1,5 +1,5 @@
fn main() {
- let x: u8 = core::hint::black_box(10);
+ let x: u8 = core::hint::black_box(2);
#[cfg(leafc)]
let x: u8 = {
use leaf::annotations::*;
diff --git a/samples/misc/constant_folding/main.rs b/samples/misc/constant_folding/main.rs
deleted file mode 100644
index 1f940d84..00000000
--- a/samples/misc/constant_folding/main.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-use leaf::annotations::Symbolizable;
-
-fn main() {
- let x = 0_u8.mark_symbolic();
-
- if (x + 5) + 10 < 100 {
- do_something();
- } else {
- do_something_else();
- }
-}
-
-fn do_something() {}
-
-fn do_something_else() {}
diff --git a/samples/misc/external_fn/hash.rs b/samples/misc/external_fn/hash.rs
deleted file mode 100644
index a70fcdd8..00000000
--- a/samples/misc/external_fn/hash.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-use std::collections::hash_map::DefaultHasher;
-use std::hash::{Hash, Hasher};
-
-#[derive(Hash)]
-struct AA {
- a: u32,
- b: u64,
-}
-
-// from: https://doc.rust-lang.org/std/hash/index.html
-fn main() {
- let aa = AA { a: 0, b: 20 };
-
- let mut s = DefaultHasher::new();
- aa.hash(&mut s);
- let res: u64 = s.finish();
-}
diff --git a/samples/misc/intrinsics/call_intrinsic.rs b/samples/misc/intrinsics/call_intrinsic.rs
deleted file mode 100644
index f16c0e2c..00000000
--- a/samples/misc/intrinsics/call_intrinsic.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![feature(core_intrinsics)]
-/* NOTE: Normal programs are not expected to call intrinsics directly.
- * However, this sample can imitate what happens in the core library. */
-fn main() {
- let a = get_num(5);
- if core::intrinsics::bitreverse(a) == a {
- foo();
- }
-}
-
-fn get_num(x: u8) -> u8 {
- x + 5
-}
-
-#[inline(never)]
-fn foo() {}
diff --git a/samples/misc/multiple_vars/main.rs b/samples/misc/multiple_vars/main.rs
deleted file mode 100644
index 8df70978..00000000
--- a/samples/misc/multiple_vars/main.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-use leaf::annotations::Symbolizable;
-
-fn main() {
- let x = 10.mark_symbolic();
- let a = calc(x, 5);
- let y = 20.mark_symbolic();
- let b = calc(y, 3);
-
- // Using bitwise AND instead of logical AND to make them appear in one branch.
- if (a == 15) & (b == 25) {
- foo();
- }
-}
-
-fn calc(x: u32, y: u32) -> u32 {
- x + y
-}
-
-fn foo() {}
diff --git a/samples/misc/sym_field/main.rs b/samples/misc/sym_field/main.rs
deleted file mode 100644
index 26f8a92d..00000000
--- a/samples/misc/sym_field/main.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-use leaf::annotations::Symbolizable;
-
-fn main() {
- let foo = Foo {
- x: 10.mark_symbolic(),
- y: 2.mark_symbolic(),
- };
- if (foo.x < 10) & (foo.x > 5) {
- error();
- }
- let bar = Bar { foo, z: 3 };
- check_bar(bar);
-}
-
-fn check_bar(bar: Bar) {
- if bar.foo.x < bar.z {
- error();
- }
-}
-
-fn error() {}
-
-struct Foo {
- x: u32,
- y: u32,
-}
-
-struct Bar {
- foo: Foo,
- z: u32,
-}
diff --git a/samples/misc/type_export/mono.rs b/samples/misc/type_export/mono.rs
deleted file mode 100644
index c578e591..00000000
--- a/samples/misc/type_export/mono.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-fn main() {
- tupler(1_u16, 2_i16); // expect "(u16, i16)" in type export
-}
-
-fn tupler(a: T1, b: T2) {
- foo((a, b));
-}
-
-fn foo(x: T) {}
diff --git a/samples/projection/downcast/enum/main.rs b/samples/place/projection/downcast/enum/main.rs
similarity index 100%
rename from samples/projection/downcast/enum/main.rs
rename to samples/place/projection/downcast/enum/main.rs
diff --git a/samples/projection/field/main.rs b/samples/place/projection/field/main.rs
similarity index 100%
rename from samples/projection/field/main.rs
rename to samples/place/projection/field/main.rs
diff --git a/samples/projection/index/main.rs b/samples/place/projection/index/main.rs
similarity index 100%
rename from samples/projection/index/main.rs
rename to samples/place/projection/index/main.rs
diff --git a/samples/projection/unwrap_unsafe_binder/main.rs b/samples/place/projection/unwrap_unsafe_binder/main.rs
similarity index 100%
rename from samples/projection/unwrap_unsafe_binder/main.rs
rename to samples/place/projection/unwrap_unsafe_binder/main.rs