Closed
Description
As of 1.27, it is legal to put attributes on generic parameters. E.g. fn foo<#[allow(dead_code)] T>(_t: T){}
, although none of the current attributes do anything. This includes attributes we may want to use in the future, such as cfg
. To avoid doing the warning song and dance we did with #[must_use]
on functions, we should disallow them before the feature actually stabilizes.