about summary refs log tree commit diff
path: root/tests/coverage/branch/lazy-boolean.rs
diff options
context:
space:
mode:
authorElias Holzmann <9659253+EliasHolzmann@users.noreply.github.com>2023-11-27 03:31:29 +0100
committerElias Holzmann <9659253+EliasHolzmann@users.noreply.github.com>2024-12-05 21:48:35 +0100
commitb0d3958e00b3b761d728df713665fed64e911ae3 (patch)
tree9a687299998a208e82093840840fd54fce80205b /tests/coverage/branch/lazy-boolean.rs
parentad8f264e46a3420bc90a94b8047d0a6efde497e8 (diff)
downloadrust-b0d3958e00b3b761d728df713665fed64e911ae3.tar.gz
rust-b0d3958e00b3b761d728df713665fed64e911ae3.zip
Formatter::with_options: Use different lifetimes
Formatter::with_options takes self as a mutable reference (`&'a mut
Formatter<'b>`). `'a` and `'b` need to be different lifetimes. Just taking `&'a
mut Formatter<'a>` and trusting in Rust being able to implicitely convert from
`&'a mut Formatter<'b>` if necessary (after all, `'a` must be smaller than `'b`
anyway) fails because `'b` is behind a *mutable* reference. For background on
on this behavior, see https://doc.rust-lang.org/nomicon/subtyping.html#variance.
Diffstat (limited to 'tests/coverage/branch/lazy-boolean.rs')
0 files changed, 0 insertions, 0 deletions