(a: Self, b: Self)
| 153 | |
| 154 | impl Linkage { |
| 155 | fn merge(a: Self, b: Self) -> Self { |
| 156 | match a { |
| 157 | Self::Export => Self::Export, |
| 158 | Self::Hidden => match b { |
| 159 | Self::Export => Self::Export, |
| 160 | Self::Preemptible => Self::Preemptible, |
| 161 | _ => Self::Hidden, |
| 162 | }, |
| 163 | Self::Preemptible => match b { |
| 164 | Self::Export => Self::Export, |
| 165 | _ => Self::Preemptible, |
| 166 | }, |
| 167 | Self::Local => match b { |
| 168 | Self::Export => Self::Export, |
| 169 | Self::Hidden => Self::Hidden, |
| 170 | Self::Preemptible => Self::Preemptible, |
| 171 | Self::Local | Self::Import => Self::Local, |
| 172 | }, |
| 173 | Self::Import => b, |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | /// Test whether this linkage can have a definition. |
| 178 | pub fn is_definable(self) -> bool { |
no test coverage detected