Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: Don't panic on ambiguous inherent associated types #88573

Merged
merged 1 commit into from
Sep 2, 2021

Commits on Sep 1, 2021

  1. rustdoc: Don't panic on ambiguous inherent associated types

    Instead, return `Type::Infer` since compilation should fail anyway.
    That's how rustdoc handles `hir::TyKind::Err`s, so this just extends
    that behavior to `ty::Err`s when analyzing associated types.
    
    For some reason, the error is printed twice with rustdoc (though only
    once with rustc). I'm not sure why that is, but it's better than
    panicking.
    
    This commit also makes rustdoc fail early in the non-projection,
    non-error case, instead of returning a `Res::Err` that would likely
    cause rustdoc to panic later on. This change is originally from rust-lang#88379.
    camelid committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    50983ba View commit details
    Browse the repository at this point in the history