1
Fork 0

Use local key in providers

This commit is contained in:
Michael Goulet 2023-03-13 18:54:05 +00:00
parent a01b4cc9f3
commit 2eb1c08e43
65 changed files with 458 additions and 395 deletions

View file

@ -187,7 +187,11 @@ impl<'tcx> InstanceDef<'tcx> {
}
#[inline]
pub fn get_attrs(&self, tcx: TyCtxt<'tcx>, attr: Symbol) -> ty::Attributes<'tcx> {
pub fn get_attrs(
&self,
tcx: TyCtxt<'tcx>,
attr: Symbol,
) -> impl Iterator<Item = &'tcx rustc_ast::Attribute> {
tcx.get_attrs(self.def_id(), attr)
}