about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-02-24 21:59:36 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-02-24 21:59:36 -0500
commit4f15867faf2797257cbeb9e4a38ae8dc87dcf2e9 (patch)
tree39cd38983d0345fe99fe3f26fc58939e11168e7a /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent03ca0e270613592f35ce654e2ef1e68cdfb154e3 (diff)
downloadrust-4f15867faf2797257cbeb9e4a38ae8dc87dcf2e9.tar.gz
rust-4f15867faf2797257cbeb9e4a38ae8dc87dcf2e9.zip
bootstrap: Further centralize target defaulting logic.
Background: targets can be specied with or without config files;
unneccessarily differences in the logic between those cases has caused
a) the bug I tried to fix in the previous commit, b) the bug I
introduced in the previous commit.

The solution is to make the code paths the same as much as possible.

1. Targets are now not created from the `default` method. (I would both
remove the impl if this was a public library, but just wrap it for
convience becaues it's not.) Instead, there is a `from_triple` method
which does the defaulting.

2. Besides the sanity checking, use the new method in the code reading
config files. Now `no_std` is overriden iff set explicitly just like the
other fields which are optional in the TOML AST type.

3. In sanity checking, just populate the map for all targets no matter
what. That way do don't duplicate logic trying to be clever and remember
which targets have "non standard" overrides. Sanity checking is back to
just sanity checking, and out of the game of trying to default too.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions