change key in Provider example (local) into `LocalDefId`

Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
This commit is contained in:
xizheyin 2025-06-15 21:03:22 +08:00
parent 07e05bbc46
commit e03ee80811
No known key found for this signature in database
GPG Key ID: 0A0D90BE99CEDEAD
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ Suppose you want to add a new query called `fubar`. You would:
1. Implement the provider function:
```rust,ignore
fn fubar<'tcx>(tcx: TyCtxt<'tcx>, key: DefId) -> Fubar<'tcx> { ... }
fn fubar<'tcx>(tcx: TyCtxt<'tcx>, key: LocalDefId) -> Fubar<'tcx> { ... }
```
2. Register it in the `provide` function:
```rust,ignore