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
    • Engagement control
    • 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 Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: Triage meeting 2021-03-02 tags: triage-meeting --- # T-lang meeting agenda * Meeting date: 2021-03-02 ## Attendance * Team members: Josh, Niko, Taylor, Felix * Others: simulacrum, mara ## Meeting roles * Action item scribe: simulacrum * Note-taker: nikomatsakis (whoops...) ## Action item review * [Action items list](https://hackmd.io/gstfhtXYTHa3Jv-P_2RK7A) * [Planning meeting hackmd](https://hackmd.io/JNh7ltdLTpq-nbARUctHoA) ## Pending proposals ### "MCP: Deref Patterns" lang-team#77 **Link:** https://github.com/rust-lang/lang-team/issues/77 * FCP is pending. * Action item: Niko to open zulip stream etc once FCP is complete. ## Nominated RFCs ### "add const-ub RFC" rfcs#3016 **Link:** https://github.com/rust-lang/rfcs/pull/3016 * [Pending FCP](https://github.com/rust-lang/rfcs/pull/3016#issuecomment-786868457) * cramertj added a concern about the motivation * Do we really want to guarantee UB detection? * Answer: C++ does and it would look bad if we did less * Request answers to these questions: * What can you do or not do, as a user, as a result of this RFC? * What can you *not do* as a result of the "authors cannot rely on this" part of this RFC? * What can the *lang team* not do as a result of this RFC? * e.g., what future paths do we close out by making this guarantee? * Action item: Mark to post comment from meeting with those 3 questions * Proposed action items to review / check boxes: * pnkfelix * josh * cramertj * scottmcm ### "Change visibility scoping rules for macro_rules macros" rfcs#3067 **Link:** https://github.com/rust-lang/rfcs/pull/3067 * rylev: Not since yesterday. We're at an inflection point. Do we want to introduce a special token like `$self` in order to more easily facilitate crate local recursive macros? If not, is this feature useful enough? * Looked at common patterns folks use in macros and tried to apply new scoping rules * Recursive macros (which call themselves) are difficult in the new scheme * Macro definition needs to use a full known path to call itself * This works across crates (even when renamed) * `$crate` refers hygenically and there must be some path that other crates can use * Crate-local macros may not have a canonical path that everybody else can use * This applies to macros referencing all other kinds of items today. * But it might be encountered more often because it's common for macros to have to recurse. * Local helper macros that leverage shadowing at the other use case that we don't have a good pattern for, but it's less common * This is a potential blocker for people switching, and thus for us switching how macros work (such as in an edition) * Problematic case: * People define a macro `foo!` that invokes itself like `foo!` * If you `use some_module::foo` this macro, that's fine * But if you do `some_module::foo!` it breaks * The solution: * `foo!` needs to refer to itself as `$crate::some_module::foo` * which implies this path must be valid anywhere that `foo` may be used * incompatible with the pattern of "private impl modules" * An option, introduce `$self` which refers to the module where `foo` is defined * Problem is that this breaks a lot of things in the ecosystem * Could use a different syntax * Not required, could always use `$crate::path::foo!` * Which of these needs solving in order to introduce `pub macro_rules!` * Which of these needs solving to change `macro_rules!` mean `pub(self) macro_rules!` * Mark: We don't want to end up with a partial new system that doesn't solve these issues, and thus two systems in active use (and then potentially three systems once we finish macros 2.0). * Emerging consensus: encourage ongoing design work to solve the above issues, then re-evaluate * AI: Mark to write summary, work with lang member to propose FCP ### "RFC: Declarative macro metavariable expressions" rfcs#3086 **Link:** https://github.com/rust-lang/rfcs/pull/3086 * Output from Declarative macro repetition counts project * There was a counter proposal for how the `count!` could be done efficiently, but some benchmarks found that it is still slower in many cases * petrochenkov wanted a complete examination of the [possible syntactic space](https://github.com/rust-lang/rfcs/pull/3086#discussion_r583166840) * Niko and Josh seem positive * Mara: Looks good, makes complicated things less complicated * Proposal: * rfcbot fcp merge * pnkfelix, cramertj, scottmcm to take action items to review * AI: Josh to summarize and propose FCP merge (done) Key bit: The following metavariable expressions are available: | Expression | Meaning | |----------------------------|------------| | `${count(ident)}` | The number of times `$ident` repeats in total. | | `${count(ident, depth)}` | The number of times `$ident` repeats at up to `depth` nested repetition depths. | | `${index()}` | The current index of the inner-most repetition. | | `${index(depth)}` | The current index of the nested repetition at `depth` steps out. | | `${length()}` | The length of the inner-most repetition. | | `${length(depth)}` | The length of the nested repetition at `depth` steps out. | | `${ignore(ident)}` | Binds `$ident` for repetition, but expands to nothing. | | `$$` | Expands to a single `$`, for removing ambiguity in recursive macro definitions. | ## P-high issues on rust-lang/rust ### "repr(C\) is unsound on MSVC targets" rust#81996 **Link:** https://github.com/rust-lang/rust/issues/81996 * Updates * Ongoing discussion about what changes should be made, and what changes are possible without breaking existing code. * We stated that `repr(C)` should match the target C ABI. There's debate about whether that means "standard C" or "C including extensions in the target C compiler". We intended the latter, but that may be an issue. * People use zero-length arrays today in both `repr(C)` and `repr(Rust)` for alignment: ```rust #[repr(C)] pub struct AlignedTo<Aligner, T> { _align: [Aligner; 0], pub value: T, } ``` ## Nominated PRs and issues on rust-lang/rust ### "[Edition vNext] Consider deprecating weird nesting of items" rust#65516 **Link:** https://github.com/rust-lang/rust/issues/65516 * Decision time: * If there is nobody willing to champion this, Niko proposes we do nothing * We can soft deprecate at any time if we wish * AI Felix: summarize and fcp close ### "Stabilize `unsafe_op_in_unsafe_fn` lint" rust#79208 **Link:** https://github.com/rust-lang/rust/pull/79208 * FCP complete, will be merged. ### "resolve: allow super in module in block to refer to block items" rust#79309 **Link:** https://github.com/rust-lang/rust/pull/79309 * [petrochenkov posted a comment](https://github.com/rust-lang/rust/pull/79309#issuecomment-787479396), summary: * privacy, paths, all work at module granularity * supporting relative paths like `super::foo` but no absolute path like `a::b::c` is inconsistent * crater run queued * proposal: wait until crater is done * Mark: Not a fan of complicating name resolution * Feels like a "patchwork" solution * Summary: we probably want a different solution here if we want to solve this at all * AI: Josh to summarize and suggest discussion of alternative solutions on IRLO/Zulip ### "Allow qualified paths in struct construction (both expressions and patterns)" rust#80080 **Link:** https://github.com/rust-lang/rust/pull/80080 * [Discussed last week in some depth](https://github.com/rust-lang/lang-team/blob/master/minutes/2021-02-23.md#allow-qualified-paths-in-struct-construction-both-expressions-and-patterns-rust80080) * It seems like we didn't note down a clear resolution, but there were some notes about what expectations were * rylev: The action item was to try to get all uses of qualified path struct construction and pattern implemented. This is still WIP * Next steps? ### "Update BARE_TRAIT_OBJECTS lint to deny in 2021 edition" rust#81244 **Link:** https://github.com/rust-lang/rust/pull/81244 * Defer, rylev + scottmcm will discuss lints today and put out a complete proposal * Discussion happening [here](https://rust-lang.zulipchat.com/#narrow/stream/268952-edition-2021/topic/lint.20promotions) ### "Invalid `field is never read: ` lint warning" rust#81658 **Link:** https://github.com/rust-lang/rust/issues/81658 * Question is: what is considered a read? * e.g., [does a destructor that frees memory count as a read](https://github.com/rust-lang/rust/issues/81658#issuecomment-771611093)? * tmiasko points out that `_name` [may be appropriate there](https://github.com/rust-lang/rust/issues/81658#issuecomment-771661388) * what about reads that occur in FFI? * we can't possibly know the full set of those, right? * [example playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=1d909fac79d42a5c028387642c48d7ca) ### "Deny WHERE_CLAUSE_OBJECT_SAFETY in Rust 2021" rust#81992 **Link:** https://github.com/rust-lang/rust/pull/81992 * Defer, rylev + scottmcm will discuss lints today and put out a complete proposal ### "Include adjustments to allow unsizing coercions for raw slice pointers in receiver position" rust#82190 **Link:** https://github.com/rust-lang/rust/pull/82190 * Complicated * Proposal: assign to Niko to review and prepare a write-up ### "make unaligned_references future-incompat lint warn-by-default" rust#82525 **Link:** https://github.com/rust-lang/rust/pull/82525 Ralfjung [writes](https://github.com/rust-lang/rust/pull/82525): > `std::ptr::addr_of!` has hit beta now and will hit stable in a month, so I propose we start fixing https://github.com/rust-lang/rust/issues/27060 for real: creating a reference to a field of a packed struct needs to eventually become a hard error; this PR makes it a warn-by-default future-incompat lint. (The lint already existed, this just raises its default level.) At the same time I removed the corresponding code from unsafety checking; really there's no reason an `unsafe` block should make any difference here. > > For references to packed fields outside `unsafe` blocks, this means `unaligned_refereces` replaces the previous `safe_packed_borrows` warning with a link to https://github.com/rust-lang/rust/issues/82523 (and no more talk about unsafe blocks making any difference). So behavior barely changes, the warning is just worded differently. For references to packed fields inside `unsafe` blocks, this PR shows a new future-incompat warning. and [later on](https://github.com/rust-lang/rust/pull/82525#issuecomment-786487488): > FWIW, I don't know what our policy is wrt how long we wait before shipping such things -- std::ptr::addr_of! is available on beta and nightly, but not yet on stable. So maybe we want to wait until it hits stable to ensure that people can properly fix this warning while remaining stable-compatible. But in case there need to be FCPs or so I wanted to already get the ball rolling here. petrochenkov [writes](https://github.com/rust-lang/rust/pull/82525#issuecomment-787475069): > I think it's useful to land this even if `std::ptr::addr_of` is not yet stable, since the most common correct fix is to copy the field rather than to take a raw reference to it. The old lint is not good, I've personally seen people wrongly silencing the warning by adding an `unsafe` block instead of copying the value. Ralf [writes](https://github.com/rust-lang/rust/pull/82525#issuecomment-787868780): > My concern here is that people will silence the lint if they cannot fix the error because addr_of is not yet stable. ### "Document panicking cases for integer division and remainder" rust#82683 **Link:** https://github.com/rust-lang/rust/pull/82683 > This PR documents the cases when integer division and remainder operations panic. These operations panic in two cases: division by zero and overflow. > > It's surprising that these operations always panic on overflow, unlike most other arithmetic operations, which panic on overflow only when `debug_assertions` is enabled. The panic on overflow for the remainder is also surprising because a return value of `0` would be reasonable in this case. ("Overflow" occurs only for `MIN % -1`.) Since the panics on overflow are somewhat surprising, they should be documented. > > I guess it's worth asking: is panic on overflow (even when `debug_assertions` is disabled) the intended behavior? If not, what's the best way forward? Niko wrote: > [RFC 560](https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md) states: > > > The operations `/`, `%` for the arguments `INT_MIN` and `-1` will unconditionally panic. This is unconditional for legacy reasons. > > Exactly what legacy reasons I had in mind I'm not sure, that sentence kind of amuses me now. =) Nonetheless, I'd say it is clearly intentional, and I imagine that any change here would have to be done over an edition.

    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