diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index f4a9d4bf92cbc..54a4621db2462 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -2002,7 +2002,8 @@ options! { "randomize the layout of types (default: no)"), regparm: Option = (None, parse_opt_number, [TRACKED], "On x86-32 targets, setting this to N causes the compiler to pass N arguments \ - in registers EAX, EDX, and ECX instead of on the stack.\ + in registers EAX, EDX, and ECX instead of on the stack for\ + \"C\", \"cdecl\", and \"stdcall\" fn.\ It is UNSOUND to link together crates that use different values for this flag!"), relax_elf_relocations: Option = (None, parse_opt_bool, [TRACKED], "whether ELF relocations can be relaxed"), diff --git a/src/doc/unstable-book/src/compiler-flags/regparm.md b/src/doc/unstable-book/src/compiler-flags/regparm.md index a054d55cd8b6d..8f311f091c0a2 100644 --- a/src/doc/unstable-book/src/compiler-flags/regparm.md +++ b/src/doc/unstable-book/src/compiler-flags/regparm.md @@ -5,7 +5,7 @@ The tracking issue for this feature is: https://github.com/rust-lang/rust/issues ------------------------ Option -Zregparm=N causes the compiler to pass N arguments -in registers EAX, EDX, and ECX instead of on the stack. +in registers EAX, EDX, and ECX instead of on the stack for "C", "cdecl", and "stdcall" fn. It is UNSOUND to link together crates that use different values for this flag. It is only supported on `x86`.