We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ba56d2 commit a63035fCopy full SHA for a63035f
compiler/rustc_mir_transform/src/trivial_const.rs
@@ -83,6 +83,10 @@ where
83
return None;
84
}
85
86
+// The query provider is based on calling the free function trivial_const, which calls mir_built,
87
+// which internally has a fast-path for trivial consts so it too calls trivial_const. This isn't
88
+// recursive, but we are checking if the const is trivial twice. A better design might detect
89
+// trivial consts before getting to MIR, which would hopefully straighten this out.
90
pub(crate) fn trivial_const_provider<'tcx>(
91
tcx: TyCtxt<'tcx>,
92
def: LocalDefId,
0 commit comments