Repository: rust
Issue: "a temporary value which is freed while still in use" in nightly but not on stable
Labels: P-medium,T-compiler,regression-from-stable-to-stable,C-bug

<!--
Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to.

Please provide a short summary of the regression, along with any information you feel is relevant to replicate it.
-->

### Code

I tried this code:

```rust
// Do: cargo add obfstr

fn main() {
    let product = "macos";
    let is_not = |s| !product.eq_ignore_ascii_case(s);

    let _res = is_not(obfstr::obfstr!("windows")) && is_not(obfstr::obfstr!("macos"));
}
```

I expected to see this happen: the code compiles without problems on stable and nightly

Instead, this happened: compilation failed but only on nightly

```
RUSTFLAGS="-Z macro-backtrace" cg +nightly build -q

error[E0716]: temporary value dropped while borrowed
   --> /Users/alexis/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/obfstr-0.4.1/src/bytes.rs:93:16
    |
54  |   macro_rules! obfstr {
    |   ------------------- in this expansion of `obfstr::obfstr!` (#1)
...
66  |           $crate::unsafe_as_str($crate::obfbytes!($s.as_bytes()))
    |                                 -------------------------------- in this macro invocation (#2)
...
72  |   macro_rules! obfbytes {
    |   --------------------- in this expansion of `$crate::obfbytes!` (#2)
...
86  |           &$crate::__obfbytes!($s)
    |            ----------------------- in this macro invocation (#3)
...
92  |   macro_rules! __obfbytes {
    |   ----------------------- in this expansion of `$crate::__obfbytes!` (#3)
93  |       ($s:expr) => {{
    |  ___________________^
94  | |         const _OBFBYTES_STRING: &[u8] = $s;
95  | |         const _OBFBYTES_LEN: usize = _OBFBYTES_STRING.len();
96  | |         const _OBFBYTES_KEYSTREAM: [u8; _OBFBYTES_LEN] = $crate::bytes::keystream::<_OBFBYTES_LEN>($crate::__entropy!("key", stringify!($...
...   |
103 | |             &_OBFBYTES_KEYSTREAM)
104 | |     }};
    | |_____^ creates a temporary value which is freed while still in use
    |
   ::: src/main.rs:5:49
    |
5   |       let _res = is_not(obfstr::obfstr!("windows")) && is_not(obfstr::obfstr!("macos"));
    |                         ---------------------------    ------ borrow later used here
    |                         |                         |
    |                         |                         temporary value is freed at the end of this statement
    |                         in this macro invocation (#1)
    |
    = note: consider using a `let` binding to create a longer lived value

For more information about this error, try `rustc --explain E0716`.
error: could not compile `pg2` due to previous error
```

### Version it worked on

<!--
Provide the most recent version this worked on, for example:

It most recently worked on: Rust 1.47
-->

It most recently worked on: Rust 1.66

### Version with regression

<!--
Provide the version you are using that has the regression.
-->

`rustc --version --verbose`:
```
rustc 1.68.0-nightly (d0dc9efff 2022-12-18)
binary: rustc
commit-hash: d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0
commit-date: 2022-12-18
host: aarch64-apple-darwin
release: 1.68.0-nightly
LLVM version: 15.0.6
```

<!--
Did the compiler crash? If so, please provide a backtrace.
-->

### Backtrace
<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
<backtrace>
```

</p>
</details>

<!--
If you know when this regression occurred, please add a line like below, replacing `{channel}` with one of stable, beta, or nightly.

@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
-->