Rollup merge of #120917 - chenyukang:yukang-dead-parameters, r=compiler-errors
Remove a bunch of dead parameters in functions Found this kind of issue when working on https://github.com/rust-lang/rust/pull/119650 I wrote a trivial toy lint and manual review to find these.
This commit is contained in:
commit
ebe36ac815
16 changed files with 30 additions and 71 deletions
|
@ -197,7 +197,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
| sym::unstable
|
||||
| sym::stable
|
||||
| sym::rustc_allowed_through_unstable_modules
|
||||
| sym::rustc_promotable => self.check_stability_promotable(attr, span, target),
|
||||
| sym::rustc_promotable => self.check_stability_promotable(attr, target),
|
||||
sym::link_ordinal => self.check_link_ordinal(attr, span, target),
|
||||
sym::rustc_confusables => self.check_confusables(attr, target),
|
||||
sym::rustc_safe_intrinsic => {
|
||||
|
@ -2099,7 +2099,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
fn check_stability_promotable(&self, attr: &Attribute, _span: Span, target: Target) -> bool {
|
||||
fn check_stability_promotable(&self, attr: &Attribute, target: Target) -> bool {
|
||||
match target {
|
||||
Target::Expression => {
|
||||
self.dcx().emit_err(errors::StabilityPromotable { attr_span: attr.span });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue