-
-
Notifications
You must be signed in to change notification settings - Fork 15k
custom target JSON fields do not error if they have an incorrect type #144153
Copy link
Copy link
Closed
Labels
A-target-specsArea: Compile-target specificationsArea: Compile-target specificationsA-targetsArea: Concerning the implications of different compiler targetsArea: Concerning the implications of different compiler targetsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-target-specsArea: Compile-target specificationsArea: Compile-target specificationsA-targetsArea: Concerning the implications of different compiler targetsArea: Concerning the implications of different compiler targetsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
If you have a custom target JSON with an incorrect type, for example
"target-c-int-width": "16", the value will just be silently ignored instead of erroring.this is because of the way the JSON parsing works:
rust/compiler/rustc_target/src/spec/json.rs
Lines 83 to 136 in 6caa224
It should be changed so that it emits an error.