about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>2017-03-11 21:57:42 +0200
committerGitHub <noreply@github.com>2017-03-11 21:57:42 +0200
commitc886815e949cefa9398b6c9c57a7126e743fe8eb (patch)
tree6ced918a44754b28dfbe7a3d03f22d2d97021b29 /src/test/run-pass/thinlto
parentb49036c7d016f1fdf99bec9b398f7f6c052d5464 (diff)
parentcfb41aedd3a5e21c169a0a91dfd600e8e370d291 (diff)
downloadrust-c886815e949cefa9398b6c9c57a7126e743fe8eb.tar.gz
rust-c886815e949cefa9398b6c9c57a7126e743fe8eb.zip
Rollup merge of #40319 - eddyb:it's-"unsize"-not-"unsound", r=nikomatsakis
Disallow subtyping between T and U in T: Unsize<U>.

Because `&mut T` can be coerced to `&mut U`, `T` and `U` must be unified invariantly. Fixes #40288.
E.g. coercing `&mut [&'a X; N]` to `&mut [&'b X]` must require `'a` be equal to `'b`, otherwise you can convert between `&'a X` and `&'b X` (in either direction), potentially unsoundly lengthening lifetimes.

Subtyping here was introduced with `Unsize` in #24619 (landed in 1.1, original PR is #23785).
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions