Error: meaningless REX prefix used

Cargo.toml
[dependencies]
rand = "0.8.5"

[ERROR rust_analyzer::main_loop] FetchWorkspaceError:

rust-analyzer failed to load workspace: Failed to load the project at E:\Workspace\rust\guessing_game\Cargo.toml: Failed to read Cargo metadata from Cargo.toml file E:\Workspace\rust\guessing_game\Cargo.toml, Some(Version { major: 1, minor: 75, patch: 0 }): Failed to run "cargo" "metadata" "--format-version" "1" "--manifest-path" "E:\\Workspace\\rust\\guessing_game\\Cargo.toml" "--filter-platform" "x86_64-pc-windows-msvc": cargo metadata exited with an error: error: failed to parse the cfg from rustc --print=cfg, got:

___.exe

lib___.rlib

___.dll

___.dll

___.lib

___.dll

C:\Users\Administrator.rustup\toolchains\stable-x86_64-pc-windows-msvc

packed


debug_assertions

panic="unwind"

proc_macro

target_arch="x86_64"

target_endian="little"

target_env="msvc"

target_family="windows"

target_feature="fxsr"

target_feature="sse"

target_feature="sse2"

target_has_atomic="16"

target_has_atomic="32"

target_has_atomic="64"

target_has_atomic="8"

target_has_atomic="ptr"

target_os="windows"

target_pointer_width="64"

target_vendor="pc"

windows

[0x7FFEAF9E5560] ANOMALY: meaningless REX prefix used

[0x7FFEAF410D60] ANOMALY: use of REX.w is meaningless (default operand size is 64)

[0x7FFEAF427280] ANOMALY: use of REX.w is meaningless (default operand size is 64)

[0x7FFEAF40F4C0] ANOMALY: use of REX.w is meaningless (default operand size is 64)

[0x7FFEAF427890] ANOMALY: use of REX.w is meaningless (default operand size is 64)

[0x7FFEACF33890] ANOMALY: meaningless REX prefix used

[0x7FFEAD652130] ANOMALY: meaningless REX prefix used

[0x7FFEADA35000] ANOMALY: meaningless REX prefix used

[0x7FFEADA40D20] ANOMALY: meaningless REX prefix used

Caused by:

failed to parse [0x7FFEAF9E5560] ANOMALY: meaningless REX prefix used as a cfg expression: unexpected character [ in cfg, expected parens, a comma, an identifier, or a string

It may be caused by the encryption program on my computer, but I can't run without this software. How to solve this problem? I tried to modify cmd and PowerShell into 64 bits. Other software can run normally, but this one doesn't work.

This error happened when I saved the Cargo.toml file in vscode
I'm new to this language and don't know much about Cargo.toml. I think it looks like java pom.xml file

What is that encryption program you're talking about? What does it do? If it's just full-disk encryption, I think it's unlikely to cause trouble.

Do you also get those errors when compiling the project, or running cargo commands? I.e. with something else than rust-analyzer.

Please fix the formatting of your post. And try to be more specific about the Rust project? Did you clone it from somewhere, or is it your own project? What commands did you run that produced the error? What IDE are you using?

1 Like

What do you mean here?

How did you install Rust?

This error happened when I saved the Cargo.toml file in vscode

There was another post about this error a couple months ago:
Unable to compile hello world due to "ANOMALY: meaningless REX prefix used"

It doesn't say the problem was resolved, but the answer given by @moy2010 looks like something that could help you. See the last post and the link to the SO discussion that talks about the error message you're seeing.

My guess is that the package manager was reading the return value in memory and was disturbed by the encryption software in the computer. It only interferes with 32-bit cmd, so I changed the cmd in the system to 64-bit but the cmd in the package manager doesn't know where it is.

I am not familiar with installing Rust on Windows, but perhaps reinstalling and selecting only the 64-bit version would help? If not, hopefully someone here who uses Windows can help.

Thanks, I uninstalled the rust-analyzer and ran the build command manually. It worked

Thanks, I uninstalled the rust-analyzer and ran the build command manually. It worked

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.