705435fe01
Still-further-specializable projections are ambiguous in new solver Fixes https://github.com/rust-lang/rust/pull/108896/files#r1148450781 r? ``@BoxyUwU`` (though feel free to re-roll) --- This can be used to create an unsound transmute function with the new solver: ```rust #![feature(specialization)] trait Default { type Id; fn intu(&self) -> &Self::Id; } impl<T> Default for T { default type Id = T; fn intu(&self) -> &Self::Id { self } } fn transmute<T: Default<Id = U>, U: Copy>(t: T) -> U { *t.intu() } use std::num::NonZeroU8; fn main() { let s = transmute::<u8, Option<NonZeroU8>>(0); assert_eq!(s, None); } ``` |
||
---|---|---|
.. | ||
assembly | ||
auxiliary | ||
codegen | ||
codegen-units | ||
debuginfo | ||
incremental | ||
mir-opt | ||
pretty | ||
run-make | ||
run-make-fulldeps | ||
run-pass-valgrind | ||
rustdoc | ||
rustdoc-gui | ||
rustdoc-js | ||
rustdoc-js-std | ||
rustdoc-json | ||
rustdoc-ui | ||
ui | ||
ui-fulldeps | ||
COMPILER_TESTS.md |