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: root_constants.rs
    path of file: ./repos/gfx/src/backend/dx12/src
    
    the code of the file until where you have to start completion: //! Processing push constant ranges
//!
//! This module provides utitlity functions to make push constants root signature
//! compatible. Root constants are non-overlapping, therefore, the push constant
//! ranges passed at pipeline layout creation need to be `split` into disjunct
//! ranges. The disjunct ranges can be then converted into root signature entries.

use hal::pso;
use std::{cmp::Ordering, ops::Range};

#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct RootConstant {
    pub stages: pso::ShaderStageFlags,
    pub range: Range<u32
    
    fn test_overlap_4() {
        // Case:
        //      |--------------|
        //      |------------|
        let ranges = vec![
            (pso::ShaderStageFlags::VERTEX, 0..20),
            (pso::ShaderStageFlags::FRAGMENT, 0..16),
        ];

        let reference = vec![
            RootConstant {
                stages: pso::ShaderStageFlags::VERTEX | pso::ShaderStageFlags::FRAGMENT,
                range: 0..4,
            },
            RootConstant {
                stages: pso::ShaderStageFlags::VERTEX,
                range: 4..5,
            },
        ];
        assert_eq!(reference, split(ranges));
    }