error: expected `;`, found keyword `let`
--> prog.rs:5:29
|
5 | .content(&message_content)
| ^ help: add `;` here
6 |
7 | let mut attachments_storage: Option<[Attachment, 1]> = None;
| --- unexpected token
error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `,`
--> prog.rs:7:49
|
7 | let mut attachments_storage: Option<[Attachment, 1]> = None;
| ----------------------- ^ expected one of 7 possible tokens
| |
| while parsing the type for `mut attachments_storage`
error[E0412]: cannot find type `Message` in this scope
--> prog.rs:1:17
|
1 | fn foo(message: Message, content: String) -> Result<(), Error> {
| ^^^^^^^ not found in this scope
error[E0412]: cannot find type `Error` in this scope
--> prog.rs:1:57
|
1 | fn foo(message: Message, content: String) -> Result<(), Error> {
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use std::error::Error;
|
1 | use std::fmt::Error;
|
1 | use std::io::Error;
|
error[E0425]: cannot find value `table_str` in this scope
--> prog.rs:2:48
|
2 | let message_content = format!("```\n{}\n```", table_str);
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `htc` in this scope
--> prog.rs:3:16
|
3 | let mut msg = htc.create_message(message.channel_id)
| ^^^ not found in this scope
error[E0601]: `main` function not found in crate `prog`
--> prog.rs:1:1
|
1 | / fn foo(message: Message, content: String) -> Result<(), Error> {
2 | | let message_content = format!("```\n{}\n```", table_str);
3 | | let mut msg = htc.create_message(message.channel_id)
4 | | .reply(message.message_id)
... |
26 | | Ok(())
27 | | }
| |_^ consider adding a `main` function to `prog.rs`
error: aborting due to 7 previous errors
Some errors have detailed explanations: E0412, E0425, E0601.
For more information about an error, try `rustc --explain E0412`.