{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/200458092","pull_request_review_id":134780380,"id":200458092,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDQ1ODA5Mg==","diff_hunk":"@@ -0,0 +1,179 @@\n+- Feature Name: min_rust_version\n+- Start Date: 2018-06-28\n+- RFC PR: (leave this empty)\n+- Rust Issue: (leave this empty)\n+\n+# Summary\n+[summary]: #summary\n+\n+Add `rust` field to the package section of `Cargo.toml` which will be used to\n+specify crate's Minimum Supported Rust Version (MSRV):\n+```toml\n+[package]\n+name = \"foo\"\n+version = \"0.1.0\"\n+rust = \"1.30\"\n+```\n+\n+# Motivation\n+[motivation]: #motivation\n+\n+Currently crates have no way to formally specify MSRV. As a result users can't\n+check if crate can be built on their toolchain without building it. It also\n+leads to the debate on how to handle crate version change on bumping MSRV,\n+conservative approach is to consider such changes as breaking ones, which can\n+hinder adoption of new features across ecosystem or result in version number\n+inflation, which makes it harder to keep downstream crates up-to-date. More\n+relaxed approach on another hand can result in broken crates for user of older\n+compiler versions.\n+\n+# Guide-level explanation\n+[guide-level-explanation]: #guide-level-explanation\n+\n+`cargo init` will automatically create `Cargo.toml` with `rust` field equal to\n+`rust=\"stable\"` or `rust=\"nightly\"` depending on the currently used toolcahin.\n+On `cargo publish` cargo will take  currently used Rust compiler version and\n+will insert it before uploading the crate. In other words localy your `Cargo.toml`\n+willl still have `rust=\"stable\"`, but version sent to crates.io will have\n+`rust=\"1.30\"` if you've used Rust 1.30. This version will be used to determine if\n+crate can be used with the crate user's toolchain and to select appropriate\n+dependency versions. In case if you have `rust=\"stable\"`, but execute\n+`cargo publish` with Nigthly toolcahin you will get an error.\n+\n+If you are sure that your crate supports older Rust versions (e.g. by using CI\n+testing) you can change `rust` field accordingly. On `cargo publish` it will be\n+checked that crate indeed can be built with the specified version. (though this\n+check can be disabled with `--no-verify` option)\n+\n+For example, lets imagine that your crate depends on crate `foo` with 10 published\n+versions from `0.1.0` to `0.1.10`, in versions from `0.1.0` to `0.1.5` `rust`\n+field in the `Cargo.toml` sent to crates.io equals to \"1.30\" and for others to\n+\"1.40\". Now if you'll build your project with Rust 1.33 `cargo` will select\n+`foo v0.1.5`, and `foo v0.1.10` if you'll build your project with Rust 1.30 or\n+later. But if you'll try to build your project with Rust 1.29 cargo will issue an\n+error. Although this check can be disabled with `--no-rust-check` option.\n+\n+`rust` field should respect the following minimal requirements:\n+- value should be equal to \"stable\", \"nigthly\" or to a version in semver format\n+(\"1.50\" is a valid value and implies \"1.50.0\")\n+- version should not be bigger than the current stable toolchain","path":"text/0000-min-rust-version.md","position":59,"original_position":59,"commit_id":"4ec9682a9f2c2697eedbdb06350fa5701fd0e862","original_commit_id":"4ec9682a9f2c2697eedbdb06350fa5701fd0e862","user":{"login":"newpavlov","id":329626,"node_id":"MDQ6VXNlcjMyOTYyNg==","avatar_url":"https://avatars0.githubusercontent.com/u/329626?v=4","gravatar_id":"","url":"https://api.github.com/users/newpavlov","html_url":"https://github.com/newpavlov","followers_url":"https://api.github.com/users/newpavlov/followers","following_url":"https://api.github.com/users/newpavlov/following{/other_user}","gists_url":"https://api.github.com/users/newpavlov/gists{/gist_id}","starred_url":"https://api.github.com/users/newpavlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newpavlov/subscriptions","organizations_url":"https://api.github.com/users/newpavlov/orgs","repos_url":"https://api.github.com/users/newpavlov/repos","events_url":"https://api.github.com/users/newpavlov/events{/privacy}","received_events_url":"https://api.github.com/users/newpavlov/received_events","type":"User","site_admin":false},"body":"No, I meant stable. If we have stable Rust 1.35 and nightly 1.37, using `rust=\"1.37\"` implying nightly toolchain will result in an ambiguity when stable Rust 1.37 will be published. So if crate depends on Nightly features, then it will have to use `rust=\"nightly\"/\"nightly: ...\"`.","created_at":"2018-07-05T19:05:47Z","updated_at":"2018-07-05T19:05:47Z","html_url":"https://github.com/rust-lang/rfcs/pull/2495#discussion_r200458092","pull_request_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2495","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/200458092"},"html":{"href":"https://github.com/rust-lang/rfcs/pull/2495#discussion_r200458092"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/2495"}},"in_reply_to_id":200419886},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2495","id":199274965,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5Mjc0OTY1","html_url":"https://github.com/rust-lang/rfcs/pull/2495","diff_url":"https://github.com/rust-lang/rfcs/pull/2495.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/2495.patch","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2495","number":2495,"state":"open","locked":false,"title":"RFC: Minimum Supported Rust Version","user":{"login":"newpavlov","id":329626,"node_id":"MDQ6VXNlcjMyOTYyNg==","avatar_url":"https://avatars0.githubusercontent.com/u/329626?v=4","gravatar_id":"","url":"https://api.github.com/users/newpavlov","html_url":"https://github.com/newpavlov","followers_url":"https://api.github.com/users/newpavlov/followers","following_url":"https://api.github.com/users/newpavlov/following{/other_user}","gists_url":"https://api.github.com/users/newpavlov/gists{/gist_id}","starred_url":"https://api.github.com/users/newpavlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newpavlov/subscriptions","organizations_url":"https://api.github.com/users/newpavlov/orgs","repos_url":"https://api.github.com/users/newpavlov/repos","events_url":"https://api.github.com/users/newpavlov/events{/privacy}","received_events_url":"https://api.github.com/users/newpavlov/received_events","type":"User","site_admin":false},"body":"This RFC adds an ability to specify Minimum Supported Rust Version (MSRV) in `Cargo.toml` using  `rust` field:\r\n```toml\r\n[package]\r\nname = \"foo\"\r\nversion = \"0.1.0\"\r\nedition = \"2018\"\r\nrust = \"1.35\"\r\n```\r\n\r\n[Rendered](https://github.com/newpavlov/rfcs/blob/msrv/text/0000-min-rust-version.md)\r\n\r\n[Internals discussion](https://internals.rust-lang.org/t/pre-pre-rfc-reviving-minimum-rust-version/7783)","created_at":"2018-07-04T15:03:12Z","updated_at":"2018-07-05T19:05:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71839a89209dfc5fdef40973d486a8b509ca2785","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":609102208,"node_id":"MDU6TGFiZWw2MDkxMDIyMDg=","url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-cargo","name":"T-cargo","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2495/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2495/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2495/comments","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/4ec9682a9f2c2697eedbdb06350fa5701fd0e862","head":{"label":"newpavlov:msrv","ref":"msrv","sha":"4ec9682a9f2c2697eedbdb06350fa5701fd0e862","user":{"login":"newpavlov","id":329626,"node_id":"MDQ6VXNlcjMyOTYyNg==","avatar_url":"https://avatars0.githubusercontent.com/u/329626?v=4","gravatar_id":"","url":"https://api.github.com/users/newpavlov","html_url":"https://github.com/newpavlov","followers_url":"https://api.github.com/users/newpavlov/followers","following_url":"https://api.github.com/users/newpavlov/following{/other_user}","gists_url":"https://api.github.com/users/newpavlov/gists{/gist_id}","starred_url":"https://api.github.com/users/newpavlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newpavlov/subscriptions","organizations_url":"https://api.github.com/users/newpavlov/orgs","repos_url":"https://api.github.com/users/newpavlov/repos","events_url":"https://api.github.com/users/newpavlov/events{/privacy}","received_events_url":"https://api.github.com/users/newpavlov/received_events","type":"User","site_admin":false},"repo":{"id":101515473,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE1MTU0NzM=","name":"rfcs","full_name":"newpavlov/rfcs","owner":{"login":"newpavlov","id":329626,"node_id":"MDQ6VXNlcjMyOTYyNg==","avatar_url":"https://avatars0.githubusercontent.com/u/329626?v=4","gravatar_id":"","url":"https://api.github.com/users/newpavlov","html_url":"https://github.com/newpavlov","followers_url":"https://api.github.com/users/newpavlov/followers","following_url":"https://api.github.com/users/newpavlov/following{/other_user}","gists_url":"https://api.github.com/users/newpavlov/gists{/gist_id}","starred_url":"https://api.github.com/users/newpavlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newpavlov/subscriptions","organizations_url":"https://api.github.com/users/newpavlov/orgs","repos_url":"https://api.github.com/users/newpavlov/repos","events_url":"https://api.github.com/users/newpavlov/events{/privacy}","received_events_url":"https://api.github.com/users/newpavlov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/newpavlov/rfcs","description":"RFCs for changes to Rust","fork":true,"url":"https://api.github.com/repos/newpavlov/rfcs","forks_url":"https://api.github.com/repos/newpavlov/rfcs/forks","keys_url":"https://api.github.com/repos/newpavlov/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/newpavlov/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/newpavlov/rfcs/teams","hooks_url":"https://api.github.com/repos/newpavlov/rfcs/hooks","issue_events_url":"https://api.github.com/repos/newpavlov/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/newpavlov/rfcs/events","assignees_url":"https://api.github.com/repos/newpavlov/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/newpavlov/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/newpavlov/rfcs/tags","blobs_url":"https://api.github.com/repos/newpavlov/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/newpavlov/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/newpavlov/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/newpavlov/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/newpavlov/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/newpavlov/rfcs/languages","stargazers_url":"https://api.github.com/repos/newpavlov/rfcs/stargazers","contributors_url":"https://api.github.com/repos/newpavlov/rfcs/contributors","subscribers_url":"https://api.github.com/repos/newpavlov/rfcs/subscribers","subscription_url":"https://api.github.com/repos/newpavlov/rfcs/subscription","commits_url":"https://api.github.com/repos/newpavlov/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/newpavlov/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/newpavlov/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/newpavlov/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/newpavlov/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/newpavlov/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/newpavlov/rfcs/merges","archive_url":"https://api.github.com/repos/newpavlov/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/newpavlov/rfcs/downloads","issues_url":"https://api.github.com/repos/newpavlov/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/newpavlov/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/newpavlov/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/newpavlov/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/newpavlov/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/newpavlov/rfcs/releases{/id}","deployments_url":"https://api.github.com/repos/newpavlov/rfcs/deployments","created_at":"2017-08-26T21:58:54Z","updated_at":"2018-03-01T12:37:03Z","pushed_at":"2018-07-04T15:10:34Z","git_url":"git://github.com/newpavlov/rfcs.git","ssh_url":"git@github.com:newpavlov/rfcs.git","clone_url":"https://github.com/newpavlov/rfcs.git","svn_url":"https://github.com/newpavlov/rfcs","homepage":"","size":5504,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"e978a8d3017a01d632f916140c98802505cd1324","user":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","avatar_url":"https://avatars1.githubusercontent.com/u/5430905?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":17527989,"node_id":"MDEwOlJlcG9zaXRvcnkxNzUyNzk4OQ==","name":"rfcs","full_name":"rust-lang/rfcs","owner":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","avatar_url":"https://avatars1.githubusercontent.com/u/5430905?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rfcs","description":"RFCs for changes to Rust","fork":false,"url":"https://api.github.com/repos/rust-lang/rfcs","forks_url":"https://api.github.com/repos/rust-lang/rfcs/forks","keys_url":"https://api.github.com/repos/rust-lang/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rfcs/teams","hooks_url":"https://api.github.com/repos/rust-lang/rfcs/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rfcs/events","assignees_url":"https://api.github.com/repos/rust-lang/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rfcs/tags","blobs_url":"https://api.github.com/repos/rust-lang/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rfcs/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rfcs/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rfcs/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rfcs/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rfcs/subscription","commits_url":"https://api.github.com/repos/rust-lang/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rfcs/merges","archive_url":"https://api.github.com/repos/rust-lang/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rfcs/downloads","issues_url":"https://api.github.com/repos/rust-lang/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rfcs/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang/rfcs/deployments","created_at":"2014-03-07T21:29:00Z","updated_at":"2018-07-05T17:02:14Z","pushed_at":"2018-07-05T08:10:41Z","git_url":"git://github.com/rust-lang/rfcs.git","ssh_url":"git@github.com:rust-lang/rfcs.git","clone_url":"https://github.com/rust-lang/rfcs.git","svn_url":"https://github.com/rust-lang/rfcs","homepage":"http://rust-lang.github.io/rfcs/","size":150745,"stargazers_count":1567,"watchers_count":1567,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":651,"mirror_url":null,"archived":false,"open_issues_count":710,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":651,"open_issues":710,"watchers":1567,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/2495"},"html":{"href":"https://github.com/rust-lang/rfcs/pull/2495"},"issue":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/2495"},"comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/2495/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/2495/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/2495/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rfcs/statuses/4ec9682a9f2c2697eedbdb06350fa5701fd0e862"}},"author_association":"NONE"}}
{"actor":{"display_login":"newpavlov"}}