1
Fork 0

Fixed up a few comments.

This commit is contained in:
Alexander Regueiro 2019-07-05 18:22:08 +01:00
parent 481068a707
commit ac9dd1bd0c
2 changed files with 10 additions and 10 deletions

View file

@ -197,11 +197,11 @@ pub struct Compiler {
#[derive(PartialEq, Eq, Copy, Clone, Debug)] #[derive(PartialEq, Eq, Copy, Clone, Debug)]
pub enum DocTests { pub enum DocTests {
// Default, run normal tests and doc tests. /// Run normal tests and doc tests (default).
Yes, Yes,
// Do not run any doc tests. /// Do not run any doc tests.
No, No,
// Only run doc tests. /// Only run doc tests.
Only, Only,
} }
@ -221,10 +221,10 @@ pub enum GitRepo {
/// methods specifically on this structure itself (to make it easier to /// methods specifically on this structure itself (to make it easier to
/// organize). /// organize).
pub struct Build { pub struct Build {
// User-specified configuration via config.toml /// User-specified configuration from `config.toml`.
config: Config, config: Config,
// Derived properties from the above two configurations // Properties derived from the above configuration
src: PathBuf, src: PathBuf,
out: PathBuf, out: PathBuf,
rust_info: channel::GitInfo, rust_info: channel::GitInfo,
@ -240,12 +240,12 @@ pub struct Build {
doc_tests: DocTests, doc_tests: DocTests,
verbosity: usize, verbosity: usize,
// Targets for which to build. // Targets for which to build
build: Interned<String>, build: Interned<String>,
hosts: Vec<Interned<String>>, hosts: Vec<Interned<String>>,
targets: Vec<Interned<String>>, targets: Vec<Interned<String>>,
// Stage 0 (downloaded) compiler and cargo or their local rust equivalents. // Stage 0 (downloaded) compiler and cargo or their local rust equivalents
initial_rustc: PathBuf, initial_rustc: PathBuf,
initial_cargo: PathBuf, initial_cargo: PathBuf,
@ -255,7 +255,7 @@ pub struct Build {
cxx: HashMap<Interned<String>, cc::Tool>, cxx: HashMap<Interned<String>, cc::Tool>,
ar: HashMap<Interned<String>, PathBuf>, ar: HashMap<Interned<String>, PathBuf>,
ranlib: HashMap<Interned<String>, PathBuf>, ranlib: HashMap<Interned<String>, PathBuf>,
// Misc // Miscellaneous
crates: HashMap<Interned<String>, Crate>, crates: HashMap<Interned<String>, Crate>,
is_sudo: bool, is_sudo: bool,
ci_env: CiEnv, ci_env: CiEnv,

View file

@ -4458,7 +4458,7 @@ pub fn check_bounds_are_used<'tcx>(tcx: TyCtxt<'tcx>, generics: &ty::Generics, t
return; return;
} }
// Make a vector of booleans initially false, set to true when used. // Make a vector of booleans initially `false`; set to `true` when used.
let mut types_used = vec![false; own_counts.types]; let mut types_used = vec![false; own_counts.types];
for leaf_ty in ty.walk() { for leaf_ty in ty.walk() {
@ -4467,7 +4467,7 @@ pub fn check_bounds_are_used<'tcx>(tcx: TyCtxt<'tcx>, generics: &ty::Generics, t
types_used[index as usize - own_counts.lifetimes] = true; types_used[index as usize - own_counts.lifetimes] = true;
} else if let ty::Error = leaf_ty.sty { } else if let ty::Error = leaf_ty.sty {
// If there is already another error, do not emit // If there is already another error, do not emit
// an error for not using a type Parameter. // an error for not using a type parameter.
assert!(tcx.sess.has_errors()); assert!(tcx.sess.has_errors());
return; return;
} }