Skip to content

Commit 6789b3b

Browse files
Rollup merge of rust-lang#154850 - davidtwco:scalable-vectors-rustdoc, r=JonathanBrouwer
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 fixes the CI failure in rust-lang/stdarch#2071.
2 parents 2ffebdb + c3709ee commit 6789b3b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,9 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
13791379
this.dcx()
13801380
.emit_err(errors::ScalableVectorNotTupleStruct { span: item.span });
13811381
}
1382-
if !self.sess.target.arch.supports_scalable_vectors() {
1382+
if !self.sess.target.arch.supports_scalable_vectors()
1383+
&& !self.sess.opts.actually_rustdoc
1384+
{
13831385
this.dcx().emit_err(errors::ScalableVectorBadArch { span: attr.span });
13841386
}
13851387
}

0 commit comments

Comments
 (0)