check_unsafe_propagation

Function check_unsafe_propagation 

Source
pub fn check_unsafe_propagation(
    function: &Function,
    safety_context: &SafetyContext,
    known_safe_functions: &HashSet<String>,
) -> Vec<String>
Expand description

Check for unsafe propagation in safe functions

In safe code, the following require explicit @unsafe annotation:

  1. Calling functions not marked as @safe
  2. Using types/structs not marked as @safe
  3. Any operation on unsafe types