Require the constness
query to only be invoked on things that can have constness
This commit is contained in:
parent
3d0bf68625
commit
c0e0d8f874
6 changed files with 66 additions and 13 deletions
|
@ -746,7 +746,9 @@ rustc_queries! {
|
|||
desc { |tcx| "computing drop-check constraints for `{}`", tcx.def_path_str(key) }
|
||||
}
|
||||
|
||||
/// Returns `true` if this is a const fn / const impl.
|
||||
/// Returns the constness of functions and impls.
|
||||
///
|
||||
/// Will ICE if used on things that are always const or never const.
|
||||
///
|
||||
/// **Do not call this function manually.** It is only meant to cache the base data for the
|
||||
/// higher-level functions. Consider using `is_const_fn` or `is_const_trait_impl` instead.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue