File tree Expand file tree Collapse file tree 10 files changed +30
-10
lines changed Expand file tree Collapse file tree 10 files changed +30
-10
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ $DIR/auxiliary/doctest_crate.rs:
1010 LL| 3|}
1111
1212$DIR/doctest.rs:
13+ LL| |// aux-build:doctest_crate.rs
14+ LL| |
1315 LL| |//! This test ensures that code from doctests is properly re-mapped.
1416 LL| |//! See <https://github.com/rust-lang/rust/issues/79417> for more info.
1517 LL| |//!
@@ -78,7 +80,7 @@ $DIR/doctest.rs:
7880 LL| |//! doctest_main()
7981 LL| |//! }
8082 LL| |//! ```
81- LL| |// aux-build:doctest_crate.rs
83+ LL| |
8284 LL| |/// doctest attached to fn testing external code:
8385 LL| |/// ```
8486 LL| 1|/// extern crate doctest_crate;
Original file line number Diff line number Diff line change 1+ // aux-build:doctest_crate.rs
2+
13//! This test ensures that code from doctests is properly re-mapped.
24//! See <https://github.com/rust-lang/rust/issues/79417> for more info.
35//!
6365//! doctest_main()
6466//! }
6567//! ```
66- // aux-build:doctest_crate.rs
68+
6769/// doctest attached to fn testing external code:
6870/// ```
6971/// extern crate doctest_crate;
Original file line number Diff line number Diff line change 11#![ allow( unused_assignments, unused_variables) ]
2+ // Verify that coverage works with optimizations:
23// compile-flags: -C opt-level=3
3- use std:: fmt:: Debug ; // ^^ validates coverage now works with optimizations
4+
5+ use std:: fmt:: Debug ;
46
57pub fn used_function ( ) {
68 // Initialize test constants in a way that cannot be determined at compile time, to ensure
Original file line number Diff line number Diff line change 11#![ allow( unused_assignments, unused_variables) ]
2-
2+ // Verify that coverage works with optimizations:
33// compile-flags: -C opt-level=3
4- // ^^ validates coverage now works with optimizations
4+
55use std:: fmt:: Debug ;
66
77pub fn used_function ( ) {
Original file line number Diff line number Diff line change 11 LL| |#![allow(unused_assignments, unused_variables)]
22 LL| |// compile-flags: -C opt-level=2
3- LL| 1|fn main() { // ^^ fix described in rustc_middle/mir/mono.rs
3+ LL| |
4+ LL| |// This test used to be sensitive to certain coverage-specific hacks in
5+ LL| |// `rustc_middle/mir/mono.rs`, but those hacks were later cleaned up by
6+ LL| |// <https://github.com/rust-lang/rust/pull/83666>.
7+ LL| |
8+ LL| 1|fn main() {
49 LL| 1| // Initialize test constants in a way that cannot be determined at compile time, to ensure
510 LL| 1| // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
611 LL| 1| // dependent conditions.
Original file line number Diff line number Diff line change 11#![ allow( unused_assignments, unused_variables) ]
22// compile-flags: -C opt-level=2
3- fn main ( ) { // ^^ fix described in rustc_middle/mir/mono.rs
3+
4+ // This test used to be sensitive to certain coverage-specific hacks in
5+ // `rustc_middle/mir/mono.rs`, but those hacks were later cleaned up by
6+ // <https://github.com/rust-lang/rust/pull/83666>.
7+
8+ fn main ( ) {
49 // Initialize test constants in a way that cannot be determined at compile time, to ensure
510 // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
611 // dependent conditions.
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ $DIR/auxiliary/inline_always_with_dead_code.rs:
2424
2525$DIR/issue-85461.rs:
2626 LL| |// Regression test for #85461: MSVC sometimes fail to link with dead code and #[inline(always)]
27+ LL| |
2728 LL| |// aux-build:inline_always_with_dead_code.rs
2829 LL| |extern crate inline_always_with_dead_code;
2930 LL| |
Original file line number Diff line number Diff line change 11// Regression test for #85461: MSVC sometimes fail to link with dead code and #[inline(always)]
2+
23// aux-build:inline_always_with_dead_code.rs
34extern crate inline_always_with_dead_code;
45
Original file line number Diff line number Diff line change 11$DIR/auxiliary/used_crate.rs:
22 LL| |#![allow(unused_assignments, unused_variables)]
3+ LL| |// Verify that coverage works with optimizations:
34 LL| |// compile-flags: -C opt-level=3
4- LL| |use std::fmt::Debug; // ^^ validates coverage now works with optimizations
5+ LL| |
6+ LL| |use std::fmt::Debug;
57 LL| |
68 LL| 1|pub fn used_function() {
79 LL| 1| // Initialize test constants in a way that cannot be determined at compile time, to ensure
Original file line number Diff line number Diff line change 11$DIR/auxiliary/used_inline_crate.rs:
22 LL| |#![allow(unused_assignments, unused_variables)]
3- LL| |
3+ LL| |// Verify that coverage works with optimizations:
44 LL| |// compile-flags: -C opt-level=3
5- LL| |// ^^ validates coverage now works with optimizations
5+ LL| |
66 LL| |use std::fmt::Debug;
77 LL| |
88 LL| 1|pub fn used_function() {
You can’t perform that action at this time.
0 commit comments