Closed
Description
Code
fn main() {
let my = monad_bind(mx, T: Try);
}
Meta
rustc --version --verbose
:
rustc 1.71.0-nightly (2f2c438dc 2023-05-08)
binary: rustc
commit-hash: 2f2c438dce75d8cc532c3baa849eeddc0901802c
commit-date: 2023-05-08
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2
Error output
error: invalid `struct` delimiters or `fn` call arguments
--> treereduce.out:2:13
|
2 | let my = monad_bind(mx, T: Try);
| ^^^^^^^^^^^^^^^^^^^^^^
|
help: if `monad_bind` is a struct, use braces as delimiters
|
2 | let my = monad_bind { mx, T: Try };
| ~ ~
help: if `monad_bind` is a function, use the arguments directly
|
2 - let my = monad_bind(mx, T: Try);
2 + let my = monad_bind(mx, Try);
|
error: aborting due to previous error
Backtrace
thread 'rustc' panicked at 'assertion failed: `(left == right)`
left: `Some(SubstitutionPart { span: treereduce.out:2:24: 2:24 (#0), snippet: "" })`,
right: `None`: Span must not be empty and have no suggestion', /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:627:9
stack backtrace:
0: 0x7fcac7f10856 - std::backtrace_rs::backtrace::libunwind::trace::h74804ffdd8fa53e7
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7fcac7f10856 - std::backtrace_rs::backtrace::trace_unsynchronized::h7428ab2b67b36e0c
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fcac7f10856 - std::sys_common::backtrace::_print_fmt::h8de225fa5d864a16
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:65:5
3: 0x7fcac7f10856 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf186862c319ab6b0
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7fcac7faf868 - core::fmt::rt::Argument::fmt::h6eb98e918eb80ebd
at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/rt.rs:138:9
5: 0x7fcac7faf868 - core::fmt::write::hfa7c5695b2a1784c
at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/mod.rs:1094:21
6: 0x7fcac7f14aef - std::io::Write::write_fmt::h8780fc8b700f7b89
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/io/mod.rs:1712:15
7: 0x7fcac7f10655 - std::sys_common::backtrace::_print::h4ce540e460b36e22
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7fcac7f10655 - std::sys_common::backtrace::print::h6954c2242c47d1db
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7fcac7f2b4cc - std::panicking::default_hook::{{closure}}::h7efa3c73d7318a2f
10: 0x7fcac7f2b1a2 - std::panicking::default_hook::h478ef42d51f84426
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:288:9
11: 0x7fcaca7d0f5b - <alloc[32b43e9536c01a3]::boxed::Box<dyn for<'a, 'b> core[c5d5d662f7508502]::ops::function::Fn<(&'a core[c5d5d662f7508502]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[c5d5d662f7508502]::marker::Send + core[c5d5d662f7508502]::marker::Sync> as core[c5d5d662f7508502]::ops::function::Fn<(&core[c5d5d662f7508502]::panic::panic_info::PanicInfo,)>>::call
at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1999:9
12: 0x7fcaca7d0f5b - rustc_driver_impl[73f6269079133b5d]::install_ice_hook::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:1258:13
13: 0x7fcac7f2bd6a - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hfea6944ca11513b1
at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1999:9
14: 0x7fcac7f2bd6a - std::panicking::rust_panic_with_hook::h3d7c73761f67633f
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:695:13
15: 0x7fcac7f11977 - std::panicking::begin_panic_handler::{{closure}}::h0004dd01860b01c3
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:582:13
16: 0x7fcac7f10936 - std::sys_common::backtrace::__rust_end_short_backtrace::hccbfe31830e0f553
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:150:18
17: 0x7fcac7f2b8d2 - rust_begin_unwind
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:578:5
18: 0x7fcac7fcb403 - core::panicking::panic_fmt::h98b1dd38c1edb68b
at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:67:14
19: 0x7fcac7fcba5b - core::panicking::assert_failed_inner::h79afe05c154ecdae
20: 0x7fcacc05c559 - core[c5d5d662f7508502]::panicking::assert_failed::<core[c5d5d662f7508502]::option::Option<&rustc_errors[1f9d64dc51ea12e9]::SubstitutionPart>, core[c5d5d662f7508502]::option::Option<&rustc_errors[1f9d64dc51ea12e9]::SubstitutionPart>>
at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:228:5
21: 0x7fcacc0baaea - <rustc_errors[1f9d64dc51ea12e9]::diagnostic::Diagnostic>::multipart_suggestion_with_style::<rustc_error_messages[3577cd627fb7d0ea]::SubdiagnosticMessage>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:627:9
22: 0x7fcacc06e7ed - <rustc_parse[477438636d5d7ff3]::errors::NoFieldsForFnCall as rustc_errors[1f9d64dc51ea12e9]::diagnostic::AddToDiagnostic>::add_to_diagnostic_with::<<rustc_parse[477438636d5d7ff3]::errors::NoFieldsForFnCall as rustc_errors[1f9d64dc51ea12e9]::diagnostic::AddToDiagnostic>::add_to_diagnostic::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/errors.rs:625:10
23: 0x7fcacc06e7ed - <rustc_parse[477438636d5d7ff3]::errors::NoFieldsForFnCall as rustc_errors[1f9d64dc51ea12e9]::diagnostic::AddToDiagnostic>::add_to_diagnostic
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:79:9
24: 0x7fcacc07caab - <rustc_errors[1f9d64dc51ea12e9]::diagnostic::Diagnostic>::subdiagnostic::<rustc_parse[477438636d5d7ff3]::errors::NoFieldsForFnCall>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:904:9
25: 0x7fcacc07caab - <rustc_errors[1f9d64dc51ea12e9]::diagnostic_builder::DiagnosticBuilder<rustc_span[d70028f630b101c7]::ErrorGuaranteed>>::subdiagnostic::<rustc_parse[477438636d5d7ff3]::errors::NoFieldsForFnCall>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic_builder.rs:482:35
26: 0x7fcacc07caab - <rustc_parse[477438636d5d7ff3]::errors::ParenthesesWithStructFields as rustc_errors[1f9d64dc51ea12e9]::diagnostic_builder::IntoDiagnostic>::into_diagnostic
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/errors.rs:604:10
27: 0x7fcacbf767cd - <rustc_parse[477438636d5d7ff3]::parser::Parser>::maybe_recover_struct_lit_bad_delims
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:1189:55
28: 0x7fcacbf767cd - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_fn_call
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:1151:13
29: 0x7fcacbf767cd - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_dot_or_call_with_
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:980:61
30: 0x7fcacbf70ce3 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_dot_or_call_with
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:936:19
31: 0x7fcacbf70ce3 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_dot_or_call::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:923:13
32: 0x7fcacbf4aea7 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::collect_tokens_for_expr::<<rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_dot_or_call::{closure#0}>::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:3315:23
33: 0x7fcacbf4aea7 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::collect_tokens_trailing_token::<rustc_ast[9d0faf7d2343b833]::ptr::P<rustc_ast[9d0faf7d2343b833]::ast::Expr>, <rustc_parse[477438636d5d7ff3]::parser::Parser>::collect_tokens_for_expr<<rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_dot_or_call::{closure#0}>::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/attr_wrapper.rs:213:23
34: 0x7fcacbf6838c - <rustc_parse[477438636d5d7ff3]::parser::Parser>::collect_tokens_for_expr::<<rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_dot_or_call::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:3314:9
35: 0x7fcacbf6838c - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_dot_or_call
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:920:14
36: 0x7fcacbf6838c - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_prefix
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:611:25
37: 0x7fcacbf63b40 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_assoc_with
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:174:17
38: 0x7fcacbfd8e8e - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_assoc
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:153:9
39: 0x7fcacbfd8e8e - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_res::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:141:38
40: 0x7fcacbfd8e8e - <rustc_parse[477438636d5d7ff3]::parser::Parser>::with_res::<core[c5d5d662f7508502]::result::Result<rustc_ast[9d0faf7d2343b833]::ptr::P<rustc_ast[9d0faf7d2343b833]::ast::Expr>, rustc_errors[1f9d64dc51ea12e9]::diagnostic_builder::DiagnosticBuilder<rustc_span[d70028f630b101c7]::ErrorGuaranteed>>, <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_res::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/mod.rs:1370:19
41: 0x7fcacbfd8e8e - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr_res
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:141:14
42: 0x7fcacbfd8e8e - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_expr
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/expr.rs:100:14
43: 0x7fcacbfd8e8e - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_initializer
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/stmt.rs:421:54
44: 0x7fcacbfd8e8e - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_local
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/stmt.rs:321:27
45: 0x7fcacbfd5bb8 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_local_mk::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/stmt.rs:270:25
46: 0x7fcacbfd5bb8 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::collect_tokens_trailing_token::<rustc_ast[9d0faf7d2343b833]::ast::Stmt, <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_local_mk::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/attr_wrapper.rs:223:19
47: 0x7fcacbfd5bb8 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_local_mk
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/stmt.rs:268:9
48: 0x7fcacbfd5bb8 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_stmt_without_recovery
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/stmt.rs:72:13
49: 0x7fcacbfdbd94 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_full_stmt
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/stmt.rs:608:30
50: 0x7fcacbfdb6ea - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_block_tail
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/stmt.rs:560:30
51: 0x7fcacbfdb456 - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_block_common
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_parse/src/parser/stmt.rs:535:21
52: 0x7fcacbfb9b0b - <rustc_parse[477438636d5d7ff3]::parser::Parser>::parse_fn_body
.....
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a build of rustc or tooling with debug-assertions in some way