diff options
| author | bors <bors@rust-lang.org> | 2023-09-13 22:21:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-13 22:21:27 +0000 |
| commit | d5c2e9c342b358556da91d61ed4133f6f50fc0c3 (patch) | |
| tree | deb699298bf1099d5cd455e3b03c70fe5db546cd /tests/rustdoc/inline_cross/auxiliary/dyn_trait.rs | |
| parent | 5680fa18feaa87f3ff04063800aec256c3d4b4be (diff) | |
| parent | 7900923b259380461d21071e2fbd0c604338fb9c (diff) | |
| download | rust-1.72.1.tar.gz rust-1.72.1.zip | |
Auto merge of #115787 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum 1.72.1
[stable] 1.72.1 release This backports: * Remove assert that checks type equality #115215 * implied bounds: do not ICE on unconstrained region vars #115559 * rustdoc: correctly deal with self ty params when eliding default object lifetimes #115276 * Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen #115236 * Normalize before checking if local is freeze in deduced_param_attrs #114948 Some cherry-picks required merge conflict resolution, we'll see if I got it right based on CI (rustdoc fix and LLVM codegen test). r? `@Mark-Simulacrum`
Diffstat (limited to 'tests/rustdoc/inline_cross/auxiliary/dyn_trait.rs')
| -rw-r--r-- | tests/rustdoc/inline_cross/auxiliary/dyn_trait.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/rustdoc/inline_cross/auxiliary/dyn_trait.rs b/tests/rustdoc/inline_cross/auxiliary/dyn_trait.rs index 644d0699e9d..df88530071b 100644 --- a/tests/rustdoc/inline_cross/auxiliary/dyn_trait.rs +++ b/tests/rustdoc/inline_cross/auxiliary/dyn_trait.rs @@ -65,3 +65,22 @@ pub trait HigherRankedBoundTrait1<'e> where for<'l> Self: 'e + 'l {} pub trait AmbiguousBoundTrait<'a, 'b>: 'a + 'b {} pub struct AmbiguousBoundWrapper<'a, 'b, T: ?Sized + 'a + 'b>(&'a T, &'b T); + +// Trait objects inside of another trait object, a trait bound or an associated type. + +pub trait Inner {} +pub trait Outer<T: ?Sized> {} +pub trait Base { + type Type<T: ?Sized>; +} +impl Base for () { + type Type<T: ?Sized> = (); +} + +pub type NestedTraitObjects = dyn Outer<dyn Inner>; + +pub fn apit_rpit(o: impl Outer<dyn Inner>) -> impl Outer<dyn Inner> { + o +} + +pub type AssocTy = <() as Base>::Type<dyn Inner>; |
