Skip to content

Commit dd6aceb

Browse files
committed
add a test that exercises at least one of these code paths
1 parent 8983783 commit dd6aceb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ci/miri.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ rustup toolchain install nightly --component miri
99
rustup override set nightly
1010
cargo miri setup
1111

12-
MIRIFLAGS='-Zmiri-strict-provenance' cargo miri test
12+
MIRIFLAGS='-Zmiri-strict-provenance' cargo miri test --features nightly

src/set.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2907,4 +2907,11 @@ mod test_set {
29072907
set.insert(i);
29082908
}
29092909
}
2910+
2911+
#[test]
2912+
fn collect() {
2913+
// At the time of writing, this hits the ZST case in from_base_index
2914+
// (and without the `map`, it does not).
2915+
let mut _set: HashSet<_> = (0..3).map(|_| ()).collect();
2916+
}
29102917
}

0 commit comments

Comments
 (0)