Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
07438b0928c6691d6ee734a5a77823ec143be94d
rust/tests/run-coverage/unused_mod.coverage

14 lines
362 B
Plaintext
Raw Normal View History

Re-bless the newly-migrated tests
2023-06-12 18:07:04 +10:00
$DIR/auxiliary/unused_mod_helper.rs:
[code coverage] Fix missing dead code in modules that are never called The issue here is that the logic used to determine which CGU to put the dead function stubs in doesn't handle cases where a module is never assigned to a CGU. The partitioning logic also caused issues in #85461 where inline functions were duplicated into multiple CGUs resulting in duplicate symbols. This commit fixes the issue by removing the complex logic used to assign dead code stubs to CGUs and replaces it with a much simplier model: we pick one CGU to hold all the dead code stubs. We pick a CGU which has exported items which increases the likelihood the linker won't throw away our dead functions and we pick the smallest to minimize the impact on compilation times for crates with very large CGUs. Fixes #86177 Fixes #85718 Fixes #79622
2021-12-20 16:36:56 -05:00
1| 0|pub fn never_called_function() {
2| 0| println!("I am never called");
3| 0|}
Re-bless the newly-migrated tests
2023-06-12 18:07:04 +10:00
$DIR/unused_mod.rs:
1| |#[path = "auxiliary/unused_mod_helper.rs"]
2| |mod unused_module;
3| |
4| 1|fn main() {
5| 1| println!("hello world!");
6| 1|}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 482ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API