Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #80867

Merged
merged 23 commits into from
Jan 10, 2021
Merged

Rollup of 9 pull requests #80867

merged 23 commits into from
Jan 10, 2021

Commits on Nov 28, 2020

  1. Implement From<char> for u64 and u128.

    Julian Wollersberger committed Nov 28, 2020
    Configuration menu
    Copy the full SHA
    7438f43 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2020

  1. Configuration menu
    Copy the full SHA
    0bf75fb View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2020

  1. Configuration menu
    Copy the full SHA
    4a48d68 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2021

  1. Fix safety comment

    The size assertion in the comment was inverted compared to the code. After fixing that the implication that `(new_size >= old_size) => new_size != 0` still doesn't hold so explain why `old_size != 0` at this point.
    LingMan authored Jan 7, 2021
    Configuration menu
    Copy the full SHA
    769fb8a View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2021

  1. Use correct span for structured suggestion

    On structured suggestion for `let` -> `const`  and `const` -> `let`, use
    a proper `Span` and update tests to check the correct application.
    
    Follow up to rust-lang#80012.
    estebank committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    9a5dcaa View commit details
    Browse the repository at this point in the history
  2. Remove useless fill_in function

    It was only used once, in a function that was otherwise trivial.
    jyn514 committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    d72f580 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3338bdb View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2021

  1. Update the stabilisation version.

    Julian Wollersberger committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    e8cb72c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    34d128a View commit details
    Browse the repository at this point in the history
  3. Support download-ci-llvm on NixOS

    In particular, the CI built `libLLVM-*.so` needs to have `libz.so`
    RPATHed so that binaries like `llvm-config` work at all.
    nagisa committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    15ade4d View commit details
    Browse the repository at this point in the history
  4. Allow #[rustc_builtin_macro = "name"].

    This makes it possible to have both std::panic and core::panic as a
    builtin macro, by using different builtin macro names for each.
    
    Also removes SyntaxExtension::is_derive_copy, as the macro name (e.g.
    sym::Copy) is now tracked and provides that information directly.
    m-ou-se committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    d651fa7 View commit details
    Browse the repository at this point in the history
  5. Formatting.

    m-ou-se committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    0aad91b View commit details
    Browse the repository at this point in the history
  6. Don't set builtin_name for builtin macro implementations.

    This used to be necessary for `is_builtin` in the past, but is no longer required.
    
    Co-authored-by: Vadim Petrochenkov <[email protected]>
    m-ou-se and petrochenkov committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    b293bba View commit details
    Browse the repository at this point in the history
  7. Add comment to Vec::truncate explaining > vs >=

    Hopefully this will prevent people from continuing to ask about this
    over and over again :)
    
    See [this Zulip discussion][1] for more.
    
    [1]: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Vec.3A.3Atruncate.20implementation
    camelid authored Jan 9, 2021
    Configuration menu
    Copy the full SHA
    befd153 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2021

  1. Rollup merge of rust-lang#79502 - Julian-Wollersberger:from_char_for_…

    …u64, r=withoutboats
    
    Implement From<char> for u64 and u128.
    
    With this PR you can write
    ```
    let u = u64::from('👤');
    let u = u128::from('👤');
    ```
    
    Previously, you could already write `as` conversions ([Playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=cee18febe28e69024357d099f07ca081)):
    ```
    // Lossless conversions
    dbg!('👤' as u32);    // Prints 128100
    dbg!('👤' as u64);    // Prints 128100
    dbg!('👤' as u128);   // Prints 128100
    
    // truncates, thus no `From` impls.
    dbg!('👤' as u8);     // Prints 100
    dbg!('👤' as u16);    // Prints 62564
    
    // These `From` impls already exist.
    dbg!(u32::from('👤'));               // Prints 128100
    dbg!(u64::from(u32::from('👤')));    // Prints 128100
    ```
    
    The idea is from ``@gendx`` who opened [this Internals thread](https://internals.rust-lang.org/t/implement-from-char-for-u64/13454), and ``@withoutboats`` responded that someone should open a PR for it.
    Some people mentioned `From<char>` impls for `f32` and `f64`, but that doesn't seem correct to me, so I didn't include them here.
    
    I don't know what the feature should be named. Must it be registered somewhere, like unstable features?
    
    r? ``@withoutboats``
    JohnTitor authored Jan 10, 2021
    Configuration menu
    Copy the full SHA
    5c0f5b6 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#79968 - bjorn3:better_drop_glue_debuginfo, …

    …r=matthewjasper
    
    Improve core::ptr::drop_in_place debuginfo
    
    * Use span of the dropped type as function span when possible.
    * Rename symbol from `core::ptr::drop_in_place::$hash` to `{{drop}}::<$TYPE>::$hash`.
    
    Fixes rust-lang#77465
    
    (I haven't yet updated the tests)
    JohnTitor authored Jan 10, 2021
    Configuration menu
    Copy the full SHA
    f90c7f0 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#80774 - LingMan:patch-1, r=nagisa

    Fix safety comment
    
    The size assertion in the comment was inverted compared to the code. After fixing that the implication that `(new_size >= old_size) => new_size != 0` still doesn't hold so explain why `old_size != 0` at this point.
    JohnTitor authored Jan 10, 2021
    Configuration menu
    Copy the full SHA
    d64356f View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#80801 - estebank:correct-binding-sugg-span,…

    … r=petrochenkov
    
    Use correct span for structured suggestion
    
    On structured suggestion for `let` -> `const`  and `const` -> `let`, use
    a proper `Span` and update tests to check the correct application.
    
    Follow up to rust-lang#80012.
    JohnTitor authored Jan 10, 2021
    Configuration menu
    Copy the full SHA
    700f3f2 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#80803 - jyn514:cleanup-fill-in, r=Guillaume…

    …Gomez
    
    Remove useless `fill_in` function
    
    It was only used once, in a function that was otherwise trivial.
    JohnTitor authored Jan 10, 2021
    Configuration menu
    Copy the full SHA
    c2bbd0c View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#80820 - nagisa:nagisa/dcl-nixos, r=Mark-Sim…

    …ulacrum
    
    Support `download-ci-llvm` on NixOS
    
    In particular, the CI built `libLLVM-*.so` needs to have `libz.so`
    RPATHed so that binaries like `llvm-config` work at all.
    JohnTitor authored Jan 10, 2021
    Configuration menu
    Copy the full SHA
    4f43b77 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#80825 - GuillaumeGomez:rustdoc-cleanup-bis-…

    …repetita, r=jyn514
    
    Remove under-used ImplPolarity enum
    
    It doesn't make much sense to have an enum with only two possible values and to store it inside an `Option` in my opinion when you can do all the same with a simple boolean. I don't expect any chances, performance or RSS usage wise.
    
    r? ``@jyn514``
    JohnTitor authored Jan 10, 2021
    Configuration menu
    Copy the full SHA
    5acac4c View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#80850 - m-ou-se:rustc-builtin-macro-name, r…

    …=petrochenkov
    
    Allow #[rustc_builtin_macro = "name"]
    
    This adds the option of specifying the name of a builtin macro in the `#[rustc_builtin_macro]` attribute: `#[rustc_builtin_macro = "name"]`.
    
    This makes it possible to have both `std::panic!` and `core::panic!` as a builtin macro, by using different builtin macro names for each. This is needed to implement the edition-specific behaviour of the panic macros of RFC 3007.
    
    Also removes `SyntaxExtension::is_derive_copy`, as the macro name (e.g. `sym::Copy`) is now tracked and provides that information directly.
    
    r? ``@petrochenkov``
    JohnTitor authored Jan 10, 2021
    Configuration menu
    Copy the full SHA
    3e735c6 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#80857 - camelid:vec-truncate-comment, r=sco…

    …ttmcm
    
    Add comment to `Vec::truncate` explaining `>` vs `>=`
    
    Hopefully this will prevent people from continuing to ask about this
    over and over again :)
    
    See [this Zulip discussion][1] for more.
    
    [1]: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Vec.3A.3Atruncate.20implementation
    
    r? ``@scottmcm``
    JohnTitor authored Jan 10, 2021
    Configuration menu
    Copy the full SHA
    19b8c65 View commit details
    Browse the repository at this point in the history