Auto merge of #60034 - rasendubi:fix-comments, r=Centril

Small comments fix

- Fix comments around test harness generation
- Promote regular comments to rustdoc comments
This commit is contained in:
bors 2019-04-17 13:26:29 +00:00
commit 6ed6f1461d
4 changed files with 9 additions and 9 deletions

View File

@ -304,17 +304,17 @@ pub struct Handler {
continue_after_error: AtomicBool, continue_after_error: AtomicBool,
delayed_span_bugs: Lock<Vec<Diagnostic>>, delayed_span_bugs: Lock<Vec<Diagnostic>>,
// This set contains the `DiagnosticId` of all emitted diagnostics to avoid /// This set contains the `DiagnosticId` of all emitted diagnostics to avoid
// emitting the same diagnostic with extended help (`--teach`) twice, which /// emitting the same diagnostic with extended help (`--teach`) twice, which
// would be uneccessary repetition. /// would be uneccessary repetition.
taught_diagnostics: Lock<FxHashSet<DiagnosticId>>, taught_diagnostics: Lock<FxHashSet<DiagnosticId>>,
/// Used to suggest rustc --explain <error code> /// Used to suggest rustc --explain <error code>
emitted_diagnostic_codes: Lock<FxHashSet<DiagnosticId>>, emitted_diagnostic_codes: Lock<FxHashSet<DiagnosticId>>,
// This set contains a hash of every diagnostic that has been emitted by /// This set contains a hash of every diagnostic that has been emitted by
// this handler. These hashes is used to avoid emitting the same error /// this handler. These hashes is used to avoid emitting the same error
// twice. /// twice.
emitted_diagnostics: Lock<FxHashSet<u128>>, emitted_diagnostics: Lock<FxHashSet<u128>>,
} }

View File

@ -55,7 +55,7 @@ enum QueryModifier {
/// Generate a dep node based on the dependencies of the query /// Generate a dep node based on the dependencies of the query
Anon, Anon,
// Always evaluate the query, ignoring its depdendencies /// Always evaluate the query, ignoring its depdendencies
EvalAlways, EvalAlways,
} }

View File

@ -327,7 +327,7 @@ fn mk_main(cx: &mut TestCtxt<'_>) -> P<ast::Item> {
// Writing this out by hand with 'ignored_span': // Writing this out by hand with 'ignored_span':
// pub fn main() { // pub fn main() {
// #![main] // #![main]
// test::test_main_static(::std::os::args().as_slice(), &[..tests]); // test::test_main_static(&[..tests]);
// } // }
let sp = ignored_span(cx, DUMMY_SP); let sp = ignored_span(cx, DUMMY_SP);
let ecx = &cx.ext_cx; let ecx = &cx.ext_cx;

View File

@ -86,7 +86,7 @@ pub fn expand_test_or_bench(
cx.path(sp, vec![test_id, cx.ident_of(name)]) cx.path(sp, vec![test_id, cx.ident_of(name)])
}; };
// creates test::$name // creates test::ShouldPanic::$name
let should_panic_path = |name| { let should_panic_path = |name| {
cx.path(sp, vec![test_id, cx.ident_of("ShouldPanic"), cx.ident_of(name)]) cx.path(sp, vec![test_id, cx.ident_of("ShouldPanic"), cx.ident_of(name)])
}; };