about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-02 04:12:09 +0000
committerbors <bors@rust-lang.org>2022-10-02 04:12:09 +0000
commit47b2eee1737cae830c4194858a5e8b8acaf2678b (patch)
tree0169487bd2ec26b02f98d985b53ac86af2a31240 /compiler/rustc_errors/src/snippet.rs
parentab37a83ae2c829b8597bdcda8244964ebc60b495 (diff)
parent72f15572ee5592c93bf307bfe94240d0e1f03601 (diff)
downloadrust-47b2eee1737cae830c4194858a5e8b8acaf2678b.tar.gz
rust-47b2eee1737cae830c4194858a5e8b8acaf2678b.zip
Auto merge of #102424 - sunfishcode:sunfishcode/hidden-main, r=nagisa
Declare `main` as visibility hidden on targets that default to hidden.

On targets with `default_hidden_visibility` set, which is currrently just WebAssembly, declare the generated `main` function with visibility hidden. This makes it consistent with clang's WebAssembly target, where `main` is just a user function that gets the same visibility as any other user function, which is hidden on WebAssembly unless explicitly overridden.

This will help simplify use cases which in the future may want to automatically wasm-export all visibility-"default" symbols. `main` isn't intended to be wasm-exported, and marking it hidden prevents it from being wasm-exported in that scenario.
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions