Skip to content

Mis-calculated spans #43796

Closed
Closed

Description

@aidanhs
[00:33:43] ERROR:rustc_save_analysis::dump_visitor: Mis-calculated spans for path 'AsRef<U>::as_ref'. Found 1 spans, expected 2. Found spans:
[00:33:43] ERROR:rustc_save_analysis::dump_visitor:     'as_ref' in /checkout/src/libcore/convert.rs, line 355

This has been seen in a few different places, e.g.

I don't think it actually causes build failures, but it seems suspicious and something that should be fixed. I'll use logobble to dig up some more tomorrowish.

Activity

  1. added
    C-bugCategory: This is a bug.
    T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.
    T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.
    A-save-analysisArea: saving results of analyses such as inference and borrowck results to a file.
    and removed on Aug 11, 2017
  2. Mark-Simulacrum commented on Aug 11, 2017

    @Mark-Simulacrum
    Member

    cc @nrc -- any ideas on what could be causing this?

  3. kennytm commented on Aug 12, 2017

    @kennytm
    Member

    The problem is that SpanUtils::spans_with_brackets (called from spans_for_path_segments) does not handle UFCS path at all. It will ignore everything between angle brackets, so input like <T as AsRef<U>>::as_ref will only produce the span for as_ref (one segment).

    However, the ast::Path of this will be AsRef<U>::as_ref (two segments), thus the mismatch error.

    Thanks to #40369, each PathSegment already contain the span, so we shouldn't need to use spans_for_path_segments anymore.

  4. added a commit that references this issue on Aug 14, 2017
    df511d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-save-analysisArea: saving results of analyses such as inference and borrowck results to a file.C-bugCategory: This is a bug.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions