1
Fork 0

Fix typos in compiler

This commit is contained in:
DaniPopes 2023-04-10 22:02:52 +02:00
parent a73288371e
commit 677357d32b
No known key found for this signature in database
GPG key ID: 0F09640DDB7AC692
71 changed files with 140 additions and 136 deletions

View file

@ -37,7 +37,7 @@ pub fn erase<T: EraseType>(src: T) -> Erase<T> {
#[inline(always)]
pub fn restore<T: EraseType>(value: Erase<T>) -> T {
let value: Erased<<T as EraseType>::Result> = value;
// SAFETY: Due to the use of impl Trait in `Erase` the only way to safetly create an instance
// SAFETY: Due to the use of impl Trait in `Erase` the only way to safely create an instance
// of `Erase` is to call `erase`, so we know that `value.data` is a valid instance of `T` of
// the right size.
unsafe { transmute_copy(&value.data) }

View file

@ -26,7 +26,7 @@ pub trait Key: Sized {
//
// ...But r-a doesn't support them yet and using a default here causes r-a to not infer
// return types of queries which is very annoying. Thus, until r-a support associated
// type defaults, plese restrain from using them here <3
// type defaults, please restrain from using them here <3
//
// r-a issue: <https://github.com/rust-lang/rust-analyzer/issues/13693>
type CacheSelector;

View file

@ -97,7 +97,7 @@ rustc_queries! {
/// Gives access to the HIR ID for the given `LocalDefId` owner `key` if any.
///
/// Definitions that were generated with no HIR, would be feeded to return `None`.
/// Definitions that were generated with no HIR, would be fed to return `None`.
query opt_local_def_id_to_hir_id(key: LocalDefId) -> Option<hir::HirId>{
desc { |tcx| "getting HIR ID of `{}`", tcx.def_path_str(key.to_def_id()) }
feedable