✅ Easy Rust Solution
\nimpl Solution {\n    pub fn min_bitwise_array(nums: Vec<i32>) -> Vec<i32> {\n        let n = nums.len();\n\n        let mut results = Vec::with_capacity(n);\n
```\nimpl Solution {\n    pub fn min_bitwise_array(nums: Vec<i32>) -> Vec<i32> {\n        let n = nums.len();\n\n        let mut results = Vec::with_capacity(n);\n\n        \'outer: for num in nums {\n            for i in 0..num {\n                if i | (i + 1) == num {\n                    results.push(i);\n                    continue \'outer;\n                }\n            }\n            results.push(-1);\n        }\n\n        results\n    }\n}\n```
['Rust']