ILLink: Avoid warning for RUC field rooted as part of a root assembly #108498
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to #81864, fields in a RUC class are producing trim analysis warnings in the OOB trim step (the mentioned issue was specific to library mode, but it's also a problem for the normal root assembly mode).
This extends the fix from #84620 to avoid producing warnings for fields that are marked just because an assembly was rooted. There was some discussion around whether this is the right approach - since arguably rooting an assembly should warn about rooted RUC members. But that's not the case today for RUC methods, so this makes the behavior consistent for fields.
This came up in #108464.