rust/compiler/rustc_builtin_macros
Dylan DPC bc9567fbf6
Rollup merge of #103445 - fmease:fix-50291, r=estebank
`#[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````
2022-11-11 20:51:38 +05:30
..
src Rollup merge of #103445 - fmease:fix-50291, r=estebank 2022-11-11 20:51:38 +05:30
Cargo.toml rustdoc: use ThinVec for cleaned generics 2022-11-02 16:17:22 -07:00