forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#111531 - chenyukang:yukang-fix-111416-ice, …
…r=compiler-errors Fix ice caused by shorthand fields in NoFieldsForFnCall Fixes rust-lang#111416
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
let my = monad_bind(mx, T: Try); //~ ERROR invalid `struct` delimiters or `fn` call arguments | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
error: invalid `struct` delimiters or `fn` call arguments | ||
--> $DIR/issue-111416.rs:2:14 | ||
| | ||
LL | let my = monad_bind(mx, T: Try); | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
help: if `monad_bind` is a struct, use braces as delimiters | ||
| | ||
LL | let my = monad_bind { mx, T: Try }; | ||
| ~ ~ | ||
help: if `monad_bind` is a function, use the arguments directly | ||
| | ||
LL - let my = monad_bind(mx, T: Try); | ||
LL + let my = monad_bind(mx, Try); | ||
| | ||
|
||
error: aborting due to previous error | ||
|