rust/tests
bors 0cc541e4b2 Auto merge of #108860 - oli-obk:tait_alias, r=compiler-errors
Add `AliasKind::Weak` for type aliases.

`type Foo<T: Debug> = Bar<T>;` does not check `T: Debug` at use sites of `Foo<NotDebug>`, because in contrast to a

```rust
trait Identity {
    type Identity;
}
impl<T: Debug> Identity for T {
    type Identity = T;
}
<NotDebug as Identity>::Identity
```

type aliases do not exist in the type system, but are expanded to their aliased type immediately when going from HIR to the type layer.

Similarly:

* a private type alias for a public type is a completely fine thing, even though it makes it a bit hard to write out complex times sometimes
* rustdoc expands the type alias, even though often times users use them for documentation purposes
* diagnostics show the expanded type, which is confusing if the user wrote a type alias and the diagnostic talks about another type that they don't know about.

For type alias impl trait, these issues do not actually apply in most cases, but sometimes you have a type alias impl trait like `type Foo<T: Debug> = (impl Debug, Bar<T>);`, which only really checks it for `impl Debug`, but by accident prevents `Bar<T>` from only being instantiated after proving `T: Debug`. This PR makes sure that we always check these bounds explicitly and don't rely on an implementation accident.

To not break all the type aliases out there, we only use it when the type alias contains an opaque type. We can decide to do this for all type aliases over an edition.

Or we can later extend this to more types if we figure out the back-compat concerns with suddenly checking such bounds.

As a side effect, easily allows fixing https://github.com/rust-lang/rust/issues/108617, which I did.

fixes https://github.com/rust-lang/rust/issues/108617
2023-06-17 00:33:29 +00:00
..
assembly Fix linkage for large binaries on mips64 platforms ... 2023-05-29 10:57:03 -06:00
auxiliary
codegen Rollup merge of #112474 - ldm0:ldm_enum_debuginfo_128_support, r=compiler-errors 2023-06-16 12:53:22 -07:00
codegen-units
debuginfo Add multiple borrow test. 2023-05-13 10:32:32 +00:00
incremental Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
mir-opt Ignore the always part of #[inline(always)] in MIR inlining 2023-06-16 11:36:02 -04:00
pretty
run-make Auto merge of #112346 - saethlin:no-comment, r=oli-obk 2023-06-16 01:55:34 +00:00
run-make-fulldeps Auto merge of #111626 - pjhades:output, r=b-naber 2023-06-09 09:45:40 +00:00
run-pass-valgrind
rustdoc Rollup merge of #112304 - GuillaumeGomez:re-exports, r=notriddle 2023-06-15 17:52:36 +02:00
rustdoc-gui Auto merge of #110688 - GuillaumeGomez:result-search-type, r=notriddle,jsha 2023-06-16 15:02:22 +00:00
rustdoc-js Auto merge of #112233 - notriddle:notriddle/search-unify, r=GuillaumeGomez 2023-06-15 03:04:46 +00:00
rustdoc-js-std Auto merge of #112233 - notriddle:notriddle/search-unify, r=GuillaumeGomez 2023-06-15 03:04:46 +00:00
rustdoc-json Serialize all enums as externally tagged to guarantee compatibility with binary formats such as bincode or postcard 2023-05-22 18:22:08 +01:00
rustdoc-ui rustdoc: get unnormalized link destination for suggestions 2023-05-26 18:38:46 -07:00
ui Auto merge of #108860 - oli-obk:tait_alias, r=compiler-errors 2023-06-17 00:33:29 +00:00
ui-fulldeps Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
COMPILER_TESTS.md