Handle conflicting import of items declared in the same module

Fixes #19498
librustc: Don't reuse same alloca for match on struct/tuple field which we reassign to in match body.
Add doctests for union, diff, sym_diff, and intersection.

Add a rustdoc test for union to exhibit how it is used.

There is already a test for union in the test namespace, but this commit
adds a doctest that will appear in the rustdocs.

Add a doctest for the difference function.

Add a doctest for the symmetric_difference function.

Add a doctest for the intersection function.

Update the union et al. doctests based on @Gankro's comments.

Make the union et al. doctests a bit more readable.
Implement BitOps for TreeSet
rustc: check supertraits for object safety

Closes #18959

Technically, this causes code that once compiled to no longer compile, but
that code probably never ran.

[breaking-change]
libcollections: remove unnecessary `as_slice()` calls
liballoc: remove unnecessary `as_slice()` calls
libcoretest: remove unnecessary `as_slice()` calls
libflate: remove unnecessary `as_slice()` calls
libfmt_macros: remove unnecessary `as_slice()` calls
libgetops: remove unnecessary `as_slice()` calls
libgraphviz: remove unnecessary `as_slice()` calls
liblog: remove unnecessary `as_slice` calls
libregex: remove unnecessary `as_slice` calls
libregex_macros: remove unnecessary `as_slice` calls
librustc: remove unnecessary `as_slice()` calls
librustc_back: remove unnecessary `as_slice()` calls
librustc_trans: remove unnecessary `as_slice` calls
librustdoc: remove unnecessary `as_slice()` calls
libserialize: remove unnecessary `as_slice()` calls