Skip to content

Commit c7373ef

Browse files
committed
Renamed "downcast_trait" to "try_as_dyn", added documentation, including recursion limit docs
1 parent 1a1a6b8 commit c7373ef

File tree

5 files changed

+5
-115
lines changed

5 files changed

+5
-115
lines changed

library/core/src/intrinsics/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,6 +2761,11 @@ pub unsafe fn vtable_align(ptr: *const ()) -> usize;
27612761
/// In some cases, that resolution can exceed the recursion limit,
27622762
/// and compilation will fail instead of this function returning `None`.
27632763
///
2764+
/// # Compile-time failures
2765+
/// Determining whether `T` implements `U` requires trait resolution by the compiler.
2766+
/// In some cases, that resolution can exceed the recursion limit,
2767+
/// and compilation will fail *instead of* this function returning `None`.
2768+
///
27642769
/// # Safety
27652770
///
27662771
/// `ptr` must point to a vtable.

tests/ui/any/downcast_trait.rs

Lines changed: 0 additions & 29 deletions
This file was deleted.

tests/ui/any/downcast_trait_err1.rs

Lines changed: 0 additions & 34 deletions
This file was deleted.

tests/ui/any/downcast_trait_err2.rs

Lines changed: 0 additions & 32 deletions
This file was deleted.

tests/ui/any/downcast_trait_mut.rs

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)