[turbopack] Allow `value_trait` items to not be annotated with `turbo_tasks::function` (#79217)
Allow items in `value_trait` definitions to not be marked with `turbo_tasks::function`
As a POC remove the `function` attribute from `Issue::severity` and all implementors. In a followup i will explore removing `turbo_task::function` from more `Issue` items.
Now if you define a `turbo_tasks::value_trait` because you want to pass around values like `Vc<Box<dyn Trait>>` or emit it as a collectible you don't have to make every trait item a `turbo_tasks::function`. To call these items you will need to `vc.into_trait_ref().await?` and then you can call the methods normally.
This has an odd effect of kind of splitting the `trait` in half, some methods can be called on `Vc<Self>` and some can be called on `&self`. Annoyingly you cannot make these items `async` since `value_trait` needs to dyn-compatible, but still this unlocks a lot of opportunities.
h/t to kdy1@ for unblocking me on how to use ptr_metadata and how to resolve the issues i was having with Rust-Analyzer