]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #59445 - alexreg:ban-multi-trait-objects-via-aliases, r=oli-obk
authorbors <bors@rust-lang.org>
Wed, 22 May 2019 08:22:17 +0000 (08:22 +0000)
committerbors <bors@rust-lang.org>
Wed, 22 May 2019 08:22:17 +0000 (08:22 +0000)
Ban multi-trait objects via trait aliases

Obviously, multi-trait objects are not normally supported, so they should not be supported via trait aliases.

This has been factored out from the previous PR https://github.com/rust-lang/rust/pull/55994 (see point 1).

r? @Centril

CC @nikomatsakis

------------------

### RELNOTES:

We now allow `dyn Send + fmt::Debug` with equivalent semantics to `dyn fmt::Debug + Send`.
That is, the order of the mentioned traits does not matter wrt. principal/not-principal traits.
This is a small change that might deserve a mention in the blog post because it is a language change but most likely not.

See https://github.com/rust-lang/rust/blob/ce2ee305f9165c037ecddddb5792588a15ff6c37/src/test/ui/traits/wf-trait-object-reverse-order.rs.

// @Centril


No differences found