feat: pass_by_value lint attribute

Useful for thin wrapper attributes that are best passed as value instead
of reference.
This commit is contained in:
Mahdi Dibaiee 2022-01-07 11:38:16 +00:00
parent 66f64a441a
commit 4c3e330a8c
No known key found for this signature in database
GPG key ID: BABA115BDF0C598A
12 changed files with 165 additions and 56 deletions

View file

@ -462,6 +462,7 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for TyS<'tcx> {
}
#[rustc_diagnostic_item = "Ty"]
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
pub type Ty<'tcx> = &'tcx TyS<'tcx>;
impl ty::EarlyBoundRegion {