Remove ffi_returns_twice feature

This commit is contained in:
clubby789
2024-01-30 20:55:56 +00:00
parent 5ad7454f75
commit 7331315898
20 changed files with 19 additions and 120 deletions

View File

@@ -190,7 +190,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
}
sym::ffi_pure => self.check_ffi_pure(attr.span, attrs, target),
sym::ffi_const => self.check_ffi_const(attr.span, target),
sym::ffi_returns_twice => self.check_ffi_returns_twice(attr.span, target),
sym::rustc_const_unstable
| sym::rustc_const_stable
| sym::unstable
@@ -1307,15 +1306,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
}
}
fn check_ffi_returns_twice(&self, attr_span: Span, target: Target) -> bool {
if target == Target::ForeignFn {
true
} else {
self.dcx().emit_err(errors::FfiReturnsTwiceInvalidTarget { attr_span });
false
}
}
/// Warns against some misuses of `#[must_use]`
fn check_must_use(&self, hir_id: HirId, attr: &Attribute, target: Target) -> bool {
if !matches!(