Skip to content

Design meeting: Non-local errors (aka post-monomorphization errors) #195

Closed
@tmandry

Description

@tmandry

Summary

A non-local error is a compile-time error that appears in code only in some cases, contingent on external factors not controlled by the code itself. Examples:

  • Static assertions about the value of a const generic, or the size of a generic type
  • Errors that only appear when certain APIs are used from main, or flags like -C link-dead-code are passed
  • Errors that appear in cargo build, but not cargo check

The lang team needs to decide its stance on these errors, their tradeoffs, and in particular, how they relate to the discussion to stabilize inline_const.

Background reading

Non-local errors in Rust

About this issue

This issue corresponds to a lang-team design meeting proposal. It corresponds to a possible topic of discussion that may be scheduled for deeper discussion during one of our design meetings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langmeeting-proposalProposal for a lang team design meetingmeeting-scheduledLang team design meeting that has a scheduled date

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions