diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-25 20:17:29 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-26 12:03:23 +1100 |
| commit | ca9988ec49debec4cd567d0aa719e2ee108c038b (patch) | |
| tree | 6012b06a1707d60417e7d41345696ee72a7510a4 /compiler/rustc_middle/src/ty/mod.rs | |
| parent | 43f0014ef0f242418674f49052ed39b70f73bc1c (diff) | |
| download | rust-ca9988ec49debec4cd567d0aa719e2ee108c038b.tar.gz rust-ca9988ec49debec4cd567d0aa719e2ee108c038b.zip | |
Remove `kw::Empty` uses from `rustc_middle`.
There are several places in `rustc_middle` that check for an empty lifetime name. These checks appear to be totally unnecessary, because empty lifetime names aren't produced here. (Empty lifetime names *are* possible in `hir::Lifetime`. Perhaps there was some confusion between it and the `rustc_middle` types?) This commit removes the `kw::Empty` checks.
Diffstat (limited to 'compiler/rustc_middle/src/ty/mod.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 6bdd0a0647d..ac98cbc8d6c 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -457,7 +457,7 @@ impl EarlyParamRegion { /// Does this early bound region have a name? Early bound regions normally /// always have names except when using anonymous lifetimes (`'_`). pub fn has_name(&self) -> bool { - self.name != kw::UnderscoreLifetime && self.name != kw::Empty + self.name != kw::UnderscoreLifetime } } |
