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