You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling playground v0.0.1 (/playground)
error[E0670]: `async fn` is not permitted in Rust 2015
--> src/main.rs:31:1
|
31 | async fn get_base_url(url: &Url, doc: &Document) -> Result<Url, BrokenError> {
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
= help: set `edition = "2021"` in `Cargo.toml`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
--> src/main.rs:38:1
|
38 | async fn check_link(url: &Url) -> Result<bool, BrokenError> {
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
= help: set `edition = "2021"` in `Cargo.toml`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0670]: `async fn` is not permitted in Rust 2015
--> src/main.rs:43:5
|
43 | pub async fn check(site: &str) -> Result<CategorizedUrls, BrokenError> {
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
= help: set `edition = "2021"` in `Cargo.toml`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error: `async move` blocks are only allowed in Rust 2018 or later
--> src/main.rs:59:33
|
59 | tasks.push(tokio::spawn(async move {
| ^^^^^^^^^^
error: expected item, found `[`
--> src/main.rs:80:1
|
80 | [tokio::main]
| ^ expected item
|
= note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
For more information about this error, try `rustc --explain E0670`.
error: could not compile `playground` (bin "playground") due to 5 previous errors
The text was updated successfully, but these errors were encountered:
https://rust-lang-nursery.github.io/rust-cookbook/web/scraping.html#check-a-webpage-for-broken-links
The text was updated successfully, but these errors were encountered: