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 #112957

Merged
merged 33 commits into from
Jun 23, 2023
Merged

Rollup of 9 pull requests #112957

merged 33 commits into from
Jun 23, 2023

Commits on Jun 16, 2023

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

Commits on Jun 22, 2023

  1. Configuration menu
    Copy the full SHA
    9202caa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b858a47 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c896062 View commit details
    Browse the repository at this point in the history
  4. style-guide: Fix typo

    "does done fit" should have been "does not fit".
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    9637d44 View commit details
    Browse the repository at this point in the history
  5. style-guide: Move text about block vs visual indent to indentation se…

    …ction
    
    `principles.md` includes some high-level guiding principles for
    formatting, but also includes a few specific formatting provisions.
    While those provisions apply in many places, the same holds true for
    other high-level guidance, such as the indentation section. Move the
    text about using block indent rather than visual indent to the
    indentation section, so that `principles.md` can focus on guiding
    principles while the top level of the style guide gives concrete
    formatting recommendations.
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    3747d7f View commit details
    Browse the repository at this point in the history
  6. style-guide: Move and expand text about trailing commas

    `principles.md` includes some high-level guiding principles for
    formatting, but also includes a few specific formatting provisions.
    While those provisions apply in many places, the same holds true for
    other high-level guidance. Move the text about trailing commas to
    `README.md`, so that `principles.md` can focus on guiding principles
    while the top level of the style guide gives concrete formatting
    recommendations.
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    9280567 View commit details
    Browse the repository at this point in the history
  7. style-guide: s/right-ward/rightward/

    We already use the word "rightward" elsewhere; avoid the unnecessarily
    hyphenated "right-ward".
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    2c0dd90 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4c5bb06 View commit details
    Browse the repository at this point in the history
  9. style-guide: Remove inaccurate statement about rustfmt

    rustfmt does include a mechanism to distinguish standard library
    imports, which it does syntactically by crate name. Avoid making a
    misleading statement that implies it cannot do this.
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    d270af3 View commit details
    Browse the repository at this point in the history
  10. style-guide: Define (and capitalize) "ASCIIbetically"

    The style guide didn't give any definition for it.
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    c5f8b2c View commit details
    Browse the repository at this point in the history
  11. style-guide: Update cargo.md for authors being optional and not recom…

    …mended
    
    Change an example using the authors field to use a long feature list instead.
    
    Change the conventions for the authors field to say "if present".
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    20f2828 View commit details
    Browse the repository at this point in the history
  12. style-guide: Avoid normative recommendations for formatting tool conf…

    …igurability
    
    It's not within the scope of the style guide to tell formatting tools
    whether, or how, to allow configurability of non-default formatting.
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    6f8f83f View commit details
    Browse the repository at this point in the history
  13. style-guide: Clarify advice on names matching keywords

    In particular, specify what this advice is an alternative to (creative
    misspellings such as `krate`).
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    fec28b2 View commit details
    Browse the repository at this point in the history
  14. typo

    tshepang authored Jun 22, 2023
    Configuration menu
    Copy the full SHA
    2828c56 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c930b21 View commit details
    Browse the repository at this point in the history
  16. style-guide: Rephrase a confusingly ordered, ambiguous sentence (and …

    …fix a typo)
    
    This sentence had a parenthetical without a closing parenthesis, and had
    the phrase "which doesn't require special formatting" ambiguously at the
    end of a list when it only applied to the last item of the list.
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    3e2449c View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    a9d1db3 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    5d63721 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    f972e09 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    fcc23a3 View commit details
    Browse the repository at this point in the history
  21. style-guide: Add language disclaiming any effects on non-default Rust…

    … styles
    
    Make it clear that the style guide saying "must" doesn't forbid
    developers from doing differently (as though any power on this Earth
    could do that) and doesn't forbid tools from allowing any particular
    configuration options.
    joshtriplett committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    2748efa View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    afe3650 View commit details
    Browse the repository at this point in the history
  23. Avoid guessing unknown trait impl in suggestions

    When a trait is used without specifying the implementation (e.g. calling
    a non-member associated function without fully-qualified syntax) and
    there are multiple implementations available, use a placeholder comment
    for the implementation type in the suggestion instead of picking a
    random implementation.
    
    Example:
    
    ```
    fn main() {
        let _ = Default::default();
    }
    ```
    
    Previous output:
    
    ```
    error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
     --> test.rs:2:13
      |
    2 |     let _ = Default::default();
      |             ^^^^^^^^^^^^^^^^ cannot call associated function of trait
      |
    help: use a fully-qualified path to a specific available implementation (273 found)
      |
    2 |     let _ = <FileTimes as Default>::default();
      |             +++++++++++++        +
    ```
    
    New output:
    
    ```
    error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
     --> test.rs:2:13
      |
    2 |     let _ = Default::default();
      |             ^^^^^^^^^^^^^^^^ cannot call associated function of trait
      |
    help: use a fully-qualified path to a specific available implementation (273 found)
      |
    2 |     let _ = </* self type */ as Default>::default();
      |             +++++++++++++++++++        +
    ```
    bkrl committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    48167bd View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2023

  1. Rollup merge of rust-lang#111747 - compiler-errors:structural-probe-s…

    …ide-effects, r=fee1-dead
    
    Don't structurally resolve during method ambiguity in probe
    
    See comment in UI test for reason for the failure. This is all on the error path anyways, not really sure what the assertion is there to achieve anyways...
    
    Fixes rust-lang#111739
    matthiaskrgr authored Jun 23, 2023
    Configuration menu
    Copy the full SHA
    01cc9ca View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#112704 - RalfJung:dont-wrap-slices, r=Chris…

    …Denton
    
    slice::from_raw_parts: mention no-wrap-around condition
    
    Cc rust-lang#83996. This probably needs to be mentioned in more places, so I am not closing that issue, but this here should help at least.
    matthiaskrgr authored Jun 23, 2023
    Configuration menu
    Copy the full SHA
    8168915 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#112927 - GuillaumeGomez:where-clause-indent…

    …, r=notriddle
    
    Fix indentation for where clause in rustdoc pages
    
    Screenshot of the bug:
    
    ![image](https://github.com/rust-lang/rust/assets/3050060/090cfeaa-0edc-46c7-9ea0-e26ac865b2c2)
    
    I used this opportunity to clarify the code a bit because some weird things were going on.
    
    r? ````@notriddle````
    matthiaskrgr authored Jun 23, 2023
    Configuration menu
    Copy the full SHA
    3feee9f View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#112933 - TaKO8Ki:avoid-&format-in-error-mes…

    …sage-code, r=oli-obk
    
    Avoid `&format` in error message code
    
    follow-up of rust-lang#111633
    matthiaskrgr authored Jun 23, 2023
    Configuration menu
    Copy the full SHA
    4e96aba View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#112935 - joshtriplett:style-guide-typo-fix,…

    … r=compiler-errors
    
    style-guide: Fix typo
    
    "does done fit" should have been "does not fit".
    matthiaskrgr authored Jun 23, 2023
    Configuration menu
    Copy the full SHA
    61e881e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    46aacf5 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#112942 - joshtriplett:style-guide-tweaks, r…

    …=compiler-errors
    
    style-guide: Organizational and editing tweaks (no semantic changes)
    
    I'd recommend reviewing this PR commit-by-commit; each commit is self-contained
    and should be easy to review at a glance.
    
    - style-guide: Move text about block vs visual indent to indentation section
    - style-guide: Move and expand text about trailing commas
    - style-guide: s/right-ward/rightward/
    - style-guide: Consistently refer to rustfmt as `rustfmt`
    - style-guide: Remove inaccurate statement about rustfmt
    - style-guide: Define (and capitalize) "ASCIIbetically"
    - style-guide: Update cargo.md for authors being optional and not recommended
    - style-guide: Avoid normative recommendations for formatting tool configurability
    - style-guide: Clarify advice on names matching keywords
    - style-guide: Reword an awkwardly phrased recommendation (and fix a typo)
    - style-guide: Rephrase a confusingly ordered, ambiguous sentence (and fix a typo)
    - style-guide: Avoid hyphenating "semicolon"
    - style-guide: Make link text in SUMMARY.md match the headings in the linked pages
    - style-guide: Define what an item is
    - style-guide: Avoid referring to the style team in the past tense
    matthiaskrgr authored Jun 23, 2023
    Configuration menu
    Copy the full SHA
    441e59a View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#112944 - joshtriplett:style-guide-defaults-…

    …vs-configurability, r=compiler-errors
    
    style-guide: Add language disclaiming any effects on non-default Rust styles
    
    Make it clear that the style guide saying "must" doesn't forbid
    developers from doing differently (as though any power on this Earth
    could do that) and doesn't forbid tools from allowing any particular
    configuration options.
    
    Otherwise, people might wonder (for instance) if there's a semantic difference
    between "must" and "should" in the style guide, and whether tools are "allowed"
    to offer configurability of something that says "must".
    matthiaskrgr authored Jun 23, 2023
    Configuration menu
    Copy the full SHA
    8d6b02f View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#112948 - bkrl:trait-impl-suggestion, r=comp…

    …iler-errors
    
    Avoid guessing unknown trait implementation in suggestions
    
    When a trait is used without specifying the implementation (e.g. calling a non-member associated function without fully-qualified syntax) and there are multiple implementations available, use a placeholder comment for the implementation type in the suggestion instead of picking a random implementation.
    
    Example:
    
    ```
    fn main() {
        let _ = Default::default();
    }
    ```
    
    Previous output:
    
    ```
    error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
     --> test.rs:2:13
      |
    2 |     let _ = Default::default();
      |             ^^^^^^^^^^^^^^^^ cannot call associated function of trait
      |
    help: use a fully-qualified path to a specific available implementation (273 found)
      |
    2 |     let _ = <FileTimes as Default>::default();
      |             +++++++++++++        +
    ```
    
    New output:
    
    ```
    error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
     --> test.rs:2:13
      |
    2 |     let _ = Default::default();
      |             ^^^^^^^^^^^^^^^^ cannot call associated function of trait
      |
    help: use a fully-qualified path to a specific available implementation (273 found)
      |
    2 |     let _ = </* self type */ as Default>::default();
      |             +++++++++++++++++++        +
    ```
    
    Fixes rust-lang#112897
    matthiaskrgr authored Jun 23, 2023
    Configuration menu
    Copy the full SHA
    c5fd537 View commit details
    Browse the repository at this point in the history