-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Contract cannot be applied to const functions #136925
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-contracts`#![feature(contracts)]``#![feature(contracts)]`S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-contracts`#![feature(contracts)]``#![feature(contracts)]`S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code (minimal reproducer extracted from #136578):
I expected to see this happen: compilation would succeed
Instead, this happened: compiler rejected the code with the following errors:
Meta
rustc --version --verbose: