1
Fork 0

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:
Matthias Krüger 2022-11-27 22:14:08 +01:00 committed by GitHub
commit 86304f5149
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 400 additions and 387 deletions

View file

@ -94,7 +94,7 @@ impl<'tcx> SaveContext<'tcx> {
}
}
// Returns path to the compilation output (e.g., libfoo-12345678.rmeta)
/// Returns path to the compilation output (e.g., libfoo-12345678.rmeta)
pub fn compilation_output(&self, crate_name: &str) -> PathBuf {
let sess = &self.tcx.sess;
// Save-analysis is emitted per whole session, not per each crate type
@ -112,7 +112,7 @@ impl<'tcx> SaveContext<'tcx> {
}
}
// List external crates used by the current crate.
/// List external crates used by the current crate.
pub fn get_external_crates(&self) -> Vec<ExternalCrateData> {
let mut result = Vec::with_capacity(self.tcx.crates(()).len());