transmute: use diagnostic item

This commit is contained in:
Bastian Kauschke 2020-09-19 10:57:13 +02:00
parent ac19c3bda1
commit 4debbdc6b9
4 changed files with 17 additions and 9 deletions

View file

@ -720,6 +720,8 @@ impl<'tcx> LateContext<'tcx> {
/// Anonymous scopes such as `extern` imports are matched with `kw::Invalid`;
/// inherent `impl` blocks are matched with the name of the type.
///
/// If possible, consider using a `rustc_diagnostic_item` instead.
///
/// # Examples
///
/// ```rust,ignore (no context or def id available)