-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)
Description
I think this error message would be slightly confusing for a novice:
/Users/tjc/rust3/src/libstd/os.rs:2091:20: 2091:31 error: invoking non-Rust fn in fn without #[fixed_stack_segment] [-D cstack (default)]
/Users/tjc/rust3/src/libstd/os.rs:2091 libc::fopen(fromp, modebuf)
^~~~~~~~~~~
One way to read the error is that you should literally type #[fixed_stack_segment] [-D cstack (default)]
in your code. Maybe there's a way to improve this error message to make it clearer that you have the choice of either using the fixed_stack_segment attribute, or the -D command-line flag. The error doesn't make it totally clear that the second thing-in-brackets is a command-line flag.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)