]> git.lizzy.rs Git - rust.git/commitdiff
add comment
authorlcnr <rust@lcnr.de>
Wed, 23 Nov 2022 16:39:51 +0000 (17:39 +0100)
committerlcnr <rust@lcnr.de>
Fri, 25 Nov 2022 10:59:08 +0000 (11:59 +0100)
compiler/rustc_middle/src/traits/select.rs

index 5bb8842ebe9ab9e3bba535a286c2ce42f3703be9..ec69864c951d4df347bb0befaf12df9587561fae 100644 (file)
 /// parameter environment.
 #[derive(PartialEq, Eq, Debug, Clone, TypeFoldable, TypeVisitable)]
 pub enum SelectionCandidate<'tcx> {
+    /// A builtin implementation for some specific traits, used in cases
+    /// where we cannot rely an ordinary library implementations.
+    ///
+    /// The most notable examples are `sized`, `Copy` and `Clone`. This is also
+    /// used for the `DiscriminantKind` and `Pointee` trait, both of which have
+    /// an associated type.
     BuiltinCandidate {
         /// `false` if there are no *further* obligations.
         has_nested: bool,