]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #93175 - spastorino:negative-traits-coherence-new, r=nikomatsakis
authorMatthias Krüger <matthias.krueger@famsik.de>
Tue, 25 Jan 2022 04:51:12 +0000 (05:51 +0100)
committerGitHub <noreply@github.com>
Tue, 25 Jan 2022 04:51:12 +0000 (05:51 +0100)
Implement stable overlap check considering negative traits

This PR implement the new disjointness rules for overlap check described in https://rust-lang.github.io/negative-impls-initiative/explainer/coherence-check.html#new-disjointness-rules

r? ``@nikomatsakis``

1  2 
compiler/rustc_span/src/symbol.rs

index ac4729f717da78081fa44e9e8e44680a48de8ea6,7e0ce89be67fc8b55589803ca1214f5ea662095e..52d52752b158326e5501701076e11e54fde27ab0
@@@ -990,7 -990,6 +990,7 @@@ symbols! 
          panic_implementation,
          panic_info,
          panic_location,
 +        panic_no_unwind,
          panic_runtime,
          panic_str,
          panic_unwind,
          rustc_trivial_field_reads,
          rustc_unsafe_specialization_marker,
          rustc_variance,
+         rustc_with_negative_coherence,
          rustdoc,
          rustdoc_internals,
          rustfmt,
@@@ -1756,8 -1756,8 +1757,8 @@@ impl<S: Encoder> Encodable<S> for Symbo
  
  impl<D: Decoder> Decodable<D> for Symbol {
      #[inline]
 -    fn decode(d: &mut D) -> Result<Symbol, D::Error> {
 -        Ok(Symbol::intern(&d.read_str()?))
 +    fn decode(d: &mut D) -> Symbol {
 +        Symbol::intern(&d.read_str())
      }
  }