Do not allow safe usafe on static and fn items
This commit is contained in:
parent
d40f30e1df
commit
22831ed117
8 changed files with 219 additions and 34 deletions
|
@ -225,6 +225,20 @@ pub struct InvalidSafetyOnExtern {
|
|||
pub block: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(ast_passes_item_invalid_safety)]
|
||||
pub struct InvalidSafetyOnItem {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(ast_passes_bare_fn_invalid_safety)]
|
||||
pub struct InvalidSafetyOnBareFn {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(ast_passes_bound_in_context)]
|
||||
pub struct BoundInContext<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue