2021-10-30 03:28:55 +03:00
|
|
|
// This module contains dead code. Its purpose is making sure that it compiles
|
2022-03-10 07:32:33 +03:00
|
|
|
|
|
|
|
// === Non-Standard Linter Configuration ===
|
2021-10-30 03:28:55 +03:00
|
|
|
#![allow(dead_code)]
|
2022-03-10 08:21:57 +03:00
|
|
|
#![deny(non_ascii_idents)]
|
|
|
|
#![warn(unsafe_code)]
|
2021-10-30 03:28:55 +03:00
|
|
|
|
|
|
|
use enso_prelude::*;
|
|
|
|
|
2022-03-10 07:32:33 +03:00
|
|
|
|
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(Clone, CloneRef)]
|
|
|
|
struct StructUnit;
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(Clone, CloneRef)]
|
|
|
|
struct StructUnnamedEmpty();
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(Clone, CloneRef)]
|
|
|
|
struct StructUnnamed(Rc<i32>, Rc<String>);
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(Clone, CloneRef)]
|
|
|
|
struct StructNamedEmpty {}
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(Clone, CloneRef)]
|
|
|
|
struct StructNamed {
|
|
|
|
named0: Rc<i32>,
|
|
|
|
named1: Rc<String>,
|
|
|
|
}
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(Clone, CloneRef)]
|
|
|
|
enum EnumEmpty {}
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(Clone, CloneRef)]
|
|
|
|
enum Enum {
|
2021-10-30 15:45:49 +03:00
|
|
|
Unit,
|
|
|
|
NamedEmpty {},
|
2021-11-10 16:36:08 +03:00
|
|
|
Named { named0: Rc<i32>, named1: Rc<String> },
|
2021-10-30 15:45:49 +03:00
|
|
|
UnnamedEmpty(),
|
2021-11-10 16:36:08 +03:00
|
|
|
Unnamed(Rc<i32>, Rc<String>),
|
2021-10-30 03:28:55 +03:00
|
|
|
}
|
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(CloneRef, Derivative)]
|
|
|
|
#[derivative(Clone(bound = ""))]
|
2021-10-30 03:28:55 +03:00
|
|
|
struct StructUnnamedUnbound<T>(Rc<T>);
|
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(CloneRef, Clone)]
|
|
|
|
#[clone_ref(bound = "T:CloneRef")]
|
2021-10-30 03:28:55 +03:00
|
|
|
struct StructUnnamedBound<T>(T);
|
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(CloneRef, Clone)]
|
|
|
|
#[clone_ref(bound = "T:CloneRef,U:CloneRef")]
|
|
|
|
struct StructUnnamedBoundTwoPatams<T, U>(T, U);
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(Clone, CloneRef)]
|
|
|
|
#[clone_ref(bound = "T:Clone+Display")]
|
|
|
|
struct StructBoundGeneric<T: Display>(Rc<T>);
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(CloneRef, Derivative)]
|
|
|
|
#[derivative(Clone(bound = ""))]
|
2021-10-30 03:28:55 +03:00
|
|
|
// Note: CloneRef "knows" about `Display` bound.
|
2021-10-30 15:45:49 +03:00
|
|
|
struct StructGenericLifetime<'t>(PhantomData<&'t String>);
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(CloneRef, Derivative)]
|
|
|
|
#[derivative(Clone(bound = ""))]
|
|
|
|
struct StructWhereClause<T>(Rc<T>)
|
|
|
|
where T: Debug;
|
2021-10-30 03:28:55 +03:00
|
|
|
|
2021-11-10 16:36:08 +03:00
|
|
|
#[derive(CloneRef, Clone)]
|
|
|
|
#[clone_ref(bound = "T:CloneRef")]
|
2021-10-30 03:28:55 +03:00
|
|
|
// Here derive macro must correctly merge user-provided bound, generics list bound and where clause.
|
2021-11-10 16:36:08 +03:00
|
|
|
struct StructVariousBounds<T: Display>(T)
|
|
|
|
where T: Debug;
|