Add invalid doc comment help message
This commit is contained in:
@@ -30,7 +30,7 @@ use ast::{self, NodeId, PatKind};
|
||||
use attr;
|
||||
use codemap::{CodeMap, Spanned};
|
||||
use syntax_pos::Span;
|
||||
use errors::Handler;
|
||||
use errors::{DiagnosticBuilder, Handler};
|
||||
use visit::{self, FnKind, Visitor};
|
||||
use parse::ParseSess;
|
||||
use parse::token::InternedString;
|
||||
@@ -792,6 +792,11 @@ pub enum GateIssue {
|
||||
|
||||
pub fn emit_feature_err(sess: &ParseSess, feature: &str, span: Span, issue: GateIssue,
|
||||
explain: &str) {
|
||||
feature_err(sess, feature, span, issue, explain).emit();
|
||||
}
|
||||
|
||||
pub fn feature_err<'a>(sess: &'a ParseSess, feature: &str, span: Span, issue: GateIssue,
|
||||
explain: &str) -> DiagnosticBuilder<'a> {
|
||||
let diag = &sess.span_diagnostic;
|
||||
|
||||
let issue = match issue {
|
||||
@@ -812,7 +817,7 @@ pub fn emit_feature_err(sess: &ParseSess, feature: &str, span: Span, issue: Gate
|
||||
feature));
|
||||
}
|
||||
|
||||
err.emit();
|
||||
err
|
||||
}
|
||||
|
||||
const EXPLAIN_BOX_SYNTAX: &'static str =
|
||||
|
||||
Reference in New Issue
Block a user