Skip to content

Commit

Permalink
Unrolled build for rust-lang#121256
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#121256 - Jarcho:visitor2, r=oli-obk

Allow AST and HIR visitors to return `ControlFlow`

Alternative to rust-lang#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.
  • Loading branch information
rust-timer authored Feb 20, 2024
2 parents bcea3cb + 864cee3 commit e022ef0
Show file tree
Hide file tree
Showing 6 changed files with 959 additions and 769 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
#![allow(internal_features)]
#![feature(rustdoc_internals)]
#![feature(associated_type_bounds)]
#![feature(associated_type_defaults)]
#![feature(box_patterns)]
#![feature(if_let_guard)]
#![feature(let_chains)]
#![cfg_attr(bootstrap, feature(min_specialization))]
#![feature(never_type)]
#![feature(negative_impls)]
#![feature(stmt_expr_attributes)]

Expand Down
Loading

0 comments on commit e022ef0

Please sign in to comment.