HackMD
  • Beta
    Beta  Get a sneak peek of HackMD’s new design
    Turn on the feature preview and give us feedback.
    Go → Got it
    • Beta  Get a sneak peek of HackMD’s new design
      Beta  Get a sneak peek of HackMD’s new design
      Turn on the feature preview and give us feedback.
      Go → Got it
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Please check the box to agree to the Community Guidelines.
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive Export to Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive Import from Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
    Menu Sharing Help
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Export to Google Drive Gist
    Import
    Dropbox Google Drive Import from Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    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
    More (Comment, Invitee)
    Publishing
    Please check the box to agree to the Community Guidelines.
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with GitHub
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: Triage meeting 2021-02-23 tags: triage-meeting --- # T-lang meeting agenda * Meeting date: 2021-02-23 ## Attendance * Team members: Niko, Josh, Taylor, Scott, Felix * Others: simulacrum ## Meeting roles * Action item scribe: simulacrum * Note-taker: cramertj ## Action item review * [Action items list](https://hackmd.io/gstfhtXYTHa3Jv-P_2RK7A) ## Pending proposals ### "MCP: Deref Patterns" lang-team#77 **Link:** https://github.com/rust-lang/lang-team/issues/77 * [proposed charter](https://github.com/rust-lang/lang-team/pull/78) is now scoped to stdlib types * niko is ok to merge, who will serve as liaison? Scott will! * Action item: nikomatsakis to fcp merge ## Nominated RFCs ### "add const-ub RFC" rfcs#3016 **Link:** https://github.com/rust-lang/rfcs/pull/3016 [oli nominated](https://github.com/rust-lang/rfcs/pull/3016#issuecomment-780567912): > Yes, the RFC has mostly undergone wording changes and has been unchanged for 3 months. > > I have implemented the prerequisite for this PR: MIR for `const fn` is duplicated so we get an unoptimized MIR for const eval purposes. This allows us to catch much more UB (as optimizations don't destroy it) during const evaluation than previous plans for unsafe code in Rust had in mind. With this implemented, the RFC requires no changes to the compiler or libraries, but once ratified will allow us to stabilize `const fn` in the standard library, even if said functions use unsafe code. Additionally merging this RFC will allow us to move forward with permitting things like `transmute` and `union` field access or other unsafe things in `const fn` that users write. Any such changes need to be signed off by the lang team, but we can't do these without first getting the general notion of "we permit unsafe code in user-written const fn" out the door, which this RFC does. - nikomatsakis: seems like it's in steady state, some impl work has been done. FCP merge? - Action items: read it! (nikomatsakis, pnkfelix, cramertj) ### "Change visibility scoping rules for macro_rules macros" rfcs#3067 **Link:** https://github.com/rust-lang/rfcs/pull/3067 * Previously we asked for solution to recursive macro problem * [Ryan posted some updates](https://github.com/rust-lang/rfcs/pull/3067#issuecomment-781302216) * There was an [alternative proposal](https://github.com/rust-lang/rfcs/pull/3067#issuecomment-780755050) for how to manage * Also a recent comment on Zulip points out that there is another problem ```rust= mod bar { macro_rules! foo { () => { foo!(...) } } } bar::foo!() // expands to `foo!` which is not visible in this scope ``` * Might indicate that we want to wait for "new" `macro` macros * Still need a solution to the recursive case and define-macro-in-macro case * `$self` could help, but we already discussed this and decided not to do it until macros 2.0 since we want `$<path>`, not just special cases. * Also `$self` is a breaking change with substantial impact for existing `macro_rules`. * `$self` could expand to the path that the top-level macro is called through. * How much of this design work will be thrown away with path hygiene in macros 2.0? Probably all of it. In that world, macros can recurse easily. * We want this feature. Macros 2.0 feels like the way to do it, but no one is actively working on that, whereas this feature is maybe more tractable. * josh: opting-in via `pub` or `pub(self)` could make it easier to introduce the new feature without immediately having a solution to all these corner cases. * macros * macro-export (cross-crate): use `pub` <-- solve this problem with `pub` opt-in (have to name yourself via an absolute path that is publicly nameable, but that path exists) * modulo re-exporting? what happens in the example below <-- Ryan to summarize * crate-local (`#[macro_use]` a module) <-- sort-of solved (have to name yourself via `crate::` path) * module-local <-- not so bad today, can't define macro after its use ```rust= // What happens here? // crate A pub mod foo { pub macro_rules! m { $crate::foo::m!() } } // crate B pub use crate_a::foo::m; // crate C crate_b::m(); ``` * Action item: Ryan to clarify re-exporting question. ## 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 * Josh posted our position that repr(C) matches C. * Follow-up comments identified a few possible extensions * warnings about zero-sized types and repr(C) * possible use cases for repr(stable) (e.g., GPU) * `PhantomData` and `PhantomPinned` people expect to be able to use without affecting layout, even in `repr(C)` types * But `PhantomData` and `PhantomPinned` are not themselves `repr(C)`. `repr(Rust)` zero-sized and `align(1)` types in `repr(C)` structures should not affect the layout of the `repr(C)` type. * `repr(Rust)` values in `repr(C)` types in general do not offer layout guarantees. * Is `[u32; 4]` a `repr(C)` type? Is `[u32; 0]`? * [Prior art](https://rust-lang.github.io/unsafe-code-guidelines/layout/structs-and-tuples.html#c-compatible-layout-repr-c), ought to reconcile with the conclusion of this * Action item: Josh to investigate these questions further. ## Nominated PRs and issues on rust-lang/rust ### "Stabilize `unsafe_op_in_unsafe_fn` lint" rust#79208 **Link:** https://github.com/rust-lang/rust/pull/79208 * In FCP, no need to discuss. ### "resolve: allow super in module in block to refer to block items" rust#79309 **Link:** https://github.com/rust-lang/rust/pull/79309 * Changes behavior of `super` for items in functions * Backwards incompatible * petrochenkov is [negative](https://github.com/rust-lang/rust/pull/79309#issuecomment-734406868) * Embedding modules inside functions is how doctests are evaluated. Without this fix, that transformation breaks `super::` usage in modules-in-doctests. * Some overlap with "weird nesting of items" issue * Current module's `self` should match inner module's `super`. Today this is consistent, this PR would change that. * Current `self`-in-function points to the module, ideally it would point to the function? * nikomatsakis: the motivation seems insufficient for a backwards-incompatible change. If doctests are the only "good use" of this, we should find another solution. [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f9843140ff42157541e87d89b56fc1b9) ```rust= fn foo() -> u32 { const T: u32 = 22; self::T // error today } ``` ### "Allow qualified paths in struct construction (both expressions and patterns)" rust#80080 **Link:** https://github.com/rust-lang/rust/pull/80080 * [Scottmcm left a comment](https://github.com/rust-lang/rust/pull/80080#issuecomment-780063540) * But Ryan is looking for lang input on one question. * Allows e.g. constructing associated type struct through associated path: ```rust impl Trait for MyType { type Assoc = Foo; fn bar() -> Self::Assoc { Self::Assoc { ... } } } ``` * Josh: We'd like to allow this in both patterns and expressions * Tuple structs are an issue because they're members of both type and value namespaces (separately). e.g. `struct Foo(u32)` is `type Foo(u32)` and `fn Foo(_: u32) -> Foo { ... }`. Annoyingly, this means that tuple structs would work in *patterns* but not construction. This asymmetry is annoying. ```rust fn main() { let <WithStructStruct as Trait>::AssociatedType { a } = <WithStructStruct as Trait>::AssociatedType { a: 0 }; let <WithTupleStruct as Trait>::AssociatedType(a) = <WithTupleStruct as Trait>::AssociatedType(0); // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is the only thing that currently parses let s = StructStruct { a : 0 }; match s { <WithStructStruct as Trait>::AssociatedType { a } => a, }; let s = TupleStruct(0); match s { <WithTupleStruct as Trait>::AssociatedType(a) => a, }; } struct StructStruct { a: usize } struct TupleStruct(usize); trait Trait { type AssociatedType; } struct WithStructStruct; impl Trait for WithStructStruct { type AssociatedType = StructStruct; } struct WithTupleStruct; impl Trait for WithTupleStruct { type AssociatedType = TupleStruct; } ``` Niko's expectation, weird as it is * In expression position: * `<T0 as Trait>::Type { }` -- works no matter what sort of struct `Type` is but the fields may be named `0: ...` * `<T0 as Trait>::Type(x)` -- invokes a fn named `Type`, not the associated type `Type` * `foo.bar(baz)` -- invoke method `bar` and not call the function `foo.bar` (which is `(foo.bar)(baz)`) * In patterns, unclear, maybe both work as above. ### "Include adjustments to allow unsizing coercions for raw slice pointers in receiver position" rust#82190 **Link:** https://github.com/rust-lang/rust/pull/82190 ### "Invalid `field is never read: ` lint warning" rust#81658 **Link:** https://github.com/rust-lang/rust/issues/81658 ### "[Edition vNext] Consider deprecating weird nesting of items" rust#65516 **Link:** https://github.com/rust-lang/rust/issues/65516 ### "Update BARE_TRAIT_OBJECTS lint to deny in 2021 edition" rust#81244 **Link:** https://github.com/rust-lang/rust/pull/81244 ### "Deny WHERE_CLAUSE_OBJECT_SAFETY in Rust 2021" rust#81992 **Link:** https://github.com/rust-lang/rust/pull/81992

    Import from clipboard

    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 lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.


    Upgrade

    All
    • All
    • Team
    No template found.

    Create custom template


    Upgrade

    Delete template

    Do you really want to delete this template?

    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

    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

    Tutorials

    Book Mode Tutorial

    Slide Mode Tutorial

    YAML Metadata

    Contacts

    Facebook

    Twitter

    Feedback

    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

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings
    Upgrade now

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    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. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        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
        Available push count

        Upgrade

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Upgrade

        Danger Zone

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

        Syncing

        Push failed

        Push successfully