Skip to content

Commit 84e9790

Browse files
committed
add comment
1 parent 31431cc commit 84e9790

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_middle/src/traits/select.rs

+6
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ pub type EvaluationCache<'tcx> = Cache<
105105
/// parameter environment.
106106
#[derive(PartialEq, Eq, Debug, Clone, TypeFoldable, TypeVisitable)]
107107
pub enum SelectionCandidate<'tcx> {
108+
/// A builtin implementation for some specific traits, used in cases
109+
/// where we cannot rely an ordinary library implementations.
110+
///
111+
/// The most notable examples are `sized`, `Copy` and `Clone`. This is also
112+
/// used for the `DiscriminantKind` and `Pointee` trait, both of which have
113+
/// an associated type.
108114
BuiltinCandidate {
109115
/// `false` if there are no *further* obligations.
110116
has_nested: bool,

0 commit comments

Comments
 (0)