Warns about deprecated flags that graduated to stable options. They are still accepted, but will be removed in a future release.
(&self)
| 111 | /// Warns about deprecated flags that graduated to stable options. They are still |
| 112 | /// accepted, but will be removed in a future release. |
| 113 | pub fn warn_if_deprecated(&self) { |
| 114 | let deprecated = [ |
| 115 | ( |
| 116 | self.experimental_cycle_estimation, |
| 117 | "--experimental-cycle-estimation", |
| 118 | "use --cycle-estimation instead", |
| 119 | ), |
| 120 | ( |
| 121 | self.experimental_exclude_allocations, |
| 122 | "--experimental-exclude-allocations", |
| 123 | "use --exclude-allocations instead", |
| 124 | ), |
| 125 | ( |
| 126 | self.experimental_memory_track_physical.is_some(), |
| 127 | "--experimental-memory-track-physical", |
| 128 | "physical memory tracking is now controlled by --disable-memory-track-physical", |
| 129 | ), |
| 130 | ( |
| 131 | self.experimental_memory_capture_stack.is_some(), |
| 132 | "--experimental-memory-capture-stack", |
| 133 | "stack capture is now controlled by --disable-memory-capture-stack", |
| 134 | ), |
| 135 | ]; |
| 136 | |
| 137 | for (_, flag, hint) in deprecated.iter().filter(|(set, ..)| *set) { |
| 138 | eprintln!("{flag} is deprecated and will be removed in a future release: {hint}."); |
| 139 | } |
| 140 | } |
| 141 | } |