rust/compiler/rustc_passes/src
bors 6c358c67d4 Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillot
`BindingAnnotation` refactor

* `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`)
* `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)`
* Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}`

One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`.

I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.
2022-09-06 03:16:29 +00:00
..
liveness Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
check_attr.rs Do not call object_lifetime_default on lifetime params. 2022-09-03 21:11:42 +02:00
check_const.rs Remove trait_of_item query. 2022-08-01 21:39:26 +02:00
dead.rs Simplify rustc_hir::intravisit::Visitor::visit_variant_data. 2022-08-11 10:54:01 +10:00
debugger_visualizer.rs Respond to PR comments. 2022-05-25 10:44:56 -07:00
diagnostic_items.rs remove DiagnosticItemCollector 2022-05-13 11:46:05 -04:00
entry.rs Support #[unix_sigpipe = "inherit|sig_dfl|sig_ign"] on fn main() 2022-08-28 19:46:45 +02:00
errors.rs translations: rename warn_ to warning 2022-08-24 19:12:36 +02:00
hir_id_validator.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
hir_stats.rs Rollup merge of #101142 - nnethercote:improve-hir-stats, r=davidtwco 2022-09-05 14:15:51 +05:30
lang_items.rs use def_span and def_kind queries instead of calling tcx.hir() methods 2022-05-06 12:11:05 -04:00
layout_test.rs remove LayoutTest 2022-05-13 11:46:05 -04:00
lib.rs Revert let_chains stabilization 2022-08-29 19:34:11 +02:00
lib_features.rs Also replace the version placeholder in rustc_attr 2022-09-02 01:47:01 +02:00
liveness.rs use propagate_through_exprs instead of propagate_through_expr 2022-09-05 23:11:34 +09:00
loops.rs Add an indirection for closures in hir::ExprKind 2022-07-12 21:00:13 +04:00
naked_functions.rs Refactor and re-use BindingAnnotation 2022-09-02 12:55:05 -05:00
reachable.rs Add an indirection for closures in hir::ExprKind 2022-07-12 21:00:13 +04:00
stability.rs Make hir::PathSegment::res non-optional. 2022-09-05 14:20:25 +10:00
upvars.rs Rename local_did to def_id 2022-07-29 18:26:10 -04:00
weak_lang_items.rs Use FxIndexMap instead of otherwise unused StableMap for WEAK_ITEMS_REFS. 2022-07-20 12:40:51 +02:00