File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,10 @@ macro_rules! define_callbacks {
200200
201201 $( pub type $name<' tcx> = $V; ) *
202202 }
203+
204+ /// This module specifies the type returned from query providers and the type used for
205+ /// decoding. For regular queries this is the declared returned type `V`, but
206+ /// `arena_cache` will use `<V as Deref>::Target` instead.
203207 #[ allow( nonstandard_style, unused_lifetimes) ]
204208 pub mod query_provided {
205209 use super :: * ;
@@ -208,12 +212,17 @@ macro_rules! define_callbacks {
208212 pub type $name<' tcx> = query_if_arena!( [ $( $modifiers) * ] ( <$V as Deref >:: Target ) ( $V) ) ;
209213 ) *
210214 }
215+
216+ /// This module has a function per query which takes a `query_provided` value and coverts
217+ /// it to a regular `V` value by allocating it on an arena if the query has the
218+ /// `arena_cache` modifier. This will happen when computing the query using a provider or
219+ /// decoding a stored result.
211220 #[ allow( nonstandard_style, unused_lifetimes) ]
212221 pub mod query_provided_to_value {
213222 use super :: * ;
214223
215224 $(
216- #[ inline]
225+ #[ inline( always ) ]
217226 pub fn $name<' tcx>(
218227 _tcx: TyCtxt <' tcx>,
219228 value: query_provided:: $name<' tcx>,
You can’t perform that action at this time.
0 commit comments