error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:4:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::IterMut<'_, &'new (), _>` found struct `std::collections::btree_map::IterMut<'_, &'static (), _>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:3:21 | LL | fn iter_cov_key<'a, 'new>(v: IterMut<'a, &'static (), ()>) -> IterMut<'a, &'new (), ()> { | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:7:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::IterMut<'_, _, &'new ()>` found struct `std::collections::btree_map::IterMut<'_, _, &'static ()>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:6:21 | LL | fn iter_cov_val<'a, 'new>(v: IterMut<'a, (), &'static ()>) -> IterMut<'a, (), &'new ()> { | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:10:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::IterMut<'_, &'static (), _>` found struct `std::collections::btree_map::IterMut<'_, &'new (), _>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:9:24 | LL | fn iter_contra_key<'a, 'new>(v: IterMut<'a, &'new (), ()>) -> IterMut<'a, &'static (), ()> { | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:13:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::IterMut<'_, _, &'static ()>` found struct `std::collections::btree_map::IterMut<'_, _, &'new ()>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:12:24 | LL | fn iter_contra_val<'a, 'new>(v: IterMut<'a, (), &'new ()>) -> IterMut<'a, (), &'static ()> { | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:17:5 | LL | v | ^ lifetime mismatch | = note: expected struct `RangeMut<'_, &'new (), _>` found struct `RangeMut<'_, &'static (), _>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:16:22 | LL | fn range_cov_key<'a, 'new>(v: RangeMut<'a, &'static (), ()>) -> RangeMut<'a, &'new (), ()> { | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:20:5 | LL | v | ^ lifetime mismatch | = note: expected struct `RangeMut<'_, _, &'new ()>` found struct `RangeMut<'_, _, &'static ()>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:19:22 | LL | fn range_cov_val<'a, 'new>(v: RangeMut<'a, (), &'static ()>) -> RangeMut<'a, (), &'new ()> { | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:23:5 | LL | v | ^ lifetime mismatch | = note: expected struct `RangeMut<'_, &'static (), _>` found struct `RangeMut<'_, &'new (), _>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:22:25 | LL | fn range_contra_key<'a, 'new>(v: RangeMut<'a, &'new (), ()>) -> RangeMut<'a, &'static (), ()> { | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:26:5 | LL | v | ^ lifetime mismatch | = note: expected struct `RangeMut<'_, _, &'static ()>` found struct `RangeMut<'_, _, &'new ()>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:25:25 | LL | fn range_contra_val<'a, 'new>(v: RangeMut<'a, (), &'new ()>) -> RangeMut<'a, (), &'static ()> { | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:31:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>` found struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:29:20 | LL | fn occ_cov_key<'a, 'new>(v: OccupiedEntry<'a, &'static (), ()>) | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:35:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>` found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:33:20 | LL | fn occ_cov_val<'a, 'new>(v: OccupiedEntry<'a, (), &'static ()>) | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:39:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>` found struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:37:23 | LL | fn occ_contra_key<'a, 'new>(v: OccupiedEntry<'a, &'new (), ()>) | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:43:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>` found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:41:23 | LL | fn occ_contra_val<'a, 'new>(v: OccupiedEntry<'a, (), &'new ()>) | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:48:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>` found struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:46:20 | LL | fn vac_cov_key<'a, 'new>(v: VacantEntry<'a, &'static (), ()>) | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:52:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>` found struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:50:20 | LL | fn vac_cov_val<'a, 'new>(v: VacantEntry<'a, (), &'static ()>) | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:56:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>` found struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:54:23 | LL | fn vac_contra_key<'a, 'new>(v: VacantEntry<'a, &'new (), ()>) | ^^^^ = note: ...does not necessarily outlive the static lifetime error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:60:5 | LL | v | ^ lifetime mismatch | = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>` found struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>` note: the lifetime `'new` as defined here... --> $DIR/variance-btree-invariant-types.rs:58:23 | LL | fn vac_contra_val<'a, 'new>(v: VacantEntry<'a, (), &'new ()>) | ^^^^ = note: ...does not necessarily outlive the static lifetime error: aborting due to 16 previous errors For more information about this error, try `rustc --explain E0308`.