Validate use of parameters in naked functions
* Reject use of parameters inside naked function body. * Reject use of patterns inside function parameters, to emphasize role of parameters a signature declaration (mirroring existing behaviour for function declarations) and avoid generating code introducing specified bindings.
This commit is contained in:
parent
773ddbada7
commit
22d3431221
7 changed files with 221 additions and 49 deletions
|
@ -635,6 +635,10 @@ rustc_queries! {
|
|||
desc { |tcx| "checking loops in {}", describe_as_module(key, tcx) }
|
||||
}
|
||||
|
||||
query check_mod_naked_functions(key: LocalDefId) -> () {
|
||||
desc { |tcx| "checking naked functions in {}", describe_as_module(key, tcx) }
|
||||
}
|
||||
|
||||
query check_mod_item_types(key: LocalDefId) -> () {
|
||||
desc { |tcx| "checking item types in {}", describe_as_module(key, tcx) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue