about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-11-25 17:04:58 +0100
committerGitHub <noreply@github.com>2018-11-25 17:04:58 +0100
commit6c2513c0d38c8690ef0d2f9d024fafa2391671db (patch)
treeaeaa819308ab9e8e89dc13360309c302c75ba67f /src/libsyntax
parent1aa3ffaf9912e2ba60295a28a820c38a78346dc5 (diff)
parentc6a803a286faae901a6ebd35ec222901f691c7ec (diff)
downloadrust-6c2513c0d38c8690ef0d2f9d024fafa2391671db.tar.gz
rust-6c2513c0d38c8690ef0d2f9d024fafa2391671db.zip
Rollup merge of #56045 - qnighy:additional-sizedness, r=cramertj
Check arg/ret sizedness at ExprKind::Path

This PR solves three problems:

- #50940: ICE on casting unsized tuple struct constructors
- Unsized tuple struct constructors were callable in presence of `unsized_locals`.
- https://github.com/rust-lang/rust/issues/48055#issuecomment-437178966: we cannot relax `Sized` bounds on stable functions because of fn ptr casting

These are caused by lack of `Sized`ness checks for arguments/retvals at **reference sites of `FnDef` items** (not call sites of the functions). Therefore we can basically add more `Sized` obligations on typeck. However, adding `Sized` obligations arbitrarily breaks type inference; to prevent that I added a new method `require_type_is_sized_deferred` which doesn't interfere usual type inference.
Diffstat (limited to 'src/libsyntax')
0 files changed, 0 insertions, 0 deletions