diff options
Diffstat (limited to 'src/librustc/lint/mod.rs')
| -rw-r--r-- | src/librustc/lint/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index 5dc23d27ee1..bdcc10ebcec 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -185,12 +185,20 @@ impl PartialEq for LintId { impl Eq for LintId { } +#[cfg(stage0)] impl<S: hash::Writer + hash::Hasher> hash::Hash<S> for LintId { fn hash(&self, state: &mut S) { let ptr = self.lint as *const Lint; ptr.hash(state); } } +#[cfg(not(stage0))] +impl hash::Hash for LintId { + fn hash<H: hash::Hasher>(&self, state: &mut H) { + let ptr = self.lint as *const Lint; + ptr.hash(state); + } +} impl LintId { /// Get the `LintId` for a `Lint`. |
