You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: interpolator.rs
    path of file: ./repos/wgpu/naga/src/front
    
    the code of the file until where you have to start completion: /*!
Interpolation defaults.
*/

impl crate::Binding {
    /// Apply the usual default interpolation for `ty` to `binding`.
    ///
    /// This function is a utility front ends may use to satisfy the Naga IR's
    /// requirement, meant to ensure that input languages' policies have been
    /// applied appropriately, that all I/O `Binding`s from the vertex shader to the
    /// fragment shader must have non-`None` `interpolation` values.
    ///
    /// All the shader languages Naga supports have similar rules:
    /// perspective-corr
    
    pub fn apply_default_interpolation(&mut self, ty: &crate::TypeInner) {
        if let crate::Binding::Location {
            location: _,
            interpolation: ref mut interpolation @ None,
            ref mut sampling,
            second_blend_source: _,
        } = *self
        {
            match ty.scalar_kind() {
                Some(crate::ScalarKind::Float) => {
                    *interpolation = Some(crate::Interpolation::Perspective);
                    *sampling = Some(crate::Sampling::Center);
                }
                Some(crate::ScalarKind::Sint | crate::ScalarKind::Uint) => {
                    *interpolation = Some(crate::Interpolation::Flat);
                    *sampling = None;
                }
                Some(_) | None => {}
            }
        }
    }