Explain that the current impl is only silly, not recursive
This commit is contained in:
parent
6ba56d227f
commit
a63035f9bf
1 changed files with 4 additions and 0 deletions
|
|
@ -83,6 +83,10 @@ where
|
|||
return None;
|
||||
}
|
||||
|
||||
// The query provider is based on calling the free function trivial_const, which calls mir_built,
|
||||
// which internally has a fast-path for trivial consts so it too calls trivial_const. This isn't
|
||||
// recursive, but we are checking if the const is trivial twice. A better design might detect
|
||||
// trivial consts before getting to MIR, which would hopefully straighten this out.
|
||||
pub(crate) fn trivial_const_provider<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
def: LocalDefId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue