diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-08-28 14:04:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-28 14:04:07 +0200 |
| commit | f318ba2d2fb542e0b1df9be38671dc64e3c07ab5 (patch) | |
| tree | 49b5287c613424374cd313650cdea74f2f8c0ff9 | |
| parent | 0ed8e16195658b839f6ff8f7b8ae719a42d2827e (diff) | |
| download | rust-f318ba2d2fb542e0b1df9be38671dc64e3c07ab5.tar.gz rust-f318ba2d2fb542e0b1df9be38671dc64e3c07ab5.zip | |
Warn about naively fixing the FIXME
| -rw-r--r-- | src/librustc/ty/layout.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs index c93ca836bef..4524c486272 100644 --- a/src/librustc/ty/layout.rs +++ b/src/librustc/ty/layout.rs @@ -1627,6 +1627,13 @@ impl<'a, 'tcx, C> TyLayoutMethods<'tcx, C> for Ty<'tcx> tcx.mk_array(tcx.types.usize, 3), ) /* FIXME use actual fn pointers + Warning: naively computing the number of entries in the + vtable by counting the methods on the trait + methods on + all parent traits does not work, because some methods can + be not object safe and thus excluded from the vtable. + Increase this counter if you tried to implement this but + failed to do it without duplicating a lot of code from + other places in the compiler: 2 tcx.mk_tup(&[ tcx.mk_array(tcx.types.usize, 3), tcx.mk_array(Option<fn()>), |
