From 1895e52505b59f49e6675376c44ad8e251c4501c Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 24 Nov 2020 17:05:54 -0300 Subject: [PATCH] Fix super_traits_of API doc --- compiler/rustc_typeck/src/collect.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_typeck/src/collect.rs b/compiler/rustc_typeck/src/collect.rs index 6cd4acf5de62..1ee29001c846 100644 --- a/compiler/rustc_typeck/src/collect.rs +++ b/compiler/rustc_typeck/src/collect.rs @@ -1115,9 +1115,9 @@ fn super_predicates_that_define_assoc_type( } } -/// Ensures that the super traits of the trait with a `DefId` -/// of `trait_def_id` are converted and stored. This also ensures that -/// the transitive super traits are converted. +/// Computes the def-ids of the transitive super-traits of `trait_def_id`. This (intentionally) +/// does not compute the full elaborated super-predicates but just the set of def-ids. It is used +/// to identify which traits may define a given associated type to help avoid cycle errors. fn super_traits_of(tcx: TyCtxt<'_>, trait_def_id: DefId) -> FxHashSet { let mut set = FxHashSet::default(); let mut stack = vec![trait_def_id];