Rust Lang Team
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Design meeting: `#[diagnostic]` RFC https://github.com/rust-lang/rfcs/pull/3368 ## Notes estebank: ### Versioning scheme tmandry: Why not use editions? Georg: Originally proposed by Josh. Originally we were going to make it so we could drop support at any time. Georg: 3 years is a long time; I'd expect faster change than that. estebank: That shoud be fine, we are going to go through the same nightly process. The main issue I see is that we want to be able to drop support. tmandry: It's technically feasible to remove support for these for older editions estebank: It would rely on the edition mechanism but change what it means, but only for diagnostics. estebank: Generally speaking I'm not concerned about needing to support things for 3 years. oli: Will it be possible to drop things? estebank: As long as we have the escape hatch to remove things I think it will be okay. Not that we plan to do this all the time. pnkfelix: I would think of this as a breaking change, the only way to do that is if we have rustfix to automate the change. Right? estebank: Right tmandry: You would want to add support to rustfix, then drop it 3 yrs later? estebank: Yes pnkfelix: Whaaat, we can just break this? estebank: Original proposal was .... In ten years I don't want to have five ways to customize diagnostics. estebank: We would never cause a compiler/parse error. Georg: In the RFC it originally said the compiler must be able to parse, but it's up to the compiler to decide if it will use it or it's a no-op. tmandry: My preference is still to use editions, but I see the point about changing what they mean. oli: I would be fine with saying we won't break but have to choose a new attribute, and the old one won't do anything anymore. estebank: That proposal conforms with the original version. tmandry: I see 3 variants... 1. Version namespace (`diagnostic::v3::`) - `#![diagnostics::version(v2)]` - `#[diagnostics::on_unimplemented(v2, ...)]` 2. Edition 3. Ad-hoc renaming (`diagnostic::foo` instead of `diagnostic::bar`) estebank: For 2 or 3 we could move from one to the other. If we were to commit to supporting everything for 3 years and switch to one or the other. tmandry: Agreed... is it clear what will happen with macros? oli: It should just work. tmandry: Use case I'm imagining: You have a macro that expands to ```rust #[diagnostic::foo] struct Foo; ``` oli: Across an edition we could move to a version scheme. tmandry: I propose we do the "simple thing". Meaning we assume we have ad-hoc renaming/support through the edition, and come back when we want to change something. oli: Have to manage expectations about stability. estebank: Agree Georg: Example of how something might break: message field, note field, etc. One of these might not be used in the future. oli: We could always stringly dump it into the output somewhere. tmandry: I'm comfortable with saying we might turn these into a no-op, but estebank: Need to be extremely clear that this is never going to cause a compilation regression. We aren't going to break people's code just because we want oli: Including bumping MSRV. It shouldn't bump to adopt a new diagnostic attribute – other than originally adding the diganostic attribute itself. tmandry: Hopefully with a warning for the _current_ crate if something is unrecognized? estebank: For forward-compat, are we just going to accept anything and give a warning? tmandry: My feeling is that it should be a warn-by-default lint, which should be turned off for all your deps. oli: Our lint policy should be lenient enough to make this work. tmandry: Do you want pre-approval for adding, removing, changing? oli: For adding we'd like pre-approval, for removing or changing we are fine with looping in lang team. estebank: I'd expect compiler to be looped in more for adding new attributes oli: And adding new fields to existing attributes. tmandry: Makes sense. tmandry: Several members of the lang team wanted to have final signoff before things hit stable. oli: I'm fine with doing it for the first few. After that it could get too high-frequency. tmandry: How about if the RFC says we'll define a policy that can work around lang team later on, with lang team signoff (and not another RFC)? room: (sounds reasonable) tmandry: Not clear to me what the right sign-off/check-in mechanism with the lang team is, but I agree we probably don't want lang team signoff for every new field. estebank: Expectation is that there will be a flurry of activity in the next 6 months, and then it calms down. Georg: Maybe we require signoff for a new attribute, not new fields? tmandry: I could see that being reasonable, with a ping for new fields that's non-blocking, or something like that. tmandry: Or maybe we could try to discuss possible fields when discussing a new attribute. esteban: I'd love to be able to add the diagnostic namespace so we can start parsing it now, so you don't bump MSRV further. tmandry: Sounds like a great reason to prioritize this RFC. oli: Should we immediately lint any use? tmandry: Yes estebank: Should do a crater run also ### Could/should we tie diagnostic::v to Rust version? pnkfelix: I'm guessing that the intent is to allow the diagnostic version to increment at its own pace, though presumably one would observe an increment taken from *just* {0,1} in between each Rust verison. pnkfelix: Would there be any value in instead encoding the Rust version itself in the `diagnostic::v`, to reduce the number of distinct version sequences Rust developers have to think/reason about? ### yourname: Copy this template and add a note above. ###

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully