Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct MyStruct;
- impl MyStruct {
- const item1 : &'static str = "Hello";
- pub fn print() {
- println!("{}", MyStruct::item1);
- }
- }
- fn main(){
- MyStruct::print();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement