diff options
| author | Michael Baikov <manpacket@gmail.com> | 2024-03-21 16:13:46 -0400 |
|---|---|---|
| committer | Michael Baikov <manpacket@gmail.com> | 2024-03-22 10:59:13 -0400 |
| commit | bf12aa49e71d6e444c34d7adb87647f36b7dde1a (patch) | |
| tree | e65281a3f94007497f2ac1576aeaf4ad6c4d7da4 /compiler/rustc_session/src | |
| parent | 03994e498df79aa1f97f7bbcfd52d57c8e865049 (diff) | |
| download | rust-bf12aa49e71d6e444c34d7adb87647f36b7dde1a.tar.gz rust-bf12aa49e71d6e444c34d7adb87647f36b7dde1a.zip | |
Don't emit an error about failing to produce a file with a specific name
If user never gave an explicit name
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index e6eb1a3e83c..e4d2af95c57 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -557,6 +557,11 @@ impl OutputTypes { self.0.contains_key(key) } + /// Returns `true` if user specified a name and not just produced type + pub fn contains_explicit_name(&self, key: &OutputType) -> bool { + self.0.get(key).map_or(false, |f| f.is_some()) + } + pub fn iter(&self) -> BTreeMapIter<'_, OutputType, Option<OutFileName>> { self.0.iter() } |
