mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
bc9567fbf6
`#[test]`: Point at return type if `Termination` bound is unsatisfied Together with #103142 (already merged) this fully fixes #50291. I don't consider my current solution of changing a few spans “here and there” very clean since the failed obligation is a `FunctionArgumentObligation` and we point at a type instead of a function argument. If you agree with me on this point, I can offer to keep the spans of the existing nodes and instead inject `let _: AssertRetTyIsTermination<$ret_ty>;` (type to be defined in `libtest`) similar to `AssertParamIsEq` etc. used by some built-in derive-macros. I haven't tried that approach yet though and cannot promise that it would actually work out or be “cleaner” for that matter. ````@rustbot```` label A-libtest A-diagnostics r? ````@estebank```` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |