Skip to content

const fn: Missing tracking issue and feature gate name in stability error messages #57261

Description

@SimonSapin

In rustc 1.33.0-nightly (a2b0f24 2018-12-30), compare for example:

error: function pointers in const fn are unstable
 --> a.rs:1:26
  |
1 | const fn foo(x: fn()) -> fn() { x }
  |                          ^^^^

error: aborting due to previous error

… with the error message for some other unstable language feature:

error[E0658]: box expression syntax is experimental; you can call `Box::new` instead. (see issue #49733)
 --> a.rs:1:24
  |
1 | fn foo() -> Box<u32> { box 4 }
  |                        ^^^^^
  |
  = help: add #![feature(box_syntax)] to the crate attributes to enable

error: aborting due to previous error

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions