Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow adding non-Level context to Annotations #97

Open
epage opened this issue Mar 12, 2024 · 1 comment
Open

Allow adding non-Level context to Annotations #97

epage opened this issue Mar 12, 2024 · 1 comment
Labels
C-enhancement Category: enhancement
Milestone

Comments

@epage
Copy link
Contributor

epage commented Mar 12, 2024

Currently, an Annotation is created with a Level. We emulate rustc's "context" style by using a Level::Info but this isn't accurate (and adds a prefix).

@epage epage added the C-enhancement Category: enhancement label Mar 12, 2024
@epage epage added this to the Rust Adoption milestone Mar 12, 2024
@epage epage changed the title Allow adding non-Level context to A Allow adding non-Level context to Annotations Mar 12, 2024
@epage
Copy link
Contributor Author

epage commented Mar 12, 2024

Proposal: Add a new enum with states:

enum Unnamed {
    Message,  // in rustc terms, "primary"
    Context, // in rustc terms, "secondary"
    Level(Level), // new to rustc but maintains our current API
    // Added, // for when we support suggestions
    // Removed, // for when we support suggestions
}

We could then create Annotations off of this

I originally called this Style but this is less of a stole and more of a purpose or role of the annotation. Still unsure what to call it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-enhancement Category: enhancement
Projects
None yet
Development

No branches or pull requests

1 participant