about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-05-23 16:44:27 +0530
committerGitHub <noreply@github.com>2023-05-23 16:44:27 +0530
commit4b26b80dd56f03affae07eeaffae5c284247a40b (patch)
treec16966b08c2f071298a914fbae738feace29521f /compiler/rustc_codegen_llvm/src
parent00185bec7ce88eae94adbc3185b802bfec8cad9a (diff)
parent3db2bcf4ebb08f7fbe3de7fded45e96639ca3e68 (diff)
downloadrust-4b26b80dd56f03affae07eeaffae5c284247a40b.tar.gz
rust-4b26b80dd56f03affae07eeaffae5c284247a40b.zip
Rollup merge of #111704 - compiler-errors:sized-return-cleanup, r=oli-obk
Remove return type sized check hack from hir typeck

Remove a bunch of special-cased suggestions when someone returns `-> dyn Trait` that checks for type equality, etc.

This was a pretty complex piece of code that also relied on a hack in hir typeck (see changes to `compiler/rustc_hir_typeck/src/check.rs`), and I'm not convinced that it's necessary to maintain, when all we really need to tell the user is that they should return `-> impl Trait` or `-> Box<dyn Trait>`, depending on their specific use-case.

This is necessary because we may need to move the "return type is sized" check from hir typeck to wfcheck, which does not have access to typeck results. This is a prerequisite for that, and I'm fairly confident that the diagnostics "regressions" here are not a big deal.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions