File tree 10 files changed +30
-10
lines changed
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:
10
10
LL| 3|}
11
11
12
12
$DIR/doctest.rs:
13
+ LL| |// aux-build:doctest_crate.rs
14
+ LL| |
13
15
LL| |//! This test ensures that code from doctests is properly re-mapped.
14
16
LL| |//! See <https://github.com/rust-lang/rust/issues/79417> for more info.
15
17
LL| |//!
@@ -78,7 +80,7 @@ $DIR/doctest.rs:
78
80
LL| |//! doctest_main()
79
81
LL| |//! }
80
82
LL| |//! ```
81
- LL| |// aux-build:doctest_crate.rs
83
+ LL| |
82
84
LL| |/// doctest attached to fn testing external code:
83
85
LL| |/// ```
84
86
LL| 1|/// extern crate doctest_crate;
Original file line number Diff line number Diff line change
1
+ // aux-build:doctest_crate.rs
2
+
1
3
//! This test ensures that code from doctests is properly re-mapped.
2
4
//! See <https://github.com/rust-lang/rust/issues/79417> for more info.
3
5
//!
63
65
//! doctest_main()
64
66
//! }
65
67
//! ```
66
- // aux-build:doctest_crate.rs
68
+
67
69
/// doctest attached to fn testing external code:
68
70
/// ```
69
71
/// extern crate doctest_crate;
Original file line number Diff line number Diff line change 1
1
#![ allow( unused_assignments, unused_variables) ]
2
+ // Verify that coverage works with optimizations:
2
3
// compile-flags: -C opt-level=3
3
- use std:: fmt:: Debug ; // ^^ validates coverage now works with optimizations
4
+
5
+ use std:: fmt:: Debug ;
4
6
5
7
pub fn used_function ( ) {
6
8
// 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 1
1
#![ allow( unused_assignments, unused_variables) ]
2
-
2
+ // Verify that coverage works with optimizations:
3
3
// compile-flags: -C opt-level=3
4
- // ^^ validates coverage now works with optimizations
4
+
5
5
use std:: fmt:: Debug ;
6
6
7
7
pub fn used_function ( ) {
Original file line number Diff line number Diff line change 1
1
LL| |#![allow(unused_assignments, unused_variables)]
2
2
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() {
4
9
LL| 1| // Initialize test constants in a way that cannot be determined at compile time, to ensure
5
10
LL| 1| // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
6
11
LL| 1| // dependent conditions.
Original file line number Diff line number Diff line change 1
1
#![ allow( unused_assignments, unused_variables) ]
2
2
// 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 ( ) {
4
9
// Initialize test constants in a way that cannot be determined at compile time, to ensure
5
10
// rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
6
11
// dependent conditions.
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ $DIR/auxiliary/inline_always_with_dead_code.rs:
24
24
25
25
$DIR/issue-85461.rs:
26
26
LL| |// Regression test for #85461: MSVC sometimes fail to link with dead code and #[inline(always)]
27
+ LL| |
27
28
LL| |// aux-build:inline_always_with_dead_code.rs
28
29
LL| |extern crate inline_always_with_dead_code;
29
30
LL| |
Original file line number Diff line number Diff line change 1
1
// Regression test for #85461: MSVC sometimes fail to link with dead code and #[inline(always)]
2
+
2
3
// aux-build:inline_always_with_dead_code.rs
3
4
extern crate inline_always_with_dead_code;
4
5
Original file line number Diff line number Diff line change 1
1
$DIR/auxiliary/used_crate.rs:
2
2
LL| |#![allow(unused_assignments, unused_variables)]
3
+ LL| |// Verify that coverage works with optimizations:
3
4
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;
5
7
LL| |
6
8
LL| 1|pub fn used_function() {
7
9
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 1
1
$DIR/auxiliary/used_inline_crate.rs:
2
2
LL| |#![allow(unused_assignments, unused_variables)]
3
- LL| |
3
+ LL| |// Verify that coverage works with optimizations:
4
4
LL| |// compile-flags: -C opt-level=3
5
- LL| |// ^^ validates coverage now works with optimizations
5
+ LL| |
6
6
LL| |use std::fmt::Debug;
7
7
LL| |
8
8
LL| 1|pub fn used_function() {
You can’t perform that action at this time.
0 commit comments