Skip to content

Commit cf96b19

Browse files
committed
Explain some tests
1 parent be4a0dd commit cf96b19

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/consts.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ fn test_generic_mismatch() {
8181
}
8282

8383
#[test]
84+
/// This test is the short version of `test_holds`, skipping
85+
/// substituting and directly going to a rigid constant.
8486
fn test_rigid_const_bound() {
8587
expect_test::expect![[r#"
8688
Ok(
@@ -97,6 +99,8 @@ fn test_rigid_const_bound() {
9799
}
98100

99101
#[test]
102+
/// This test is the short version of `test_generic_mismatch`, skipping
103+
/// substituting and directly going to a wrong constant.
100104
fn test_nonsense_rigid_const_bound() {
101105
expect_test::expect![[r#"
102106
Err(
@@ -119,6 +123,8 @@ fn test_nonsense_rigid_const_bound() {
119123
}
120124

121125
#[test]
126+
/// This test is wrong, but it's also not something rustc ever generates.
127+
/// Types on const generics only get exactly one `type_of_const` bound.
122128
fn test_multiple_type_of_const() {
123129
expect_test::expect![[r#"
124130
Ok(

0 commit comments

Comments
 (0)