Prefer doc comments over //-comments in compiler

This commit is contained in:
Maybe Waffle 2022-11-27 11:15:06 +00:00
parent 0e9eee6811
commit 1d42936b18
83 changed files with 400 additions and 387 deletions

View file

@ -196,7 +196,7 @@ pub(crate) struct NameResolution<'a> {
}
impl<'a> NameResolution<'a> {
// Returns the binding for the name if it is known or None if it not known.
/// Returns the binding for the name if it is known or None if it not known.
pub(crate) fn binding(&self) -> Option<&'a NameBinding<'a>> {
self.binding.and_then(|binding| {
if !binding.is_glob_import() || self.single_imports.is_empty() {
@ -228,8 +228,8 @@ fn pub_use_of_private_extern_crate_hack(import: &Import<'_>, binding: &NameBindi
}
impl<'a> Resolver<'a> {
// Given a binding and an import that resolves to it,
// return the corresponding binding defined by the import.
/// Given a binding and an import that resolves to it,
/// return the corresponding binding defined by the import.
pub(crate) fn import(
&self,
binding: &'a NameBinding<'a>,
@ -261,7 +261,7 @@ impl<'a> Resolver<'a> {
})
}
// Define the name or return the existing binding if there is a collision.
/// Define the name or return the existing binding if there is a collision.
pub(crate) fn try_define(
&mut self,
module: Module<'a>,