Skip to content

duplicate definition of module core with bad span #2274

Closed
@brson

Description

@brson

A crate that uses the core library gets a mysterious error message with a dummy span.

#[link(name = "rustmeta",                                                                                                                                                     
       vers = "0.2",                                                                                                                                                          
       uuid = "f19085c3-dd45-467d-b76b-cb07e5ecd13c")];                                                                                                                       

#[crate_type = "lib"];                                                                                                                                                        

use core(vers = "0.2");                                                                                                                                                       
use std(vers = "0.2");                                                                                                                                                        
use rustsyntax(vers = "0.2");                                                                                                                                                 

import core::*;                                                                                                                                                               
import syntax = rustsyntax;
../src/librustmeta/rustmeta.rc:1:0: 1:0 error: duplicate definition of module core
../src/librustmeta/rustmeta.rc:1 #[link(name = "rustmeta",

We know this happened because of the injected core library, so we should say so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions