Repository: rust
Issue: Incremental compilation. `deserialize::__Visitor<'_>` has no field named `marker`
Labels: T-compiler,A-incr-comp,C-bug,S-needs-repro

I tried this code:

https://github.com/planetoryd/nsproxy

It compiles fine, incrementally, in 98% of cases. I have not done anything special before it throws the error, which happened occasionally but regularly during the past few months.

`cargo clean` always solves the problem

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.76.0-nightly (eeff92ad3 2023-12-13)
binary: rustc
commit-hash: eeff92ad32c2627876112ccfe812e19d38494087
commit-date: 2023-12-13
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.5

```

<details><summary>Error</summary>
<p>

```
warning: unused variable: `serv`
   --> src/systemd/mod.rs:310:26
    |
310 |     async fn stop(&self, serv: &Self::Serv, ctx: &<Self::Serv as ServiceM>::Ctx<'_>) -> Result<()> {
    |                          ^^^^ help: if this is intentional, prefix it with an underscore: `_serv`

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSUser>::deserialize::__Visitor<'_>` has no field named `marker`
   --> src/data.rs:574:41
    |
546 | defNS!(NSUser, CLONE_NEWUSER, "user", user);
    | ------------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSUser>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSUser>::deserialize::__Visitor<'_>` has no field named `lifetime`
   --> src/data.rs:574:41
    |
546 | defNS!(NSUser, CLONE_NEWUSER, "user", user);
    | ------------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSUser>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSMnt>::deserialize::__Visitor<'_>` has no field named `marker`
   --> src/data.rs:574:41
    |
547 | defNS!(NSMnt, CLONE_NEWNS, "mnt", mnt);
    | -------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSMnt>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSMnt>::deserialize::__Visitor<'_>` has no field named `lifetime`
   --> src/data.rs:574:41
    |
547 | defNS!(NSMnt, CLONE_NEWNS, "mnt", mnt);
    | -------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSMnt>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSNet>::deserialize::__Visitor<'_>` has no field named `marker`
   --> src/data.rs:574:41
    |
548 | defNS!(NSNet, CLONE_NEWNET, "net", net);
    | --------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSNet>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSNet>::deserialize::__Visitor<'_>` has no field named `lifetime`
   --> src/data.rs:574:41
    |
548 | defNS!(NSNet, CLONE_NEWNET, "net", net);
    | --------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSNet>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSUts>::deserialize::__Visitor<'_>` has no field named `marker`
   --> src/data.rs:574:41
    |
549 | defNS!(NSUts, CLONE_NEWUTS, "uts", uts);
    | --------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSUts>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSUts>::deserialize::__Visitor<'_>` has no field named `lifetime`
   --> src/data.rs:574:41
    |
549 | defNS!(NSUts, CLONE_NEWUTS, "uts", uts);
    | --------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSUts>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSPid>::deserialize::__Visitor<'_>` has no field named `marker`
   --> src/data.rs:574:41
    |
550 | defNS!(NSPid, CLONE_NEWPID, "pid", pid);
    | --------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSPid>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `data::_::<impl Deserialize<'de> for NSPid>::deserialize::__Visitor<'_>` has no field named `lifetime`
   --> src/data.rs:574:41
    |
550 | defNS!(NSPid, CLONE_NEWPID, "pid", pid);
    | --------------------------------------- in this macro invocation
...
574 |     #[derive(Default, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
    |                                         ^^^^^^^^^^^ `data::_::<impl Deserialize<'de> for NSPid>::deserialize::__Visitor<'_>` does not have this field
    |
    = note: all struct fields are already assigned
    = note: this error originates in the derive macro `Deserialize` which comes from the expansion of the macro `defNS` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused import: `Write`
 --> src/data.rs:5:20
  |
5 |     fmt::{Display, Write},
  |                    ^^^^^

warning: unused import: `IntoEdgesDirected`
  --> src/managed.rs:12:26
   |
12 |         visit::{EdgeRef, IntoEdgesDirected, IntoNodeReferences},
   |                          ^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0560`.
warning: `nsproxy` (lib) generated 46 warnings
error: could not compile `nsproxy` (lib) due to 10 previous errors; 46 warnings emitted
```

</p>
</details>