Address code review comments
This commit is contained in:
parent
de42ac3970
commit
cf04547b0b
27 changed files with 199 additions and 261 deletions
|
@ -19,7 +19,6 @@ use rustc_session::lint::builtin::{
|
|||
DEPRECATED_WHERE_CLAUSE_LOCATION, MISSING_ABI, PATTERNS_IN_FNS_WITHOUT_BODY,
|
||||
};
|
||||
use rustc_session::lint::{BuiltinLintDiagnostics, LintBuffer};
|
||||
use rustc_session::parse::feature_err;
|
||||
use rustc_session::Session;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::{kw, sym, Ident};
|
||||
|
@ -754,19 +753,7 @@ impl<'a> AstValidator<'a> {
|
|||
self.maybe_lint_missing_abi(sig_span, ty.id);
|
||||
}
|
||||
}
|
||||
TyKind::TraitObject(ref bounds, syntax, ..) => {
|
||||
if syntax == TraitObjectSyntax::DynStar
|
||||
&& !self.session.features_untracked().dyn_star
|
||||
{
|
||||
feature_err(
|
||||
&self.session.parse_sess,
|
||||
sym::dyn_star,
|
||||
ty.span,
|
||||
"dyn* trait objects are unstable",
|
||||
)
|
||||
.emit();
|
||||
}
|
||||
|
||||
TyKind::TraitObject(ref bounds, ..) => {
|
||||
let mut any_lifetime_bounds = false;
|
||||
for bound in bounds {
|
||||
if let GenericBound::Outlives(ref lifetime) = *bound {
|
||||
|
|
|
@ -573,6 +573,9 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
|
|||
ast::TyKind::Never => {
|
||||
gate_feature_post!(&self, never_type, ty.span, "the `!` type is experimental");
|
||||
}
|
||||
ast::TyKind::TraitObject(_, ast::TraitObjectSyntax::DynStar, ..) => {
|
||||
gate_feature_post!(&self, dyn_star, ty.span, "dyn* trait objects are unstable");
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
visit::walk_ty(self, ty)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue