Disable the doctests for the instruction_set errors
authorSimon Chopin <simon.chopin@canonical.com>
Thu, 13 Jun 2024 09:16:41 +0000 (11:16 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Thu, 16 Apr 2026 08:00:20 +0000 (10:00 +0200)
Bug: https://github.com/rust-lang/rust/issues/83453
Last-Update: 2022-02-23

The fix is as described in the upstream issue.

Gbp-Pq: Topic ubuntu
Gbp-Pq: Name ubuntu-ignore-arm-doctest.patch

compiler/rustc_error_codes/src/error_codes/E0778.md
compiler/rustc_error_codes/src/error_codes/E0779.md

index 4bdf85451c9bd3c0f62bd55f2047f39cc49d4c78..af57fe848acca4ad110d6defda288bed12cee438 100644 (file)
@@ -17,7 +17,7 @@ specified:
 ```
 #![feature(isa_attribute)]
 
-#[cfg_attr(target_arch="arm", instruction_set(arm::a32))]
+#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::a32))]
 fn something() {}
 ```
 
@@ -26,7 +26,7 @@ or:
 ```
 #![feature(isa_attribute)]
 
-#[cfg_attr(target_arch="arm", instruction_set(arm::t32))]
+#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::t32))]
 fn something() {}
 ```
 
index 036931379a069aaa98613e85e447082eef7ca53b..46969ef9386edf5afb644fec1e8c03677a93830b 100644 (file)
@@ -22,7 +22,7 @@ error. Example:
 ```
 #![feature(isa_attribute)]
 
-#[cfg_attr(target_arch="arm", instruction_set(arm::a32))] // ok!
+#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::a32))] // ok!
 pub fn something() {}
 fn main() {}
 ```