Skip to content

Commit

Permalink
Rollup merge of rust-lang#72532 - ratijas:dyn-trait-object-doc, r=jon…
Browse files Browse the repository at this point in the history
…as-schievink

Use `dyn` trait syntax in more comments and docs

Probably missed it out during earlier dyn refactoring.

033cbfe#diff-a0ba6bbf82d9ee83a4c9525873f85b04
  • Loading branch information
RalfJung committed May 24, 2020
2 parents cdeef96 + d1f4796 commit 67b4e2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcore/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
//! Their definition should always match the ABI defined in
//! `rustc_middle::ty::layout`.

/// The representation of a trait object like `&SomeTrait`.
/// The representation of a trait object like `&dyn SomeTrait`.
///
/// This struct has the same layout as types like `&SomeTrait` and
/// This struct has the same layout as types like `&dyn SomeTrait` and
/// `Box<dyn AnotherTrait>`.
///
/// `TraitObject` is guaranteed to match layouts, but it is not the
/// type of trait objects (e.g., the fields are not directly accessible
/// on a `&SomeTrait`) nor does it control that layout (changing the
/// definition will not change the layout of a `&SomeTrait`). It is
/// on a `&dyn SomeTrait`) nor does it control that layout (changing the
/// definition will not change the layout of a `&dyn SomeTrait`). It is
/// only designed to be used by unsafe code that needs to manipulate
/// the low-level details.
///
Expand Down

0 comments on commit 67b4e2b

Please sign in to comment.