Rollup merge of #104976 - WaffleLapkin:move_comments, r=cjgillot
Prefer doc comments over `//`-comments in compiler Doc comments are generally nicer: they show up in the documentation, they are shown in IDEs when you hover other mentions of items, etc. Thus it makes sense to use them instead of `//`-comments.
This commit is contained in:
commit
86304f5149
83 changed files with 400 additions and 387 deletions
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue