about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-06-20 14:44:52 -0700
committerGitHub <noreply@github.com>2020-06-20 14:44:52 -0700
commit1a171d0d5b4b76170da94858869e42ebb6e2ced2 (patch)
tree5b0d30b01b14d0f25366d25c9a66b642313dc2af /library/std/src/sys/unix/stack_overflow.rs
parenta1404a93f9632d768d7268934e6380a9b9614834 (diff)
parent5e8c9f4fae106d0ba836a0268ab4e44c19d63f2a (diff)
downloadrust-1a171d0d5b4b76170da94858869e42ebb6e2ced2.tar.gz
rust-1a171d0d5b4b76170da94858869e42ebb6e2ced2.zip
Rollup merge of #72788 - matthewjasper:projection-bound-validation, r=nikomatsakis
Projection bound validation

During selection we use bounds declared on associated types (e.g. `type X: Copy`) to satisfy trait/projection bounds. This would be fine so long as those bounds are checked on any impls/trait objects. For simple cases they are because the bound `Self::X: Copy` gets normalized when we check the impl.

However, for default values with specialization and higher-ranked bounds from GATs or otherwise, we can't normalize when checking the impl, and so we use the bound from the trait to prove that the bound applies to the impl, which is clearly unsound.

This PR makes 2 fixes for this:

1. Requiring that the bounds on the trait apply to a projection type with the corresponding substs, so a bound `for<'a> <Self as X<'a>>::U: Copy` on the trait cannot be used to prove `<T as X<'_>>::U: Copy`.
2. Actually checking that the bounds that we still allow apply to generic/default associated types.

Opening for a crater run.

Closes #68641
Closes #68642
Closes #68643
Closes #68644
Closes #68645
Closes #68656

r? @ghost
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions