Closed
Description
Code
trait StructuredDiagnostic {
fn extended (# [ doc ( alias = "false" ) ] DiagnosticBuilder){
}
}
Meta
rustc --version --verbose
:
rustc 1.54.0-nightly (0a8629bff 2021-06-11)
binary: rustc
commit-hash: 0a8629bff642c3c3b84bb644c0099194f063b627
commit-date: 2021-06-11
host: x86_64-unknown-linux-gnu
release: 1.54.0-nightly
LLVM version: 12.0.1
Error output
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
--> mutant.rs:2:14
|
2 | fn extended (# [ doc ( alias = "false" ) ] DiagnosticBuilder){
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0412]: cannot find type `DiagnosticBuilder` in this scope
--> mutant.rs:2:44
|
2 | fn extended (# [ doc ( alias = "false" ) ] DiagnosticBuilder){
| ^^^^^^^^^^^^^^^^^ not found in this scope
warning: anonymous parameters are deprecated and will be removed in the next edition.
--> mutant.rs:2:44
|
2 | fn extended (# [ doc ( alias = "false" ) ] DiagnosticBuilder){
| ^^^^^^^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: DiagnosticBuilder`
|
= note: `#[warn(anonymous_parameters)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
error: internal compiler error: compiler/rustc_middle/src/hir/map/mod.rs:810:21: no name for param # [ doc ( alias = "false" ) ] DiagnosticBuilder (hir_id=HirId { owner: DefId(0:4 ~ mutant[8787]::StructuredDiagnostic::extended), local_id: 1 })
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1007:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.54.0-nightly (0a8629bff 2021-06-11) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z mir-opt-level=3 -Z new-llvm-pass-manager=yes -Z unsound-mir-opts=yes -Z polonius=yes -Z polymorphize=yes -C debuginfo=2 -C opt-level=3 --crate-type staticlib
query stack during panic:
#0 [check_mod_attrs] checking attributes in top-level module
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 3 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0412`.
Backtrace
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
--> mutant.rs:2:14
|
2 | fn extended (# [ doc ( alias = "false" ) ] DiagnosticBuilder){
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0412]: cannot find type `DiagnosticBuilder` in this scope
--> mutant.rs:2:44
|
2 | fn extended (# [ doc ( alias = "false" ) ] DiagnosticBuilder){
| ^^^^^^^^^^^^^^^^^ not found in this scope
warning: anonymous parameters are deprecated and will be removed in the next edition.
--> mutant.rs:2:44
|
2 | fn extended (# [ doc ( alias = "false" ) ] DiagnosticBuilder){
| ^^^^^^^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: DiagnosticBuilder`
|
= note: `#[warn(anonymous_parameters)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
error: internal compiler error: compiler/rustc_middle/src/hir/map/mod.rs:810:21: no name for param # [ doc ( alias = "false" ) ] DiagnosticBuilder (hir_id=HirId { owner: DefId(0:4 ~ mutant[8787]::StructuredDiagnostic::extended), local_id: 1 })
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1007:9
stack backtrace:
0: std::panicking::begin_panic
1: std::panic::panic_any
2: rustc_errors::HandlerInner::bug
3: rustc_errors::Handler::bug
4: rustc_middle::ty::context::tls::with_opt
5: rustc_middle::util::bug::opt_span_bug_fmt
6: rustc_middle::util::bug::bug_fmt
7: rustc_middle::hir::map::Map::name
8: rustc_passes::check_attr::CheckAttrVisitor::check_doc_alias_value
9: rustc_passes::check_attr::CheckAttrVisitor::check_attributes
10: rustc_hir::intravisit::walk_body
11: rustc_hir::intravisit::walk_fn
12: rustc_hir::intravisit::walk_trait_item
13: rustc_middle::hir::map::Map::visit_item_likes_in_module
14: rustc_passes::check_attr::check_mod_attrs
15: rustc_query_system::query::plumbing::get_query_impl
16: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::check_mod_attrs
17: std::panic::catch_unwind
18: rustc_session::utils::<impl rustc_session::session::Session>::time
19: rustc_interface::passes::analysis
20: rustc_query_system::query::plumbing::get_query_impl
21: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
22: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
23: rustc_span::with_source_map
24: rustc_interface::interface::create_compiler_and_run
25: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.54.0-nightly (0a8629bff 2021-06-11) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z mir-opt-level=3 -Z new-llvm-pass-manager=yes -Z unsound-mir-opts=yes -Z polonius=yes -Z polymorphize=yes -C debuginfo=2 -C opt-level=3 --crate-type staticlib
query stack during panic:
#0 [check_mod_attrs] checking attributes in top-level module
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 3 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0412`.