Added items
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
pub module attribute_test;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Debuggable {
|
||||
value i32,
|
||||
}
|
||||
|
||||
pub fn void test_derive_attribute() {
|
||||
let d = Debuggable { value: 42 };
|
||||
assert_eq!(d.value, 42);
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
pub fn void test_allow_attribute() {
|
||||
let x = 42;
|
||||
let y = "unused";
|
||||
assert_eq!(x, 42);
|
||||
}
|
||||
|
||||
pub fn void run_tests() {
|
||||
test_derive_attribute();
|
||||
test_allow_attribute();
|
||||
}
|
||||
Reference in New Issue
Block a user