Skip to content

Commit 2828fd1

Browse files
committed
Document check_rustc_must_implement_one_of boundary in check_attr
1 parent 78ae589 commit 2828fd1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎compiler/rustc_passes/src/check_attr.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,11 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
477477
let def_id = hir_id.owner.def_id;
478478

479479
let items = self.tcx.associated_items(def_id);
480+
// Syntactic argument parsing and duplicate-name validation are handled by
481+
// `RustcMustImplementOneOfParser` in `rustc_attr_parsing`. The checks below remain
482+
// in `check_attr` because looking up associated items, checking their kind,
483+
// and checking default implementations require `TyCtxt`.
484+
//
480485
// Check that all arguments of `#[rustc_must_implement_one_of]` reference
481486
// functions in the trait with default implementations
482487
for ident in list {

0 commit comments

Comments
 (0)