Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error spam after syntax error. #97734

Closed
kevincox opened this issue Jun 4, 2022 · 3 comments · Fixed by #133937
Closed

Unhelpful error spam after syntax error. #97734

kevincox opened this issue Jun 4, 2022 · 3 comments · Fixed by #133937
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The parsing of Rust source code to an AST A-resolve Area: Name/path resolution done by `rustc_resolve` specifically D-verbose Diagnostics: Too much output caused by a single piece of incorrect code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@kevincox
Copy link
Contributor

kevincox commented Jun 4, 2022

Given the following code:

  1. Syntax error (visible in error message) in a ui.rs module.
  2. References to things in that module in other parts of the code.

(I don't appear to be able to reproduce this in the playground because it appears to require multiple files.)

The current output is:

error: could not compile `feedmail` due to 218 previous errors
    Checking feedmail v0.0.0 (/home/kevincox/p/feedmail)
error: expected one of `+`, `,`, `::`, `=`, or `>`, found `From`
  --> src/ui.rs:34:46
   |
34 | impl<S: Into<std::borrow::Cow<'static, str>> From<S> for Canonical {
   |                                              ^^^^ expected one of `+`, `,`, `::`, `=`, or `>`

error[E0433]: failed to resolve: could not find `Canonical` in `ui`
   --> src/billing.rs:129:14
    |
129 |         crate::ui::Canonical::NoIndex,
    |                    ^^^^^^^^^ could not find `Canonical` in `ui`

error[E0433]: failed to resolve: could not find `Canonical` in `ui`
   --> src/email.rs:290:14
    |
290 |         crate::ui::Canonical::NoIndex,
    |                    ^^^^^^^^^ could not find `Canonical` in `ui`

error[E0433]: failed to resolve: could not find `Canonical` in `ui`
   --> src/email.rs:444:14
    |
444 |         crate::ui::Canonical::NoIndex,
    |                    ^^^^^^^^^ could not find `Canonical` in `ui`

error[E0433]: failed to resolve: could not find `Canonical` in `ui`
    --> src/user.rs:1016:14
     |
1016 |         crate::ui::Canonical::NoIndex,
     |                    ^^^^^^^^^ could not find `Canonical` in `ui`

error[E0425]: cannot find function `error` in module `crate::ui`
  --> src/guards.rs:41:44
   |
41 |             return Err(crate::early_exit(crate::ui::error(
   |                                                     ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/guards.rs:107:15
    |
107 |             crate::ui::error(
    |                        ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/guards.rs:200:15
    |
200 |             crate::ui::redirect(
    |                        ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/guards.rs:223:14
    |
223 |         crate::ui::method_not_allowed(global, res, &[method])?;
    |                    ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/guards.rs:251:14
    |
251 |         crate::ui::error(
    |                    ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/guards.rs:270:15
    |
270 |             crate::ui::error(
    |                        ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/guards.rs:286:15
    |
286 |             crate::ui::error(
    |                        ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `maintenance` in module `crate::ui`
   --> src/guards.rs:301:36
    |
301 |         Err(crate::early_exit(crate::ui::maintenance(global, res, msg)))
    |                                          ^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
  --> src/howtosubscribe.rs:18:13
   |
18 |     crate::ui::set_cache_docs(global, req, res)?;
   |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
  --> src/howtosubscribe.rs:19:13
   |
19 |     crate::ui::template_with_description(
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/howtosubscribe.rs:29:15
   |
29 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/howtosubscribe.rs:33:15
   |
33 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/howtosubscribe.rs:37:15
   |
37 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/howtosubscribe.rs:41:15
   |
41 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/howtosubscribe.rs:45:15
   |
45 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/howtosubscribe.rs:49:15
   |
49 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/howtosubscribe.rs:53:15
   |
53 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/howtosubscribe.rs:57:15
   |
57 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/howtosubscribe.rs:61:15
   |
61 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/howtosubscribe.rs:137:13
    |
137 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/howtosubscribe.rs:140:13
    |
140 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/howtosubscribe.rs:167:13
    |
167 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/howtosubscribe.rs:170:13
    |
170 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/howtosubscribe.rs:197:13
    |
197 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/howtosubscribe.rs:200:13
    |
200 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/howtosubscribe.rs:260:13
    |
260 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/howtosubscribe.rs:263:13
    |
263 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/howtosubscribe.rs:374:13
    |
374 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/howtosubscribe.rs:377:13
    |
377 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/howtosubscribe.rs:405:13
    |
405 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/howtosubscribe.rs:408:13
    |
408 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/howtosubscribe.rs:462:13
    |
462 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/howtosubscribe.rs:465:13
    |
465 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/howtosubscribe.rs:500:13
    |
500 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/howtosubscribe.rs:503:13
    |
503 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/howtosubscribe.rs:531:13
    |
531 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/howtosubscribe.rs:534:13
    |
534 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email` in module `crate::ui`
   --> src/mail.rs:445:24
    |
445 |     let body = crate::ui::email(move |c| Box::pin(async move {
    |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email_subscription_footer` in module `crate::ui`
   --> src/mail.rs:495:14
    |
495 |         crate::ui::email_subscription_footer(&global2, c, notification.subscription).await?;
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email` in module `crate::ui`
   --> src/mail.rs:616:21
    |
616 |             .body(crate::ui::email(move |c| Box::pin(async move {
    |                              ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email_subscription_footer` in module `crate::ui`
   --> src/mail.rs:656:16
    |
656 |                 crate::ui::email_subscription_footer(&global2, c, n.subscription).await?;
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `not_found` in module `crate::ui`
   --> src/static_.rs:183:29
    |
183 |         None => return crate::ui::not_found(global, res),
    |                                   ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache` in module `crate::ui`
   --> src/static_.rs:187:13
    |
187 |     crate::ui::set_cache(res, "max-age=600,stale-while-revalidate=3600,stale-if-error=604800");
    |                ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_body` in module `crate::ui`
   --> src/static_.rs:189:13
    |
189 |     crate::ui::set_body(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `not_found` in module `crate::ui`
  --> src/admin.rs:10:47
   |
10 |         .ok_or_else(|| crate::early_exit(crate::ui::not_found(global, res)))
   |                                                     ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
  --> src/admin.rs:21:13
   |
21 |     crate::ui::template(
   |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/admin.rs:29:15
   |
29 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
  --> src/admin.rs:77:13
   |
77 |     crate::ui::template(
   |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
  --> src/admin.rs:88:15
   |
88 |             crate::ui::form(
   |                        ^^^^ not found in `crate::ui`
   |
help: consider importing this function
   |
1  | use crate::guards::form;
   |

error[E0425]: cannot find function `internal_error` in module `crate::ui`
  --> src/billing.rs:94:21
   |
94 |         return crate::ui::internal_error(global, res)
   |                           ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/billing.rs:111:13
    |
111 |     crate::ui::redirect(res, "Redirecting", session.url)
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/billing.rs:125:13
    |
125 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/billing.rs:194:22
    |
194 |             return crate::ui::error(
    |                               ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/billing.rs:205:22
    |
205 |             return crate::ui::error(
    |                               ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/billing.rs:240:21
    |
240 |         return crate::ui::text(res, "Payment pending")
    |                           ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/billing.rs:253:21
    |
253 |         return crate::ui::text(res, "Already handled.")
    |                           ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/billing.rs:302:13
    |
302 |     crate::ui::text(res, "OK")
    |                ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email` in module `crate::ui`
   --> src/billing.rs:322:24
    |
322 |     let body = crate::ui::email(move |c| Box::pin(async move {
    |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache` in module `crate::ui`
   --> src/billing.rs:367:13
    |
367 |     crate::ui::set_cache(res, "max-age=600,stale-while-revalidate=1200,stale-if-error=604800");
    |                ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/billing.rs:369:13
    |
369 |     crate::ui::text(res,
    |                ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
  --> src/docs.rs:10:13
   |
10 |     crate::ui::set_cache_docs(global, req, res)?;
   |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `page_with_description` in module `crate::ui`
  --> src/docs.rs:12:13
   |
12 |     crate::ui::page_with_description(
   |                ^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `nav` in module `crate::ui`
  --> src/docs.rs:21:15
   |
21 |             crate::ui::nav(&mut header.container()).await?;
   |                        ^^^ not found in `crate::ui`

error[E0425]: cannot find function `list_link` in module `crate::ui`
  --> src/docs.rs:58:15
   |
58 |             crate::ui::list_link(
   |                        ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/docs.rs:115:13
    |
115 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/docs.rs:116:13
    |
116 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache` in module `crate::ui`
   --> src/docs.rs:249:13
    |
249 |     crate::ui::set_cache(res, "max-age=60");
    |                ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/docs.rs:251:13
    |
251 |     crate::ui::text(res, r#"-----BEGIN PGP SIGNED MESSAGE-----
    |                ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/docs.rs:296:13
    |
296 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/docs.rs:298:13
    |
298 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/docs.rs:586:13
    |
586 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/docs.rs:587:13
    |
587 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
   --> src/docs.rs:644:13
    |
644 |     crate::ui::set_cache_docs(global, req, res)?;
    |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/docs.rs:646:13
    |
646 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
  --> src/email.rs:21:19
   |
21 |         _ => crate::ui::method_not_allowed(global, res, &[
   |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
  --> src/email.rs:35:13
   |
35 |     crate::ui::template(
   |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
  --> src/email.rs:40:27
   |
40 |         |c| Box::pin(crate::ui::form(
   |                                 ^^^^ not found in `crate::ui`
   |
help: consider importing this function
   |
1  | use crate::guards::form;
   |

error[E0425]: cannot find function `error` in module `crate::ui`
  --> src/email.rs:88:22
   |
88 |             return crate::ui::error(
   |                               ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `internal_error` in module `crate::ui`
   --> src/email.rs:131:21
    |
131 |         return crate::ui::internal_error(global, res);
    |                           ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/email.rs:151:22
    |
151 |             return crate::ui::error(
    |                               ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email_sent` in module `crate::ui`
   --> src/email.rs:167:13
    |
167 |     crate::ui::email_sent(
    |                ^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/email.rs:201:21
    |
201 |         return crate::ui::error(
    |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/email.rs:209:13
    |
209 |     crate::ui::redirect(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/email.rs:243:21
    |
243 |         return crate::ui::error(
    |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/email.rs:251:13
    |
251 |     crate::ui::redirect(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/email.rs:275:19
    |
275 |         _ => crate::ui::method_not_allowed(global, res, &[
    |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/email.rs:286:13
    |
286 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
   --> src/email.rs:291:27
    |
291 |         |c| Box::pin(crate::ui::form(
    |                                 ^^^^ not found in `crate::ui`
    |
help: consider importing this function
    |
1   | use crate::guards::form;
    |

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/email.rs:326:29
    |
326 |         None => return crate::ui::error(
    |                                   ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email_sent` in module `crate::ui`
   --> src/email.rs:340:13
    |
340 |     crate::ui::email_sent(
    |                ^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email` in module `crate::ui`
   --> src/email.rs:381:24
    |
381 |     let body = crate::ui::email(move |c| Box::pin(async move {
    |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/email.rs:429:19
    |
429 |         _ => crate::ui::method_not_allowed(global, res, &[
    |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/email.rs:440:13
    |
440 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
   --> src/email.rs:445:27
    |
445 |         |c| Box::pin(crate::ui::form(
    |                                 ^^^^ not found in `crate::ui`
    |
help: consider importing this function
    |
1   | use crate::guards::form;
    |

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/email.rs:465:22
    |
465 |             return crate::ui::error(
    |                               ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/email.rs:524:13
    |
524 |     crate::ui::redirect(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/email.rs:585:19
    |
585 |         _ => crate::ui::method_not_allowed(global, res, &[
    |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/email.rs:601:22
    |
601 |             return crate::ui::error(
    |                               ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/email.rs:619:13
    |
619 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
   --> src/email.rs:624:32
    |
624 |         move |c| Box::pin(crate::ui::form(
    |                                      ^^^^ not found in `crate::ui`
    |
help: consider importing this function
    |
1   | use crate::guards::form;
    |

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/email.rs:681:15
    |
681 |             crate::ui::error(
    |                        ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/email.rs:689:15
    |
689 |             crate::ui::redirect(
    |                        ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/email.rs:709:15
    |
709 |             crate::ui::template(
    |                        ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
   --> src/email.rs:714:34
    |
714 |                 move |c| Box::pin(crate::ui::form(
    |                                              ^^^^ not found in `crate::ui`
    |
help: consider importing this function
    |
1   | use crate::guards::form;
    |

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/email.rs:747:22
    |
747 |             return crate::ui::error(
    |                               ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/email.rs:780:21
    |
780 |         return crate::ui::error(
    |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/email.rs:789:13
    |
789 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `full_width_image` in module `crate::ui`
   --> src/feeds.rs:510:16
    |
510 |                 crate::ui::full_width_image(
    |                            ^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `full_width_video` in module `crate::ui`
   --> src/feeds.rs:516:16
    |
516 |                 crate::ui::full_width_video(
    |                            ^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/subscriptions.rs:125:13
    |
125 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/subscriptions.rs:447:19
    |
447 |         _ => crate::ui::method_not_allowed(global, res, &[
    |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_app` in module `crate::ui`
   --> src/subscriptions.rs:460:13
    |
460 |     crate::ui::set_cache_app(global, req, res)?;
    |                ^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/subscriptions.rs:463:13
    |
463 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
   --> src/subscriptions.rs:468:32
    |
468 |         move |c| Box::pin(crate::ui::form(
    |                                      ^^^^ not found in `crate::ui`
    |
help: consider importing this function
    |
1   | use crate::guards::form;
    |

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/subscriptions.rs:527:22
    |
527 |             return crate::ui::redirect(
    |                               ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/subscriptions.rs:541:22
    |
541 |             return crate::ui::redirect(
    |                               ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/subscriptions.rs:553:21
    |
553 |         return crate::ui::redirect(
    |                           ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/subscriptions.rs:573:13
    |
573 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `warning` in module `crate::ui`
   --> src/subscriptions.rs:582:18
    |
582 |                         crate::ui::warning(c,
    |                                    ^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `warning` in module `crate::ui`
   --> src/subscriptions.rs:597:17
    |
597 |                     crate::ui::warning(c,
    |                                ^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
   --> src/subscriptions.rs:618:15
    |
618 |             crate::ui::form(
    |                        ^^^^ not found in `crate::ui`
    |
help: consider importing this function
    |
1   | use crate::guards::form;
    |

error[E0425]: cannot find function `email_select` in module `crate::ui`
   --> src/subscriptions.rs:647:18
    |
647 |                         crate::ui::email_select(form, emails).await?;
    |                                    ^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/subscriptions.rs:715:24
    |
715 |                     return crate::ui::error(
    |                                       ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/subscriptions.rs:748:25
    |
748 |                         return crate::ui::redirect(
    |                                           ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/subscriptions.rs:785:23
    |
785 |                 return crate::ui::redirect(
    |                                   ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/subscriptions.rs:809:14
    |
809 |         crate::ui::redirect(
    |                    ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email_sent` in module `crate::ui`
   --> src/subscriptions.rs:814:14
    |
814 |         crate::ui::email_sent(
    |                    ^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/subscriptions.rs:834:19
    |
834 |         _ => crate::ui::method_not_allowed(global, res, &[
    |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/subscriptions.rs:849:13
    |
849 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form_multipart` in module `crate::ui`
   --> src/subscriptions.rs:854:32
    |
854 |         move |c| Box::pin(crate::ui::form_multipart(
    |                                      ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email_select` in module `crate::ui`
   --> src/subscriptions.rs:871:16
    |
871 |                 crate::ui::email_select(form, emails).await?;
    |                            ^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/subscriptions.rs:945:22
    |
945 |             return crate::ui::error(
    |                               ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
    --> src/subscriptions.rs:1008:13
     |
1008 |     crate::ui::template(
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_docs` in module `crate::ui`
    --> src/subscriptions.rs:1117:13
     |
1117 |     crate::ui::set_cache_docs(global, req, res)?;
     |                ^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
    --> src/subscriptions.rs:1118:13
     |
1118 |     crate::ui::template(
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_body` in module `crate::ui`
    --> src/subscriptions.rs:1231:13
     |
1231 |     crate::ui::set_body(res, "text/x-opml;charset=UTF-8", r)
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
    --> src/subscriptions.rs:1285:13
     |
1285 |     crate::ui::text(res, r)
     |                ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `not_found` in module `crate::ui`
    --> src/subscriptions.rs:1340:49
     |
1340 |         .or_else(|_| Err(crate::early_exit(crate::ui::not_found(global, res))))?;
     |                                                       ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
    --> src/subscriptions.rs:1373:21
     |
1373 |         return crate::ui::error(
     |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
    --> src/subscriptions.rs:1381:13
     |
1381 |     crate::ui::template(
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
    --> src/subscriptions.rs:1413:22
     |
1413 |             return crate::ui::redirect(
     |                               ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
    --> src/subscriptions.rs:1432:21
     |
1432 |         return crate::ui::error(
     |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
    --> src/subscriptions.rs:1440:13
     |
1440 |     crate::ui::template(
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `not_found` in module `crate::ui`
    --> src/subscriptions.rs:1468:49
     |
1468 |         .or_else(|_| Err(crate::early_exit(crate::ui::not_found(global, res))))?;
     |                                                       ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
    --> src/subscriptions.rs:1485:21
     |
1485 |         return crate::ui::error(
     |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
    --> src/subscriptions.rs:1493:13
     |
1493 |     crate::ui::redirect(
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `not_found` in module `crate::ui`
    --> src/subscriptions.rs:1513:49
     |
1513 |         .or_else(|_| Err(crate::early_exit(crate::ui::not_found(global, res))))?;
     |                                                       ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
    --> src/subscriptions.rs:1518:19
     |
1518 |         _ => crate::ui::method_not_allowed(global, res, &[
     |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
    --> src/subscriptions.rs:1594:29
     |
1594 |         None => return crate::ui::error(
     |                                   ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
    --> src/subscriptions.rs:1613:13
     |
1613 |     crate::ui::template(
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `warning` in module `crate::ui`
    --> src/subscriptions.rs:1620:16
     |
1620 |                 crate::ui::warning(
     |                            ^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email_select` in module `crate::ui`
    --> src/subscriptions.rs:1669:15
     |
1669 |             crate::ui::email_select(&mut form.container(), emails).await?;
     |                        ^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
    --> src/subscriptions.rs:1828:21
     |
1828 |         return crate::ui::error(
     |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
    --> src/subscriptions.rs:1836:13
     |
1836 |     crate::ui::redirect(
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
  --> src/user.rs:52:13
   |
52 |     crate::ui::template(
   |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `button` in module `crate::ui`
   --> src/user.rs:103:16
    |
103 |                 crate::ui::button(
    |                            ^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `button` in module `crate::ui`
   --> src/user.rs:112:16
    |
112 |                 crate::ui::button(
    |                            ^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `button` in module `crate::ui`
   --> src/user.rs:121:16
    |
121 |                 crate::ui::button(
    |                            ^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `button` in module `crate::ui`
   --> src/user.rs:130:16
    |
130 |                 crate::ui::button(
    |                            ^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/user.rs:194:19
    |
194 |         _ => crate::ui::method_not_allowed(global, res, &[
    |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_app` in module `crate::ui`
   --> src/user.rs:206:13
    |
206 |     crate::ui::set_cache_app(global, req, res)?;
    |                ^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache` in module `crate::ui`
   --> src/user.rs:218:14
    |
218 |         crate::ui::set_cache(res, "no-store");
    |                    ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/user.rs:221:13
    |
221 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
   --> src/user.rs:233:15
    |
233 |             crate::ui::form(
    |                        ^^^^ not found in `crate::ui`
    |
help: consider importing this function
    |
1   | use crate::guards::form;
    |

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/user.rs:303:22
    |
303 |             return crate::ui::redirect(res, e.clone(), UserNewQuery::err(e))
    |                               ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email_sent` in module `crate::ui`
   --> src/user.rs:309:13
    |
309 |     crate::ui::email_sent(
    |                ^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/user.rs:542:19
    |
542 |         _ => crate::ui::method_not_allowed(global, res, &[
    |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_app` in module `crate::ui`
   --> src/user.rs:554:13
    |
554 |     crate::ui::set_cache_app(global, req, res)?;
    |                ^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template_with_description` in module `crate::ui`
   --> src/user.rs:558:13
    |
558 |     crate::ui::template_with_description(
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
   --> src/user.rs:565:15
    |
565 |             crate::ui::form(
    |                        ^^^^ not found in `crate::ui`
    |
help: consider importing this function
    |
1   | use crate::guards::form;
    |

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/user.rs:653:22
    |
653 |             return crate::ui::redirect(
    |                               ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/user.rs:665:21
    |
665 |         return crate::ui::redirect(
    |                           ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/user.rs:686:21
    |
686 |         return crate::ui::redirect(
    |                           ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/user.rs:701:13
    |
701 |     crate::ui::redirect(res, "Login successful", target)
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
   --> src/user.rs:729:34
    |
729 |                 crate::early_exit(crate::ui::error(
    |                                              ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/user.rs:764:13
    |
764 |     crate::ui::redirect(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/user.rs:819:19
    |
819 |         _ => crate::ui::method_not_allowed(global, res, &[
    |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `set_cache_app` in module `crate::ui`
   --> src/user.rs:832:13
    |
832 |     crate::ui::set_cache_app(global, req, res)?;
    |                ^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
   --> src/user.rs:834:13
    |
834 |     crate::ui::template(
    |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
   --> src/user.rs:839:27
    |
839 |         |c| Box::pin(crate::ui::form(
    |                                 ^^^^ not found in `crate::ui`
    |
help: consider importing this function
    |
1   | use crate::guards::form;
    |

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/user.rs:898:22
    |
898 |             return crate::ui::redirect(
    |                               ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
   --> src/user.rs:930:22
    |
930 |             return crate::ui::redirect(
    |                               ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email` in module `crate::ui`
   --> src/user.rs:954:20
    |
954 |         .body(crate::ui::email(move |c| Box::pin(async move {
    |                          ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email` in module `crate::ui`
   --> src/user.rs:984:21
    |
984 |             .body(crate::ui::email(move |c| Box::pin(async move {
    |                              ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email_sent` in module `crate::ui`
    --> src/user.rs:1002:13
     |
1002 |     crate::ui::email_sent(
     |                ^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `template` in module `crate::ui`
    --> src/user.rs:1012:13
     |
1012 |     crate::ui::template(
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `form` in module `crate::ui`
    --> src/user.rs:1017:27
     |
1017 |         |c| Box::pin(crate::ui::form(
     |                                 ^^^^ not found in `crate::ui`
     |
help: consider importing this function
     |
1    | use crate::guards::form;
     |

error[E0425]: cannot find function `error` in module `crate::ui`
    --> src/user.rs:1077:22
     |
1077 |             return crate::ui::error(
     |                               ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `error` in module `crate::ui`
    --> src/user.rs:1108:21
     |
1108 |         return crate::ui::error(
     |                           ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `redirect` in module `crate::ui`
    --> src/user.rs:1147:13
     |
1147 |     crate::ui::redirect(
     |                ^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `email` in module `crate::ui`
    --> src/user.rs:1211:21
     |
1211 |             .body(crate::ui::email(move |c| Box::pin(async move {
     |                              ^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:119:22
    |
119 |             return crate::ui::text(res, e.as_str())
    |                               ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `method_not_allowed` in module `crate::ui`
   --> src/websub.rs:126:19
    |
126 |         _ => crate::ui::method_not_allowed(global, res, &[
    |                         ^^^^^^^^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:159:15
    |
159 |             crate::ui::text(res, "ok")
    |                        ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:177:23
    |
177 |                 return crate::ui::text(res, "Topic not requested.");
    |                                   ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:184:24
    |
184 |                     return crate::ui::text(res, "Expected lease_seconds")
    |                                       ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:197:15
    |
197 |             crate::ui::text(res, query.challenge)
    |                        ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:201:15
    |
201 |             crate::ui::text(res, "ok")
    |                        ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:204:15
    |
204 |             crate::ui::text(res, "unknown hub.mode")
    |                        ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:248:22
    |
248 |             return crate::ui::text(res, "No self link.")
    |                               ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:293:22
    |
293 |             return crate::ui::text(res, "Subscription removed.")
    |                               ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:304:21
    |
304 |         return crate::ui::text(res, "Topic not requested.")
    |                           ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:333:21
    |
333 |         return crate::ui::text(res, actix_web::body::BodyStream::new(recv));
    |                           ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/websub.rs:359:13
    |
359 |     crate::ui::text(res, "ok")
    |                ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `text` in module `ui`
   --> src/main.rs:284:6
    |
284 |     ui::text(res, "22ce4171-5051-47b4-91c9-fa2e54f1ffdf")
    |         ^^^^ not found in `ui`

error[E0425]: cannot find function `text` in module `crate::ui`
   --> src/main.rs:303:13
    |
303 |     crate::ui::text(res, "That took a while.")
    |                ^^^^ not found in `crate::ui`

error[E0425]: cannot find function `maintenance` in module `crate::ui`
   --> src/main.rs:442:22
    |
442 |             return crate::ui::maintenance(global, res, msg)
    |                               ^^^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `not_found` in module `crate::ui`
   --> src/main.rs:504:19
    |
504 |         _ => crate::ui::not_found(global, res),
    |                         ^^^^^^^^^ not found in `crate::ui`

error[E0425]: cannot find function `res` in module `crate::ui`
   --> src/main.rs:533:27
    |
533 |     let mut res = crate::ui::res();
    |                              ^^^ not found in `crate::ui`

error[E0425]: cannot find function `internal_error` in module `ui`
   --> src/main.rs:540:8
    |
540 |             ui::internal_error(global, &mut res)
    |                 ^^^^^^^^^^^^^^ not found in `ui`

error[E0283]: type annotations needed
   --> src/main.rs:508:1
    |
508 | / #[tracing::instrument(
509 | |     fields(
510 | |         enduser.id = crate::guards::try_user_raw(global, &req).ok().map(|s| s.payload.user),
511 | |         http.method = req.method().as_str(),
...   |
525 | |     skip_all,
526 | | )]
    | |__^ cannot infer type for type `{integer}`
    |
    = note: multiple `impl`s satisfying `{integer}: tracing::Value` found in the `tracing_core` crate:
            - impl tracing::Value for i16;
            - impl tracing::Value for i32;
            - impl tracing::Value for i64;
            - impl tracing::Value for i8;
            and 6 more
    = note: required for the cast to the object type `dyn tracing::Value`
    = note: this error originates in the macro `$crate::valueset` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0283, E0425, E0433.
For more information about an error, try `rustc --explain E0283`.
error: could not compile `feedmail` due to 217 previous errors

Ideally the output should look like:

error: could not compile `feedmail` due to 1 previous errors
    Checking feedmail v0.0.0 (/home/kevincox/p/feedmail)
error: expected one of `+`, `,`, `::`, `=`, or `>`, found `From`
  --> src/ui.rs:34:46
   |
34 | impl<S: Into<std::borrow::Cow<'static, str>> From<S> for Canonical {
   |                                              ^^^^ expected one of `+`, `,`, `::`, `=`, or `>`

error: could not compile `feedmail` due to 1 previous errors

The hundreds of errors about things functions not existing because they were after a syntax error in the file are not helpful.

#27189 would mitigate this issue but the current behaviour is pretty poor either way.

@kevincox kevincox added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 4, 2022
@compiler-errors
Copy link
Member

Perhaps we can limit the number of E0425 to emit here..

@kevincox
Copy link
Contributor Author

kevincox commented Jun 5, 2022

In this case 1 is already to many. It might be a mitigation but it doesn't really solve the problem. It seems that that error should only be emitted if the module was evaluated successfully. Otherwise it will be full of false positives.

@estebank estebank added D-verbose Diagnostics: Too much output caused by a single piece of incorrect code. A-resolve Area: Name/path resolution done by `rustc_resolve` specifically A-parser Area: The parsing of Rust source code to an AST labels Jun 6, 2022
@estebank
Copy link
Contributor

CC #74863, similar case, just in value scope.

estebank added a commit to estebank/rust that referenced this issue Dec 5, 2024
…r paths involving them

When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by `mod` expansion.

Fix rust-lang#97734.
estebank added a commit to estebank/rust that referenced this issue Dec 5, 2024
…r paths involving them

When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by `mod` expansion.

Fix rust-lang#97734.
estebank added a commit to estebank/rust that referenced this issue Dec 7, 2024
…r paths involving them

When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by `mod` expansion.

Fix rust-lang#97734.
estebank added a commit to estebank/rust that referenced this issue Dec 7, 2024
…r paths involving them

When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by `mod` expansion.

Fix rust-lang#97734.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 12, 2024
…om-mod-with-parse-errors, r=davidtwco

Keep track of parse errors in `mod`s and don't emit resolve errors for paths involving them

When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around in the HIR and mark its `DefId` in the `Resolver`. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by expansion of `mod`s with parse errors.

Fix rust-lang#97734.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 13, 2024
…om-mod-with-parse-errors, r=davidtwco

Keep track of parse errors in `mod`s and don't emit resolve errors for paths involving them

When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around in the HIR and mark its `DefId` in the `Resolver`. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by expansion of `mod`s with parse errors.

Fix rust-lang#97734.
@bors bors closed this as completed in 69fb612 Dec 14, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Dec 14, 2024
Rollup merge of rust-lang#133937 - estebank:silence-resolve-errors-from-mod-with-parse-errors, r=davidtwco

Keep track of parse errors in `mod`s and don't emit resolve errors for paths involving them

When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around in the HIR and mark its `DefId` in the `Resolver`. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by expansion of `mod`s with parse errors.

Fix rust-lang#97734.
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Dec 15, 2024
…th-parse-errors, r=davidtwco

Keep track of parse errors in `mod`s and don't emit resolve errors for paths involving them

When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around in the HIR and mark its `DefId` in the `Resolver`. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by expansion of `mod`s with parse errors.

Fix rust-lang/rust#97734.
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 15, 2024
…r paths involving them

When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by `mod` expansion.

Fix rust-lang#97734.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The parsing of Rust source code to an AST A-resolve Area: Name/path resolution done by `rustc_resolve` specifically D-verbose Diagnostics: Too much output caused by a single piece of incorrect code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
3 participants