@@ -881,13 +881,13 @@ rustc_queries! {
881
881
/// Maps a `DefId` of a type to a list of its inherent impls.
882
882
/// Contains implementations of methods that are inherent to a type.
883
883
/// Methods in these implementations don't need to be exported.
884
- query inherent_impls( key: DefId ) -> Result < & ' tcx [ DefId ] , ErrorGuaranteed > {
884
+ query inherent_impls( key: DefId ) -> & ' tcx [ DefId ] {
885
885
desc { |tcx| "collecting inherent impls for `{}`" , tcx. def_path_str( key) }
886
886
cache_on_disk_if { key. is_local( ) }
887
887
separate_provide_extern
888
888
}
889
889
890
- query incoherent_impls( key: SimplifiedType ) -> Result < & ' tcx [ DefId ] , ErrorGuaranteed > {
890
+ query incoherent_impls( key: SimplifiedType ) -> & ' tcx [ DefId ] {
891
891
desc { |tcx| "collecting all inherent impls for `{:?}`" , key }
892
892
}
893
893
@@ -1017,8 +1017,14 @@ rustc_queries! {
1017
1017
1018
1018
/// Gets a complete map from all types to their inherent impls.
1019
1019
/// Not meant to be used directly outside of coherence.
1020
- query crate_inherent_impls( k: ( ) ) -> Result < & ' tcx CrateInherentImpls , ErrorGuaranteed > {
1020
+ query crate_inherent_impls( k: ( ) ) -> ( & ' tcx CrateInherentImpls , Result < ( ) , ErrorGuaranteed >) {
1021
1021
desc { "finding all inherent impls defined in crate" }
1022
+ }
1023
+
1024
+ /// Checks all types in the crate for overlap in their inherent impls. Reports errors.
1025
+ /// Not meant to be used directly outside of coherence.
1026
+ query crate_inherent_impls_validity_check( _: ( ) ) -> Result <( ) , ErrorGuaranteed > {
1027
+ desc { "check for inherent impls that should not be defined in crate" }
1022
1028
ensure_forwards_result_if_red
1023
1029
}
1024
1030
@@ -1715,7 +1721,7 @@ rustc_queries! {
1715
1721
///
1716
1722
/// Do not call this directly, but instead use the `incoherent_impls` query.
1717
1723
/// This query is only used to get the data necessary for that query.
1718
- query crate_incoherent_impls( key: ( CrateNum , SimplifiedType ) ) -> Result < & ' tcx [ DefId ] , ErrorGuaranteed > {
1724
+ query crate_incoherent_impls( key: ( CrateNum , SimplifiedType ) ) -> & ' tcx [ DefId ] {
1719
1725
desc { |tcx| "collecting all impls for a type in a crate" }
1720
1726
separate_provide_extern
1721
1727
}
0 commit comments