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 11 pull requests #104151

Closed
wants to merge 37 commits into from

Commits on Oct 25, 2022

  1. Fix rust-lang#103451, find_width_of_character_at_span return width wi…

    …th 1 when reaching end
    chenyukang committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    6d45529 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2022

  1. Configuration menu
    Copy the full SHA
    8dbd817 View commit details
    Browse the repository at this point in the history
  2. Update cc in Cargo.lock

    palfrey committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    a9d7cfc View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2022

  1. Configuration menu
    Copy the full SHA
    a2037e3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    32dae91 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0f632c8 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2022

  1. Rename some variables.

    These have been bugging me for a while.
    
    - `literal_text`: `src` is also used and is shorter and better.
    - `first_char`: used even when "first" doesn't make sense; `c` is
      shorter and better.
    - `curr`: `c` is shorter and better.
    - `unescaped_char`: `result` is also used and is shorter and better.
    - `second_char`: these have a single use and can be elided.
    nnethercote committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    f32e678 View commit details
    Browse the repository at this point in the history
  2. Clarify range calculations.

    There is some subtlety here.
    nnethercote committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    84ca2c3 View commit details
    Browse the repository at this point in the history
  3. Use Mode less.

    It's passed to numerous places where we just need an `is_byte` bool.
    Passing the bool avoids the need for some assertions.
    
    Also rename `is_bytes()` as `is_byte()`, to better match `Mode::Byte`,
    `Mode::ByteStr`, and `Mode::RawByteStr`.
    nnethercote committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    34b32b0 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2022

  1. Make non-ASCII errors more consistent.

    There are three kinds of "byte" literals: byte literals, byte string
    literals, and raw byte string literals. None are allowed to have
    non-ASCII chars in them.
    
    Two `EscapeError` variants exist for when that constraint is violated.
    - `NonAsciiCharInByte`: used for byte literals and byte string literals.
    - `NonAsciiCharInByteString`: used for raw byte string literals.
    
    As a result, the messages for raw byte string literals use different
    wording, without good reason. Also, byte string literals are incorrectly
    described as "byte constants" in some error messages.
    
    This commit eliminates `NonAsciiCharInByteString` so the three cases are
    handled similarly, and described correctly. The `mode` is enough to
    distinguish them.
    
    Note: Some existing error messages mention "byte constants" and some
    mention "byte literals". I went with the latter here, because it's a
    more correct name, as used by the Reference.
    nnethercote committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    7dbf2c0 View commit details
    Browse the repository at this point in the history
  2. Improve comments.

    Remove a low-value comment, remove a duplicate comment, and correct a
    third comment.
    nnethercote committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    a21c045 View commit details
    Browse the repository at this point in the history
  3. Refactor cook_lexer_literal.

    It deals with eight cases: ints, floats, and the six quoted types
    (char/byte/strings). For ints and floats we have an early return, and
    the other six types fall through to the code at the end, which makes the
    function hard to read.
    
    This commit rearranges things to avoid the early returns.
    nnethercote committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    d963686 View commit details
    Browse the repository at this point in the history
  4. Inline and remove validate_int_literal.

    It has a single callsite, and is fairly small. The `Float` match arm
    already has base-specific checking inline, so this makes things more
    consistent.
    nnethercote committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    a203482 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f8e2cef View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    57b2290 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2022

  1. Remove unescape_byte_literal.

    It's easy to just use `unescape_literal` + `byte_from_char`.
    nnethercote committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    a838952 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    43d21b5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    13d4c61 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2022

  1. Add --print=split-debuginfo

    This option prints all supported values for -Csplit-debuginfo=.., i.e.
    only stable ones on stable/beta and all of them on nightly/dev.
    kamirr committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    4c3cad0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c9896b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d97fa25 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    87c190c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    66e8a29 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. fix: lint against lint functions

    fix: lint against the functions `LintContext::{lookup_with_diagnostics,lookup,struct_span_lint,lint}`, `TyCtxt::struct_lint_node`, `LintLevelsBuilder::struct_lint`.
    Rejyr committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    ae5cc9c View commit details
    Browse the repository at this point in the history
  2. Simplify unescape_{char,byte}.

    The `usize` isn't needed in the error case.
    nnethercote committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    d6c97a3 View commit details
    Browse the repository at this point in the history
  3. remove redundent "<>" for ty::Slice with reference type

    Yiming Lei committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    c48ca7d View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#103521 - chenyukang:yukang/fix-103451-avoid…

    …-hang, r=jackh726,wesleywiser
    
    Avoid possible infinite  loop when next_point reaching the end of file
    
    Fixes rust-lang#103451
    If we return a span with `lo` = `hi`, `span_to_snippet` will always get `Ok("")`, which may introduce infinite loop if we don't care.
    
    This PR make `find_width_of_character_at_span` return `width` with 1, so that `span_to_snippet` will get an `Err`.
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    f058639 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#103675 - lyming2007:issue-103271-fix, r=fee…

    …1-dead
    
    remove redundent "<>" for ty::Slice with reference type
    
    this fix rust-lang#103271
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    c703763 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#103744 - palfrey:unwind-upgrade-cc, r=Mark-…

    …Simulacrum
    
    Upgrade cc for working is_flag_supported on cross-compiles
    
    rust-lang#85806 fixed unwind v.s gcc support on later Android ndks using `is_flag_supported`. However, due to rust-lang/cc-rs#675, this didn't work properly on cross-compiles. rust-lang/cc-rs@3eeb50b fixes this, and was released in cc 1.0.74, hence the upgrade
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    00fe93c View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#103827 - compiler-errors:rpitit-substs-comp…

    …at, r=wesleywiser
    
    Properly remap and check for substs compatibility in `confirm_impl_trait_in_trait_candidate`
    
    Fixes rust-lang#103824
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    30f887b View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#103919 - nnethercote:unescaping-cleanups, r…

    …=matklad
    
    Unescaping cleanups
    
    Some code improvements, and some error message improvements.
    
    Best reviewed one commit at a time.
    
    r? `@matklad`
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    a12708b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#103952 - ehuss:dont-intra-linkcheck-referen…

    …ce, r=Mark-Simulacrum
    
    Don't intra linkcheck reference
    
    This removes the reference from the intra-doc link checks. This causes problems if any of the reference content needs to change, it causes the linkchecker to break. The reference has its own broken link check (https://github.com/rust-lang/reference/tree/master/style-check) which uses pulldown-cmark on the source to find actual broken links (instead of false-positives like this regex does).
    
    I think the intra-doc link check could potentially be removed completely, since I think rustdoc is now checking for them well enough. However, it may serve as a decent regression check.
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    593d0cc View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#104027 - ted-tanner:issue-103697-fix, r=jyn514

    Place config.toml in current working directory if config not found
    
    Fixes an issue where bootsrapping a Rust build would place `config.toml` in `{src_root}` rather than the current working directory
    
    rust-lang#103697
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    6d62d29 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#104104 - kamirr:master, r=lcnr

    Add split-debuginfo print option
    
    This option prints all supported values for `-Csplit-debuginfo=..`, i.e. only stable ones on stable/beta and all of them on nightly/dev.
    
    Motivated by 1.65.0 regression causing builds with the following entry in `Cargo.toml` to fail on Windows:
    ```toml
    [profile.dev]
    split-debuginfo = "unpacked"
    ```
    
    See rust-lang/cargo#11347 for details.
    
    This will lead to closing rust-lang#103976.
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    aca8cdf View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#104113 - ink-feather-org:fix_const_fn_ref_i…

    …mpls, r=compiler-errors
    
    Fix `const_fn_trait_ref_impl`, add test for it
    
    rust-lang#99943 broke `#[feature(const_fn_trait_ref_impl)]`, this PR fixes this and adds a test for it.
    
    r? ``@fee1-dead``
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    da9a8d8 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#104114 - GuillaumeGomez:background-image-pa…

    …th, r=notriddle
    
    Fix invalid background-image file name
    
    This is a follow-up of rust-lang#101702.
    
    Apparently the image hash was the wrong one. You can see the error in https://doc.rust-lang.org/nightly/core/primitive.u16.html?search=hello too.
    
    I really need to check if I can adds check for resources load errors in `browser-ui-test`.
    
    cc ````@jsha````
    r? ````@notriddle````
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    b20886c View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#104132 - Rejyr:rustc_lint-function-lints, r…

    …=davidtwco
    
    fix: lint against lint functions
    
    Add `#[rustc_lint_diagnostics]` to lint functions missing them. From [this discussion](rust-lang#101138 (comment)).
    
    r? `@davidtwco`
    GuillaumeGomez authored Nov 8, 2022
    Configuration menu
    Copy the full SHA
    0789938 View commit details
    Browse the repository at this point in the history