about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-27 16:46:52 +0100
committerGitHub <noreply@github.com>2019-10-27 16:46:52 +0100
commit53568f3fb34b20563ede4ffd792ea4564c08f3b8 (patch)
tree0842ad60d35c510ad710141a9b8f7f56ed044d88 /src/libstd
parenta466f014b50a49fc380e5c9d8878c937732b0fb2 (diff)
parent8f988bd92cf7d6d3e9be5310c18e472ba297e247 (diff)
downloadrust-53568f3fb34b20563ede4ffd792ea4564c08f3b8.tar.gz
rust-53568f3fb34b20563ede4ffd792ea4564c08f3b8.zip
Rollup merge of #65738 - ohadravid:re-rebalance-coherence-allow-fundamental-local, r=nikomatsakis
Coherence should allow fundamental types to impl traits when they are local

After #64414, `impl<T> Remote for Box<T> { }` is disallowed, but it is also disallowed in liballoc, where `Box` is a local type!

Enabling `#![feature(re_rebalance_coherence)]` in `liballoc` results in:
```
error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct<F>`)
    --> src\liballoc\boxed.rs:1098:1
     |
1098 | impl<F: ?Sized + Future + Unpin> Future for Box<F> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `F` must be used as the type parameter for some local type
```

This PR relaxes `uncover_fundamental_ty` to skip local fundamental types.
I didn't add a test since `liballoc` already fails to compile, but I can add one if needed.

r? @nikomatsakis

cc #63599
Diffstat (limited to 'src/libstd')
0 files changed, 0 insertions, 0 deletions