about summary refs log tree commit diff
path: root/library/std/src/sys/windows/stack_overflow_uwp.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-25 23:37:07 +0000
committerbors <bors@rust-lang.org>2020-07-25 23:37:07 +0000
commitbb85981a3ac31c32d2f5924eb812c0a71baabf38 (patch)
tree3d4e1f293f43cfea473ae9b52e7b41dba9932963 /library/std/src/sys/windows/stack_overflow_uwp.rs
parentd6953df14657f5932270ad2b33bccafe6f39fad4 (diff)
parente35d2867f14a36094bdceadc731fdd1d26882fc9 (diff)
downloadrust-bb85981a3ac31c32d2f5924eb812c0a71baabf38.tar.gz
rust-bb85981a3ac31c32d2f5924eb812c0a71baabf38.zip
Auto merge of #74670 - tmandry:issue-73818, r=matthewjasper
Normalize bounds fully when checking defaulted types

When checking that the default type for `<T as X>::Y` is valid in this example:

```
trait X { type Y: PartialEq<<Self as X>::Y> }
impl X for T { default type Y = S; }
```

We will have to prove the bound `S: PartialEq<<T as X>::Y>`. In this case
we want `<T as X>::Y` to normalize to `S`. This is valid because we are
checking the default value specifically here. Add `<T as X>::Y = S` to the
ParamEnv for normalization _of the bound we are checking_ only.

Fixes #73818.

---

I noticed that adding this to the env for bounds checking didn't break any tests. Not sure if this is because we can't rely on it to prove anything, or because of missing test coverage.

r? @matthewjasper, @nikomatsakis
Diffstat (limited to 'library/std/src/sys/windows/stack_overflow_uwp.rs')
0 files changed, 0 insertions, 0 deletions