Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
1279b3b9232e4c44112d98f19cfa8846776d1fe8
rust/src/test/ui/issues/issue-22468.stderr

14 lines
380 B
Plaintext
Raw Normal View History

Move some `compile-fail` tests to `ui`
2018-07-15 14:11:54 -07:00
error[E0618]: expected function, found `&str`
Remove licenses
2018-12-25 08:56:47 -07:00
--> $DIR/issue-22468.rs:3:13
Move some `compile-fail` tests to `ui`
2018-07-15 14:11:54 -07:00
|
LL | let foo = "bar";
| --- `&str` defined here
LL | let x = foo("baz");
in which the E0618 "expected function" diagnostic gets a makeover Now the main span focuses on the erroneous not-a-function callee, while showing the entire call expression is relegated to a secondary span. In the case where the erroneous callee is itself a call, we point out the definition, and, if the call expression spans multiple lines, tentatively suggest a semicolon (because we suspect that the "outer" call is actually supposed to be a tuple). The new `bug!` assertion is, in fact, safe (`confirm_builtin_call` is only called by `check_call`, which is only called with a first arg of kind `ExprKind::Call` in `check_expr_kind`). Resolves #51055.
2018-11-10 20:46:05 -08:00
| ^^^-------
| |
| call expression requires function
Move some `compile-fail` tests to `ui`
2018-07-15 14:11:54 -07:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0618`.
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1895ms Template: 7ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API