ast_validation: scalable vectors okay for rustdoc

Scalable vector types in `core_arch` are cfg'd for aarch64 and for
rustdoc, which can successfully document these types given any `--target`
(`core_arch` CI uses `i686-unknown-linux-gnu`) - this shouldn't trigger
the "scalable vectors not supported on arch" error.
This commit is contained in:
David Wood
2026-04-03 09:14:07 +00:00
parent 9602bda1dd
commit c3709eee09
@@ -1379,7 +1379,9 @@ fn visit_item(&mut self, item: &'a Item) {
this.dcx()
.emit_err(errors::ScalableVectorNotTupleStruct { span: item.span });
}
if !self.sess.target.arch.supports_scalable_vectors() {
if !self.sess.target.arch.supports_scalable_vectors()
&& !self.sess.opts.actually_rustdoc
{
this.dcx().emit_err(errors::ScalableVectorBadArch { span: attr.span });
}
}