Skip to content

Suggest updating the compiler #117318

Closed
Closed
@CryZe

Description

@CryZe

Code

On an older compiler:

fn main() {
  1u32.div_ceil(5);
}

Current output

error[E0658]: use of unstable library feature 'int_roundings'
  --> src\lib.rs:38:14
   |
38 |         1u32.div_ceil(5);
   |              ^^^^^^^^
   |
   = note: see issue #88581 <https://github.com/rust-lang/rust/issues/88581> for more information

Desired output

error[E0658]: use of unstable library feature 'int_roundings'
  --> src\lib.rs:38:14
   |
38 |         1u32.div_ceil(5);
   |              ^^^^^^^^
   |
   = note: see issue #88581 <https://github.com/rust-lang/rust/issues/88581> for more information
   = note: if you are on an old compiler version you may need to update your compiler

Rationale and extra context

Throughout all my time with Rust I've heard from multiple people (who may be less experienced) on various occasions that after pulling the latest commit, that my Rust code is accidentally using unstable features. Every single time they didn't know that the problem isn't that I used unstable features, but that those features stabilized in the meantime and that they need to update their compiler version.

Maybe the compiler could even check based on the date if a new version of the compiler should be out and only emit that note then.

Other cases

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.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