BTree: rename compile-time assertions to match library/alloc/tests

This commit is contained in:
Stein Somers 2021-12-10 15:18:54 +01:00
parent 0b42deaccc
commit c8bc4b7a55
2 changed files with 6 additions and 6 deletions

View File

@ -1556,7 +1556,7 @@ fn test_clone_from() {
}
#[allow(dead_code)]
fn test_variance() {
fn assert_covariance() {
fn map_key<'new>(v: BTreeMap<&'static str, ()>) -> BTreeMap<&'new str, ()> {
v
}
@ -1615,7 +1615,7 @@ fn test_variance() {
}
#[allow(dead_code)]
fn test_sync() {
fn assert_sync() {
fn map<T: Sync>(v: &BTreeMap<T, T>) -> impl Sync + '_ {
v
}
@ -1684,7 +1684,7 @@ fn test_sync() {
}
#[allow(dead_code)]
fn test_send() {
fn assert_send() {
fn map<T: Send>(v: BTreeMap<T, T>) -> impl Send {
v
}

View File

@ -513,7 +513,7 @@ fn test_recovery() {
}
#[allow(dead_code)]
fn test_variance() {
fn assert_covariance() {
fn set<'new>(v: BTreeSet<&'static str>) -> BTreeSet<&'new str> {
v
}
@ -530,7 +530,7 @@ fn test_variance() {
}
#[allow(dead_code)]
fn test_sync() {
fn assert_sync() {
fn set<T: Sync>(v: &BTreeSet<T>) -> impl Sync + '_ {
v
}
@ -569,7 +569,7 @@ fn test_sync() {
}
#[allow(dead_code)]
fn test_send() {
fn assert_send() {
fn set<T: Send>(v: BTreeSet<T>) -> impl Send {
v
}