@@ -61,6 +61,7 @@ use rustc_data_structures::steal::Steal;
6161use rustc_data_structures:: svh:: Svh ;
6262use rustc_data_structures:: unord:: { UnordMap , UnordSet } ;
6363use rustc_errors:: { ErrorGuaranteed , catch_fatal_errors} ;
64+ use rustc_hashes:: Hash128 ;
6465use rustc_hir as hir;
6566use rustc_hir:: attrs:: { EiiDecl , EiiImpl , StrippedCfgItem } ;
6667use rustc_hir:: def:: { DefKind , DocLinkResMap } ;
@@ -69,7 +70,6 @@ use rustc_hir::lang_items::{LangItem, LanguageItems};
6970use rustc_hir:: { ItemLocalId , ItemLocalMap , PreciseCapturingArgKind , TraitCandidate } ;
7071use rustc_index:: IndexVec ;
7172use rustc_lint_defs:: LintId ;
72- use rustc_hashes:: Hash128 ;
7373use rustc_macros:: rustc_queries;
7474use rustc_session:: Limits ;
7575use rustc_session:: config:: { EntryFnType , OptLevel , OutputFilenames , SymbolManglingVersion } ;
@@ -1939,75 +1939,6 @@ rustc_queries! {
19391939 }
19401940 }
19411941
1942- /// The entire set of monomorphizations the local crate can safely
1943- /// link to because they are exported from upstream crates. Do
1944- /// not depend on this directly, as its value changes anytime
1945- /// a monomorphization gets added or removed in any upstream
1946- /// crate. Instead use the narrower `upstream_monomorphizations_for`,
1947- /// `upstream_drop_glue_for`, `upstream_async_drop_glue_for`, or,
1948- /// even better, `Instance::upstream_monomorphization()`.
1949- query upstream_monomorphizations( _: ( ) ) -> & ' tcx DefIdMap <UnordMap <GenericArgsRef <' tcx>, CrateNum >> {
1950- arena_cache
1951- desc { "collecting available upstream monomorphizations" }
1952- }
1953-
1954- /// Returns the set of upstream monomorphizations available for the
1955- /// generic function identified by the given `def_id`. The query makes
1956- /// sure to make a stable selection if the same monomorphization is
1957- /// available in multiple upstream crates.
1958- ///
1959- /// You likely want to call `Instance::upstream_monomorphization()`
1960- /// instead of invoking this query directly.
1961- query upstream_monomorphizations_for( def_id: DefId )
1962- -> Option <& ' tcx UnordMap <GenericArgsRef <' tcx>, CrateNum >>
1963- {
1964- desc {
1965- "collecting available upstream monomorphizations for `{}`" ,
1966- tcx. def_path_str( def_id) ,
1967- }
1968- separate_provide_extern
1969- }
1970-
1971- /// Returns the upstream crate that exports drop-glue for the given
1972- /// type (`args` is expected to be a single-item list containing the
1973- /// type one wants drop-glue for).
1974- ///
1975- /// This is a subset of `upstream_monomorphizations_for` in order to
1976- /// increase dep-tracking granularity. Otherwise adding or removing any
1977- /// type with drop-glue in any upstream crate would invalidate all
1978- /// functions calling drop-glue of an upstream type.
1979- ///
1980- /// You likely want to call `Instance::upstream_monomorphization()`
1981- /// instead of invoking this query directly.
1982- ///
1983- /// NOTE: This query could easily be extended to also support other
1984- /// common functions that have are large set of monomorphizations
1985- /// (like `Clone::clone` for example).
1986- query upstream_drop_glue_for( args: GenericArgsRef <' tcx>) -> Option <CrateNum > {
1987- desc { "available upstream drop-glue for `{:?}`" , args }
1988- }
1989-
1990- /// Returns the upstream crate that exports async-drop-glue for
1991- /// the given type (`args` is expected to be a single-item list
1992- /// containing the type one wants async-drop-glue for).
1993- ///
1994- /// This is a subset of `upstream_monomorphizations_for` in order
1995- /// to increase dep-tracking granularity. Otherwise adding or
1996- /// removing any type with async-drop-glue in any upstream crate
1997- /// would invalidate all functions calling async-drop-glue of an
1998- /// upstream type.
1999- ///
2000- /// You likely want to call `Instance::upstream_monomorphization()`
2001- /// instead of invoking this query directly.
2002- ///
2003- /// NOTE: This query could easily be extended to also support other
2004- /// common functions that have are large set of monomorphizations
2005- /// (like `Clone::clone` for example).
2006- query upstream_async_drop_glue_for( args: GenericArgsRef <' tcx>) -> Option <CrateNum > {
2007- desc { "available upstream async-drop-glue for `{:?}`" , args }
2008- }
2009-
2010-
20111942 /// Set of all fingerprints of generic items exported by `cnum`.
20121943 query exported_generic_symbol_hashes( cnum: CrateNum ) -> & ' tcx [ Hash128 ] {
20131944 desc { "getting exported generic symbol hashes for crate `{}`" , cnum }
0 commit comments