Skip to content

Never getting None from proc_macro::Span::join #47148

Closed
@dtolnay

Description

@dtolnay

This doesn't look right -- both sides of the comparison use self.0.lo().

pub fn join(&self, other: Span) -> Option<Span> {
let self_loc = __internal::lookup_char_pos(self.0.lo());
let other_loc = __internal::lookup_char_pos(self.0.lo());
if self_loc.file.name != other_loc.file.name { return None }

Mentioning @abonander, mentioning #38356

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler 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