Skip to content

Commit 46cab11

Browse files
authored
Rollup merge of #121256 - Jarcho:visitor2, r=oli-obk
Allow AST and HIR visitors to return `ControlFlow` Alternative to #108598. Since rust-lang/libs-team#187 was rejected, this implements our own version of the `Try` trait (`VisitorResult`) and the `try` macro (`try_visit`). Since this change still allows visitors to return `()`, no changes have been made to the existing ones. They can be done in a separate PR.
2 parents 4131f6e + 864cee3 commit 46cab11

File tree

6 files changed

+959
-769
lines changed

6 files changed

+959
-769
lines changed

compiler/rustc_ast/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
#![allow(internal_features)]
1313
#![feature(rustdoc_internals)]
1414
#![feature(associated_type_bounds)]
15+
#![feature(associated_type_defaults)]
1516
#![feature(box_patterns)]
1617
#![feature(if_let_guard)]
1718
#![feature(let_chains)]
1819
#![cfg_attr(bootstrap, feature(min_specialization))]
20+
#![feature(never_type)]
1921
#![feature(negative_impls)]
2022
#![feature(stmt_expr_attributes)]
2123

0 commit comments

Comments
 (0)