I use anyhow for errors in a codebase where errors in some parts are frequent but have had to disable backtracing/capture of stacktrace (they have horrible performance on windows) but still need to propagate the context of en error upwards.
My attempt to do this is to create a extension trait extending anyhow::Result with a method .at() togeather with a macro at!() (allows me to use the line! and file! macros) with the intended use as:
...
inner_function().at(at!("error while eating icecream"))?;
....
However, I'm struggling to get the type inference to work - does anyone have any idea why the floowing does not work / what I can do about it?