The Servo browser engine | Conduct: https://www.rust-lang.org/conduct.html | https://github.com/servo/servo | https://dxr.mozilla.org/servo/
generics_of query
tcx.generics_of(fn_def_id);
&'tcx ty::Generics
type_param method to get the TypeParameterDef
ParamTy struct I pointed you at earlier)
DefId as well
tcx.has_attr function with that def-id and "must_root" to see if it was annotated with #[must_root] -- but there is one catch
has_attr that will mean it won't work on type parameters, but one you can easily fix
has_attr bug I mentioned
has_attr method, you'll see that for a local def-id,
attrs method on the HIR map
NodeTyParam
Some(NodeTyParam(tp)) => Some(&tp.attrs[..]),
hir::TypeParam also doesn't carry attributes
attrs: self.lower_attrs(&f.attrs),
x.py incantations that may be of use to you
DefId I suggested