]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0779.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0779.md
1 An unknown argument was given to the `instruction_set` attribute.
2
3 Erroneous code example:
4
5 ```compile_fail,E0779
6 #![feature(isa_attribute)]
7
8 #[instruction_set(intel::x64)] // error: invalid argument
9 pub fn something() {}
10 fn main() {}
11 ```
12
13 The `instruction_set` attribute only supports two arguments currently:
14
15  * arm::a32
16  * arm::t32
17
18 All other arguments given to the `instruction_set` attribute will return this
19 error. Example:
20
21 ```
22 #![feature(isa_attribute)]
23
24 #[cfg_attr(target_arch="arm", instruction_set(arm::a32))] // ok!
25 pub fn something() {}
26 fn main() {}
27 ```
28
29 For more information see the [`instruction_set` attribute][isa-attribute]
30 section of the Reference.
31
32 [isa-attribute]: https://doc.rust-lang.org/reference/attributes/codegen.html