rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.96k stars 12.79k forks source link

`#[rustc_default_body_unstable]` silently ignores `implied_by` and `soft` #130603

Open dianne opened 2 months ago

dianne commented 2 months ago

#[rustc_default_body_unstable] is treated the same as #[unstable] by parse_unstability in rustc_attr, so it accepts the same flags. However, the stability annotator in rustc_passes doesn't collect implications from it and eval_default_body_stability in rustc_middle doesn't check feature-gate implications. Likewise, it accepts soft but default_body_is_unstable in rustc_hir_analysis ignores it.

I think I can fix this (I don't imagine it's high-priority) but I'd like to check first whether it's intentionally not handled. Currently I don't think anything in library/ or src/ uses or acknowledges #[rustc_default_body_unstable]/rustc_attr::DefaultBodyStability.

Noratrieb commented 2 months ago

i imagine stuff like this doesn't do it intentionally