Update (doc) comments
Several (doc) comments were super outdated or didn't provide enough context. Some doc comments shoved everything in a single paragraph without respecting the fact that the first paragraph should be a single sentence because rustdoc treats these as item descriptions / synopses on module pages.
This commit is contained in:
parent
05d48b936f
commit
82c2c8deb1
36 changed files with 332 additions and 252 deletions
|
@ -382,8 +382,8 @@ fn check_opaque_meets_bounds<'tcx>(
|
|||
Ok(()) => {}
|
||||
Err(ty_err) => {
|
||||
// Some types may be left "stranded" if they can't be reached
|
||||
// from an astconv'd bound but they're mentioned in the HIR. This
|
||||
// will happen, e.g., when a nested opaque is inside of a non-
|
||||
// from a lowered rustc_middle bound but they're mentioned in the HIR.
|
||||
// This will happen, e.g., when a nested opaque is inside of a non-
|
||||
// existent associated type, like `impl Trait<Missing = impl Trait>`.
|
||||
// See <tests/ui/impl-trait/stranded-opaque.rs>.
|
||||
let ty_err = ty_err.to_string(tcx);
|
||||
|
|
|
@ -746,7 +746,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
|
|||
|
||||
// We may not collect all RPITITs that we see in the HIR for a trait signature
|
||||
// because an RPITIT was located within a missing item. Like if we have a sig
|
||||
// returning `-> Missing<impl Sized>`, that gets converted to `-> [type error]`,
|
||||
// returning `-> Missing<impl Sized>`, that gets converted to `-> {type error}`,
|
||||
// and when walking through the signature we end up never collecting the def id
|
||||
// of the `impl Sized`. Insert that here, so we don't ICE later.
|
||||
for assoc_item in tcx.associated_types_for_impl_traits_in_associated_fn(trait_m.def_id) {
|
||||
|
|
|
@ -760,7 +760,7 @@ impl<'tcx> RegionResolutionVisitor<'tcx> {
|
|||
|
||||
fn enter_node_scope_with_dtor(&mut self, id: hir::ItemLocalId) {
|
||||
// If node was previously marked as a terminating scope during the
|
||||
// recursive visit of its parent node in the AST, then we need to
|
||||
// recursive visit of its parent node in the HIR, then we need to
|
||||
// account for the destruction scope representing the scope of
|
||||
// the destructors that run immediately after it completes.
|
||||
if self.terminating_scopes.contains(&id) {
|
||||
|
|
|
@ -272,7 +272,7 @@ fn check_item<'tcx>(tcx: TyCtxt<'tcx>, item: &'tcx hir::Item<'tcx>) -> Result<()
|
|||
}
|
||||
Some(ty::ImplPolarity::Negative) => {
|
||||
let ast::ImplPolarity::Negative(span) = impl_.polarity else {
|
||||
bug!("impl_polarity query disagrees with impl's polarity in AST");
|
||||
bug!("impl_polarity query disagrees with impl's polarity in HIR");
|
||||
};
|
||||
// FIXME(#27579): what amount of WF checking do we need for neg impls?
|
||||
if let hir::Defaultness::Default { .. } = impl_.defaultness {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue