Folkert de Vriesfolkertdev@hachyderm.io
Mar 17, 2026, 11:05 AMThe message on an invalid target feature now suggests the most similar valid target feature names, for when it's been a while and you can't quite remember the exact target feature name.
https://github.com/rust-lang/rust/pull/153966
You can often make improvements like this by pattern matching on the surrounding code, you should give it a go when there are errors you run into that could be more helpful.
![The new error message text that includes valid suggestions:
error: the feature named `avx511` is not valid for this target
--> src/main.rs:1:18
|
1 | #[target_feature(enable = "avx511")]
| ^^^^^^^^^^^^^^^^^ `avx511` is not valid for this target
|
= help: valid names are: `avx512f`, `avx`, `avx10.1`, `avx2`, and `avx512bw` and 74 more](https://techdon.dev/system/cache/media_attachments/files/116/246/614/900/560/034/small/735232d50d09e54e.png)