7 matches across 1 files for error path:compiler/rustc_ast/src/expand/autodiff_attrs.rs
snippet_mode: grep · sorted by relevance
compiler/rustc_ast/src/expand/autodiff_attrs.rs RUST 7 matches · showing 5 view file →
23#[derive(Clone, Copy, Eq, PartialEq, Encodable, Decodable, Debug, StableHash)]
24pub enum DiffMode {
25 /// No autodiff is applied (used during error handling).
26 Error,
27 /// The primal function which we will differentiate.
· · ·
26 Error,
27 /// The primal function which we will differentiate.
28 Source,
· · ·
113 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
114 match self {
115 DiffMode::Error => write!(f, "Error"),
116 DiffMode::Source => write!(f, "Source"),
117 DiffMode::Forward => write!(f, "Forward"),
· · ·
125/// Const is valid for all cases and means that we don't compute derivatives wrt. this output.
126/// That usually means we have a &mut or *mut T output and compute derivatives wrt. that arg,
127/// but this is too complex to verify here. Also it's just a logic error if users get this wrong.
128pub fn valid_ret_activity(mode: DiffMode, activity: DiffActivity) -> bool {
129 if activity == DiffActivity::None {
· · ·
132 }
133 match mode {
134 DiffMode::Error => false,
135 DiffMode::Source => false,
136 DiffMode::Forward => activity.is_dual_or_const(),
+ 2 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.