Skip to content

Add specific feature gate error for const-unstable features - #58196

Merged
bors merged 4 commits into
rust-lang:masterfrom
varkor:const-fn-feature-gate-error
Feb 17, 2019
Merged

Add specific feature gate error for const-unstable features#58196
bors merged 4 commits into
rust-lang:masterfrom
varkor:const-fn-feature-gate-error

Conversation

@varkor

@varkorvarkor commented Feb 5, 2019

Copy link
Copy Markdown
Contributor

Before:

error: `impl Trait` in const fn is unstable
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
error: aborting due to previous error

After:

error[E0723]: `impl Trait` in const fn is unstable (see issue #57563)
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
= help: add #![feature(const_fn)] to the crate attributes to enable
error: aborting due to previous error

This improves the situation with #57563. Fixes#57544. Fixes#54469.

r? @oli-obk

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 5, 2019
@varkorvarkor changed the title Const fn feature gate errorAdd specific feature gate error for const-unstable featuresFeb 5, 2019

@oli-obkoli-obk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with a documentation nit

Comment threadsrc/librustc_mir/diagnostics.rs Outdated
@varkor

Copy link
Copy Markdown
ContributorAuthor

@bors r=oli-obk

@bors

bors commented Feb 5, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 4ed4c99cfce30b03d0873aa6b1fbd9e133056132 has been approved by oli-obk

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 5, 2019
@rust-highfive

This comment has been minimized.

@varkor
varkorforce-pushed the const-fn-feature-gate-error branch from 4ed4c99 to 8a7df4fCompareFebruary 6, 2019 08:08
@kennytm

Copy link
Copy Markdown
Member

@bors r=oli-obk

Please tell bors about the re-approval after a force-push.

@bors

bors commented Feb 7, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 8a7df4f has been approved by oli-obk

Centril added a commit to Centril/rust that referenced this pull request Feb 13, 2019
… r=oli-obk
Add specific feature gate error for const-unstable features
Before:
```
error: `impl Trait` in const fn is unstable
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
error: aborting due to previous error
```
After:
```
error[E0723]: `impl Trait` in const fn is unstable (see issue rust-lang#57563)
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
= help: add #![feature(const_fn)] to the crate attributes to enable
error: aborting due to previous error
```
This improves the situation with rust-lang#57563. Fixesrust-lang#57544. Fixesrust-lang#54469.
r? @oli-obk
@CentrilCentril mentioned this pull request Feb 13, 2019
Centril added a commit to Centril/rust that referenced this pull request Feb 13, 2019
… r=oli-obk
Add specific feature gate error for const-unstable features
Before:
```
error: `impl Trait` in const fn is unstable
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
error: aborting due to previous error
```
After:
```
error[E0723]: `impl Trait` in const fn is unstable (see issue rust-lang#57563)
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
= help: add #![feature(const_fn)] to the crate attributes to enable
error: aborting due to previous error
```
This improves the situation with rust-lang#57563. Fixesrust-lang#57544. Fixesrust-lang#54469.
r? @oli-obk
@CentrilCentril mentioned this pull request Feb 13, 2019
bors added a commit that referenced this pull request Feb 13, 2019
Rollup of 13 pull requests
Successful merges:
- #57693 (Doc rewording)
- #57815 (Speed up the fast path for assert_eq! and assert_ne!)
- #58034 (Stabilize the time_checked_add feature)
- #58057 (Stabilize linker-plugin based LTO (aka cross-language LTO))
- #58137 (Cleanup: rename node_id_to_type(_opt))
- #58166 (allow shorthand syntax for deprecation reason)
- #58196 (Add specific feature gate error for const-unstable features)
- #58200 (fix str mutating through a ptr derived from &self)
- #58273 (Rename rustc_errors dependency in rust 2018 crates)
- #58289 (impl iter() for dyn Error)
- #58387 (Disallow `auto` trait alias syntax)
- #58404 (use Ubuntu keyserver for CloudABI ports)
- #58405 (Remove some dead code from libcore)
Failed merges:
r? @ghost
@Centril

Copy link
Copy Markdown
Contributor

Failed in rollup (#58413 (comment)), @bors r- ; to fix the issue, try --bless --compare-mode=nll.

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 13, 2019
@rust-langrust-lang deleted a comment from borsFeb 13, 2019
@varkor
varkorforce-pushed the const-fn-feature-gate-error branch from 8a7df4f to 8ca4406CompareFebruary 14, 2019 15:47
@varkor

Copy link
Copy Markdown
ContributorAuthor

@bors r=oli-obk

@bors

bors commented Feb 14, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 8ca4406 has been approved by oli-obk

@borsbors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 14, 2019
@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 14, 2019
Centril added a commit to Centril/rust that referenced this pull request Feb 14, 2019
… r=oli-obk
Add specific feature gate error for const-unstable features
Before:
```
error: `impl Trait` in const fn is unstable
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
error: aborting due to previous error
```
After:
```
error[E0723]: `impl Trait` in const fn is unstable (see issue rust-lang#57563)
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
= help: add #![feature(const_fn)] to the crate attributes to enable
error: aborting due to previous error
```
This improves the situation with rust-lang#57563. Fixesrust-lang#57544. Fixesrust-lang#54469.
r? @oli-obk
@CentrilCentril mentioned this pull request Feb 14, 2019
@kennytmkennytm mentioned this pull request Feb 15, 2019
kennytm added a commit to kennytm/rust that referenced this pull request Feb 16, 2019
… r=oli-obk
Add specific feature gate error for const-unstable features
Before:
```
error: `impl Trait` in const fn is unstable
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
error: aborting due to previous error
```
After:
```
error[E0723]: `impl Trait` in const fn is unstable (see issue rust-lang#57563)
--> src/lib.rs:7:19
|
7 | const fn foo() -> impl T {
| ^^^^^^
= help: add #![feature(const_fn)] to the crate attributes to enable
error: aborting due to previous error
```
This improves the situation with rust-lang#57563. Fixesrust-lang#57544. Fixesrust-lang#54469.
r? @oli-obk
bors added a commit that referenced this pull request Feb 16, 2019
Rollup of 19 pull requests
Successful merges:
- #57929 (Rustdoc remove old style files)
- #57981 (Fix#57730)
- #58074 (Stabilize slice_sort_by_cached_key)
- #58196 (Add specific feature gate error for const-unstable features)
- #58293 (Remove code for updating copyright years in generate-deriving-span-tests)
- #58306 (Don't default on std crate when manipulating browser history)
- #58359 (librustc_mir: use ? in impl_snapshot_for! macro)
- #58395 (Instant::checked_duration_since)
- #58429 (fix Box::into_unique effecitvely transmuting to a raw ptr)
- #58433 (Update which libcore/liballoc tests Miri ignores, and document why)
- #58438 (Use posix_spawn_file_actions_addchdir_np when possible)
- #58440 (Whitelist the ARM v6 target-feature)
- #58448 (rustdoc: mask `compiler_builtins` docs)
- #58468 (split MaybeUninit into several features, expand docs a bit)
- #58477 (Fix the syntax error in publish_toolstate.py)
- #58479 (compile-pass test for #53606)
- #58489 (Fix runtime error in generate-keyword-tests)
- #58496 (Fix documentation for std::path::PathBuf::pop)
- #58509 (Notify myself when Clippy toolstate changes)
bors added a commit that referenced this pull request Feb 17, 2019
Rollup of 19 pull requests
Successful merges:
- #57929 (Rustdoc remove old style files)
- #57981 (Fix#57730)
- #58074 (Stabilize slice_sort_by_cached_key)
- #58196 (Add specific feature gate error for const-unstable features)
- #58293 (Remove code for updating copyright years in generate-deriving-span-tests)
- #58306 (Don't default on std crate when manipulating browser history)
- #58359 (librustc_mir: use ? in impl_snapshot_for! macro)
- #58395 (Instant::checked_duration_since)
- #58429 (fix Box::into_unique effecitvely transmuting to a raw ptr)
- #58433 (Update which libcore/liballoc tests Miri ignores, and document why)
- #58438 (Use posix_spawn_file_actions_addchdir_np when possible)
- #58440 (Whitelist the ARM v6 target-feature)
- #58448 (rustdoc: mask `compiler_builtins` docs)
- #58468 (split MaybeUninit into several features, expand docs a bit)
- #58479 (compile-pass test for #53606)
- #58489 (Fix runtime error in generate-keyword-tests)
- #58496 (Fix documentation for std::path::PathBuf::pop)
- #58509 (Notify myself when Clippy toolstate changes)
- #58521 (Fix tracking issue for error iterators)
@bors
bors merged commit 8ca4406 into rust-lang:masterFeb 17, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@varkor@bors@rust-highfive@kennytm@Centril@oli-obk