{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/rustup.rs/issues/809","repository_url":"https://api.github.com/repos/rust-lang-nursery/rustup.rs","labels_url":"https://api.github.com/repos/rust-lang-nursery/rustup.rs/issues/809/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rustup.rs/issues/809/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/rustup.rs/issues/809/events","html_url":"https://github.com/rust-lang-nursery/rustup.rs/issues/809","id":189007540,"number":809,"title":"Cargo uses \"its rustc\" rather than the one mandated by the `rustup toolchain`","user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars.githubusercontent.com/u/5018213?v=3","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-14T00:38:34Z","updated_at":"2016-12-03T21:11:50Z","closed_at":"2016-11-23T00:01:24Z","body":"There's this text in the README:\r\n\r\n> Because the rust-lang/rust tree does not include Cargo, when cargo is invoked for a custom toolchain and it is not available, rustup will attempt to use cargo from one of the release channels, preferring 'nightly', then 'beta' or 'stable'.\r\n\r\nAnd rustup does what it says: It uses e.g. stable Cargo if the custom toolchain doesn't include a Cargo *but* that Cargo uses e.g. stable rustc rather than the rustc in the custom toolchain.\r\n\r\nI think this is a regression because I remember this used to \"work\". As in Cargo used the custom toolchain rustc.\r\n\r\n### STR\r\n\r\nSorry this is a little convoluted but avoids having to bootstrap a new rustc to show tho bug:\r\n\r\n```\r\n# Install and switch to the nightly toolchain\r\n$ rustup default nightly\r\n\r\n# Create a \"custom\" toolchain which is actually just the nightly toolchain minus Cargo\r\n$ mkdir -p ~/tmp && cd $_\r\n\r\n$ cp -r $(rustc --print sysroot)/../nightly-x86_64-unknown-linux-gnu .\r\n\r\n$ rm nightly-x86_64-unknown-linux-gnu/bin/cargo\r\n\r\n$ rustup toolchain link custom nightly-x86_64-unknown-linux-gnu\r\n\r\n# Install and switch to the stable toolchain\r\n$ rustup default stable\r\n\r\n# Remove the nightly toolchain\r\n# (to make rustup fall back to stable Cargo rather than to the nightly Cargo)\r\n$ rustup toolchain remove nightly\r\n\r\n# Switch to the custom toolchain\r\n$ rustup toolchain default custom\r\n\r\n# Finally, show the bug\r\n$ cargo new --bin app && cd $_\r\n\r\n$ edit src/main.rs && cat $_\r\n#![feature(no_core)]\r\nfn main() {\r\n    println!(\"Hello, world!\");\r\n}\r\n\r\n# custom (nightly) rustc\r\n$ rustc -V\r\nrustc 1.14.0-nightly (cae6ab1c4 2016-11-05)\r\n\r\n# stable Cargo\r\n$ cargo -V\r\ncargo 0.13.0-nightly (eca9e15 2016-11-01)\r\n\r\n# Cargo uses the STABLE rustc rather than the \"custom\" rustc!\r\n$ cargo build\r\n   Compiling app v0.1.0 (file:///home/japaric/tmp/app)\r\nerror[E0554]: #[feature] may not be used on the stable release channel\r\n --> src/main.rs:1:1\r\n  |\r\n1 | #![feature(no_core)]\r\n  | ^^^^^^^^^^^^^^^^^^^^\r\n\r\nerror: aborting due to previous error\r\n\r\nerror: Could not compile `app`.\r\n\r\nTo learn more, run the command again with --verbose.\r\n```\r\n\r\ncc @brson "},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/rustup.rs/issues/comments/264665798","html_url":"https://github.com/rust-lang-nursery/rustup.rs/issues/809#issuecomment-264665798","issue_url":"https://api.github.com/repos/rust-lang-nursery/rustup.rs/issues/809","id":264665798,"user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars.githubusercontent.com/u/5018213?v=3","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"created_at":"2016-12-03T21:11:50Z","updated_at":"2016-12-03T21:11:50Z","body":"@brson Could we get a new rustup release that contains this fix? A few rustc devs have hit this bug while testing their rustc changes. (Some of us use `rustup toolchain link` to test dev rustcs with Cargo)"}}
{"actor":{"display_login":"japaric"}}