{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/23834","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/23834/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/23834/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/23834/events","html_url":"https://github.com/rust-lang/rust/issues/23834","id":65070076,"number":23834,"title":"Error: duplicate entry","user":{"login":"Virtlink","id":647530,"avatar_url":"https://avatars.githubusercontent.com/u/647530?v=3","gravatar_id":"","url":"https://api.github.com/users/Virtlink","html_url":"https://github.com/Virtlink","followers_url":"https://api.github.com/users/Virtlink/followers","following_url":"https://api.github.com/users/Virtlink/following{/other_user}","gists_url":"https://api.github.com/users/Virtlink/gists{/gist_id}","starred_url":"https://api.github.com/users/Virtlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Virtlink/subscriptions","organizations_url":"https://api.github.com/users/Virtlink/orgs","repos_url":"https://api.github.com/users/Virtlink/repos","events_url":"https://api.github.com/users/Virtlink/events{/privacy}","received_events_url":"https://api.github.com/users/Virtlink/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-03-29T15:23:32Z","updated_at":"2015-03-30T16:22:41Z","closed_at":"2015-03-30T16:22:41Z","body":"I'm using `libcore` and `liballoc` to build a freestanding kernel, and it used to work perfectly on 1.0.0-nightly (2b01a37ec 2015-02-21).\r\n\r\nBut since I updated my Rust and my `rust` submodule (including any dependencies) to the latest 1.0.0-nightly (c89de2c56 2015-03-28), I get a whole slew of these errors when building `liballoc` or anything that depends on it:\r\n\r\n       Compiling alloc v0.0.1 (file:///home/virtlink/projects/alloctest/lib/liballoc)\r\n    src/lib.rs:1:1: 1:1 error: duplicate entry for `const_ptr` [E0152]\r\n    src/lib.rs:1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT\r\n                 ^\r\n    src/lib.rs:1:1: 1:1 error: duplicate entry for `mut_ptr` [E0152]\r\n    src/lib.rs:1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT\r\n                 ^\r\n    src/lib.rs:1:1: 1:1 error: duplicate entry for `i8` [E0152]\r\n    src/lib.rs:1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT\r\n\r\n    ...\r\n\r\n    src/lib.rs:1:1: 1:1 error: duplicate entry for `non_zero` [E0152]\r\n    src/lib.rs:1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT\r\n                 ^\r\n    src/lib.rs:1:1: 1:1 error: duplicate entry for `debug_trait` [E0152]\r\n    src/lib.rs:1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT\r\n                 ^\r\n    error: aborting due to 58 previous errors\r\n    Could not compile `alloc`.\r\n\r\nI symlink `libcore` and `liballoc`, and add a `Cargo.toml` for each (see below). Here's a working reproduction of the issue:\r\n\r\n    cargo new alloctest\r\n    cd alloctest\r\n    mkdir -p lib/libcore\r\n    mkdir -p lib/liballoc\r\n    \r\n    git submodule add https://github.com/rust-lang/rust.git lib/rust\r\n    cd lib/rust\r\n    git checkout c89de2c56baeb61e7cc434924dcc8bedd32b26b8\r\n\r\n    cd ../libcore\r\n    ln -s ../rust/src/libcore/ src\r\n    \r\n    cat << EOF > Cargo.toml\r\n    [package]\r\n    name = \"core\"\r\n    version = \"0.0.1\"\r\n    authors = [ \"some@example.com\" ]\r\n    EOF\r\n\r\n    cd ../liballoc\r\n    ln -s ../rust/src/liballoc/ src\r\n    \r\n    cat << EOF > Cargo.toml\r\n    [package]\r\n    name = \"alloc\"\r\n    version = \"0.0.1\"\r\n    authors = [ \"some@example.com\" ]\r\n\r\n    [features]\r\n    external_funcs = []\r\n\r\n    [dependencies.core]\r\n    path = \"../libcore\"\r\n    EOF\r\n\r\n    cargo build"}}