cdc12ba5a3
rustc_mir_build: reorder bindings No functional changes intended. I'm playing around with building compiler components using nightly rust (2021-11-02) in a non-standard way. I encountered the following error while trying to build rustc_mir_build: ``` error[E0597]: `wildcard` does not live long enough --> rust/src/nightly/compiler/rustc_mir_build/src/build/matches/mod.rs:1767:82 | 1767 | let mut otherwise_candidate = Candidate::new(expr_place_builder.clone(), &wildcard, false); | ^^^^^^^^^ borrowed value does not live long enough ... 1799 | } | - | | | `wildcard` dropped here while still borrowed | borrow might be used here, when `guard_candidate` is dropped and runs the destructor for type `Candidate<'_, '_>` | = note: values in a scope are dropped in the opposite order they are defined ``` I believe this flags an issue that may become an error in the future. Swapping the order of `wildcard` and `guard_candidate` resolves it. |
||
---|---|---|
.. | ||
rustc | ||
rustc_apfloat | ||
rustc_arena | ||
rustc_ast | ||
rustc_ast_lowering | ||
rustc_ast_passes | ||
rustc_ast_pretty | ||
rustc_attr | ||
rustc_borrowck | ||
rustc_builtin_macros | ||
rustc_codegen_cranelift | ||
rustc_codegen_gcc | ||
rustc_codegen_llvm | ||
rustc_codegen_ssa | ||
rustc_const_eval | ||
rustc_data_structures | ||
rustc_driver | ||
rustc_error_codes | ||
rustc_errors | ||
rustc_expand | ||
rustc_feature | ||
rustc_fs_util | ||
rustc_graphviz | ||
rustc_hir | ||
rustc_hir_pretty | ||
rustc_incremental | ||
rustc_index | ||
rustc_infer | ||
rustc_interface | ||
rustc_lexer | ||
rustc_lint | ||
rustc_lint_defs | ||
rustc_llvm | ||
rustc_macros | ||
rustc_metadata | ||
rustc_middle | ||
rustc_mir_build | ||
rustc_mir_dataflow | ||
rustc_mir_transform | ||
rustc_monomorphize | ||
rustc_parse | ||
rustc_parse_format | ||
rustc_passes | ||
rustc_plugin_impl | ||
rustc_privacy | ||
rustc_query_impl | ||
rustc_query_system | ||
rustc_resolve | ||
rustc_save_analysis | ||
rustc_serialize | ||
rustc_session | ||
rustc_span | ||
rustc_symbol_mangling | ||
rustc_target | ||
rustc_trait_selection | ||
rustc_traits | ||
rustc_ty_utils | ||
rustc_type_ir | ||
rustc_typeck |