rust/compiler
bors 21b4a9cfdc Auto merge of #92889 - tmiasko:unbounded-recursion, r=ecstatic-morse
Ignore unwinding edges when checking for unconditional recursion

The unconditional recursion lint determines if all execution paths
eventually lead to a self-recursive call.

The implementation always follows unwinding edges which limits its
practical utility. For example, it would not lint function `f` because a
call to `g` might unwind. It also wouldn't lint function `h` because an
overflow check preceding the self-recursive call might unwind:

```rust
pub fn f() {
    g();
    f();
}

pub fn g() { /* ... */ }

pub fn h(a: usize) {
  h(a + 1);
}
```

To avoid the issue, assume that terminators that might continue
execution along non-unwinding edges do so.

Fixes #78474.
2022-01-27 06:21:53 +00:00
..
rustc Remove useless #[global_allocator] from rustc and rustdoc. 2021-12-23 17:23:21 +11:00
rustc_apfloat Stabilize iter::zip. 2021-12-14 18:50:31 -04:00
rustc_arena Add some comments. 2021-11-19 07:52:59 +11:00
rustc_ast Make Decodable and Decoder infallible. 2022-01-22 10:38:31 +11:00
rustc_ast_lowering Filter out local_id == 0, those are already considered on the call site 2022-01-26 12:25:31 -03:00
rustc_ast_passes Auto merge of #92896 - lqd:update-deps, r=Mark-Simulacrum 2022-01-21 10:38:30 +00:00
rustc_ast_pretty Deduplicate branches of print_break implementation 2022-01-19 19:04:36 -08:00
rustc_attr Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
rustc_borrowck Auto merge of #93095 - Aaron1011:remove-assoc-ident, r=cjgillot 2022-01-25 18:53:45 +00:00
rustc_builtin_macros Fix comment about spans during borrowck per PR 91359 review 2022-01-17 10:38:30 -08:00
rustc_codegen_cranelift Use an indexmap to avoid sorting LocalDefIds 2022-01-22 22:34:16 -06:00
rustc_codegen_gcc Add preliminary support for inline assembly for msp430. 2022-01-22 23:42:46 -05:00
rustc_codegen_llvm Rollup merge of #93269 - jacobbramley:dev/pauth-option-1, r=petrochenkov 2022-01-25 05:51:14 +01:00
rustc_codegen_ssa Rollup merge of #92828 - Amanieu:unwind-abort, r=dtolnay 2022-01-22 15:32:49 +01:00
rustc_const_eval Auto merge of #93028 - compiler-errors:const_drop_bounds, r=fee1-dead 2022-01-24 08:05:37 +00:00
rustc_data_structures Auto merge of #90842 - pierwill:localdefid-indexmap, r=wesleywiser 2022-01-24 22:04:55 +00:00
rustc_driver Make Decodable and Decoder infallible. 2022-01-22 10:38:31 +11:00
rustc_error_codes Reject unsupported naked functions 2022-01-21 17:38:21 +01:00
rustc_errors Rollup merge of #93229 - mark-i-m:noquiet, r=eddyb 2022-01-23 20:13:07 +01:00
rustc_expand expand: Pass everything by reference to pre-expansion lint callback 2022-01-23 19:31:32 +08:00
rustc_feature Rollup merge of #93175 - spastorino:negative-traits-coherence-new, r=nikomatsakis 2022-01-25 05:51:12 +01:00
rustc_fs_util
rustc_graphviz eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
rustc_hir Store hir_id_to_def_id in OwnerInfo. 2022-01-25 15:05:19 -03:00
rustc_hir_pretty Remove a span from hir::ExprKind::MethodCall 2022-01-21 07:48:10 -06:00
rustc_incremental Make Decodable and Decoder infallible. 2022-01-22 10:38:31 +11:00
rustc_index Make Decodable and Decoder infallible. 2022-01-22 10:38:31 +11:00
rustc_infer Auto merge of #93095 - Aaron1011:remove-assoc-ident, r=cjgillot 2022-01-25 18:53:45 +00:00
rustc_interface expand: Pass everything by reference to pre-expansion lint callback 2022-01-23 19:31:32 +08:00
rustc_lexer Auto merge of #91393 - Julian-Wollersberger:lexer_optimization, r=petrochenkov 2021-12-03 13:20:14 +00:00
rustc_lint rustc_lint: Stop creating a fake ast::Crate for running early lints 2022-01-23 19:31:32 +08:00
rustc_lint_defs Remove deduplication of early lints 2022-01-23 17:05:48 -05:00
rustc_llvm Use error-on-mismatch policy for PAuth module flags. 2022-01-24 16:50:10 +00:00
rustc_log Make rustc_log doc test runnable 2022-01-03 22:31:56 -08:00
rustc_macros Make Decodable and Decoder infallible. 2022-01-22 10:38:31 +11:00
rustc_metadata Auto merge of #88679 - petrochenkov:doctrscope, r=GuillaumeGomez 2022-01-26 09:10:27 +00:00
rustc_middle Auto merge of #93352 - matthiaskrgr:rollup-5peret4, r=matthiaskrgr 2022-01-26 22:54:26 +00:00
rustc_mir_build Ignore unwinding edges when checking for unconditional recursion 2022-01-26 13:46:01 +01:00
rustc_mir_dataflow Remove deprecated LLVM-style inline assembly 2022-01-12 18:51:31 +01:00
rustc_mir_transform Auto merge of #91840 - JakobDegen:fix_early_otherwise, r=oli-obk 2022-01-26 12:10:54 +00:00
rustc_monomorphize Change TerminatorKind::Abort to call the panic handler instead of 2022-01-17 00:39:34 +00:00
rustc_parse delay the bug once again, generalize turbofish suggestion 2022-01-25 11:11:13 -08:00
rustc_parse_format
rustc_passes Reject unsupported naked functions 2022-01-21 17:38:21 +01:00
rustc_plugin_impl replace dynamic library module with libloading 2021-12-06 12:03:47 -05:00
rustc_privacy Remove a span from hir::ExprKind::MethodCall 2022-01-21 07:48:10 -06:00
rustc_query_impl Make Decodable and Decoder infallible. 2022-01-22 10:38:31 +11:00
rustc_query_system Address review comments. 2022-01-22 10:38:34 +11:00
rustc_resolve rustdoc: Pre-calculate traits that are in scope for doc links 2022-01-25 21:45:21 +08:00
rustc_save_analysis Remove a span from hir::ExprKind::MethodCall 2022-01-21 07:48:10 -06:00
rustc_serialize Auto merge of #90842 - pierwill:localdefid-indexmap, r=wesleywiser 2022-01-24 22:04:55 +00:00
rustc_session Rollup merge of #93229 - mark-i-m:noquiet, r=eddyb 2022-01-23 20:13:07 +01:00
rustc_span Add a minimal working append_const_msg argument 2022-01-26 00:48:08 +11:00
rustc_symbol_mangling Auto merge of #93095 - Aaron1011:remove-assoc-ident, r=cjgillot 2022-01-25 18:53:45 +00:00
rustc_target Add preliminary support for inline assembly for msp430. 2022-01-22 23:42:46 -05:00
rustc_trait_selection Rollup merge of #92256 - fee1-dead:improve-selection-err, r=oli-obk 2022-01-26 23:45:22 +01:00
rustc_traits ⬆ chalk to 0.76.0 2022-01-19 13:44:43 -06:00
rustc_ty_utils Store a Symbol instead of an Ident in AssocItem 2022-01-19 17:13:21 -05:00
rustc_type_ir initial revert 2022-01-15 01:16:55 +00:00
rustc_typeck Rollup merge of #92256 - fee1-dead:improve-selection-err, r=oli-obk 2022-01-26 23:45:22 +01:00