1. 03 8月, 2023 21 次提交
    • L
      avoid more `ty::Binder:dummy` · a090b454
      lcnr 提交于
      a090b454
    • B
      Auto merge of #112043 - jieyouxu:suggestion_macro_expansion_source_callsites, r=cjgillot · c115ec11
      bors 提交于
      Fix suggestion spans for expr from macro expansions
      
      ### Issue #112007: rustc shows expanded `writeln!` macro in code suggestion
      
      #### Before This PR
      
      ```
      help: consider using a semicolon here
        |
      6 |     };
        |      +
      help: you might have meant to return this value
       --> C:\Users\hayle\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\macros\mod.rs:557:9
        |
      55|         return $dst.write_fmt($crate::format_args_nl!($($arg)*));
        |         ++++++                                                  +
      ```
      
      #### After This PR
      
      ```
      help: consider using a semicolon here
         |
      LL |     };
         |      +
      help: you might have meant to return this value
         |
      LL |         return writeln!(w, "but not here");
         |         ++++++                            +
      ```
      
      ### Issue #110017: `format!` `.into()` suggestion deletes the `format` macro
      
      #### Before This PR
      
      ```
      help: call `Into::into` on this expression to convert `String` into `Box<dyn std::error::Error>`
       --> /Users/eric/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/macros.rs:121:12
        |
      12|         res.into()
        |            +++++++
      ```
      
      #### After This PR
      
      ```
      help: call `Into::into` on this expression to convert `String` into `Box<dyn std::error::Error>`
         |
      LL |     Err(format!("error: {x}").into())
         |                              +++++++
      ```
      
      ---
      
      Fixes #112007.
      Fixes #110017.
      c115ec11
    • B
      Auto merge of #114396 - compiler-errors:hir-typeck-nits, r=oli-obk · a922d1c0
      bors 提交于
      Miscellaneous HIR typeck nits
      
      Remove some check functions that only have one usage
      
      Also remove `Expectation::IsLast`, which was both undocumented, and was also made redundant by my cleanup/fix in #103987 😸
      a922d1c0
    • B
      Auto merge of #114400 - matthiaskrgr:rollup-1hkd1ay, r=matthiaskrgr · 2e6ac7fe
      bors 提交于
      Rollup of 3 pull requests
      
      Successful merges:
      
       - #114363 (avoid 'miri' when refering to the shared interpreter)
       - #114371 (Add myself to mailmap)
       - #114387 (Temporarily eholk from review rotation)
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      2e6ac7fe
    • M
      Rollup merge of #114387 - eholk:eholk-on-vacation, r=compiler-errors · 767a91d7
      Matthias Krüger 提交于
      Temporarily eholk from review rotation
      
      I'm going to be out for the rest of this week and then all of next week, and I generally haven't had the bandwidth to do much in the way of reviewing lately anyway. I'm going to remove myself for the review queue at least until I'm back from vacation and have some time to get a few other things in better shape.
      
      r? `@wesleywiser`
      767a91d7
    • M
      Rollup merge of #114371 - samueltardieu:mailmap, r=compiler-errors · 9f963fd5
      Matthias Krüger 提交于
      Add myself to mailmap
      
      Some tool used `Samuel "Sam" Tardieu` as a full name in some of the commits imported along with clippy.
      9f963fd5
    • M
      Rollup merge of #114363 - RalfJung:interpret-not-miri, r=jackh726 · 01fdb9d1
      Matthias Krüger 提交于
      avoid 'miri' when refering to the shared interpreter
      
      This is basically the rustc source code version of https://github.com/rust-lang/rustc-dev-guide/pull/1471.
      01fdb9d1
    • M
      Make Option<&dyn FnMut> into impl FnOnce · aa41c987
      Michael Goulet 提交于
      aa41c987
    • B
      Auto merge of #114353 - nnethercote:parser-ast-cleanups, r=petrochenkov · fb31b3c3
      bors 提交于
      Some parser and AST cleanups
      
      Things I found while looking closely at this code.
      
      r? `@petrochenkov`
      fb31b3c3
    • M
      Inline one usage of check_expr_eq_type · a63bb245
      Michael Goulet 提交于
      a63bb245
    • M
      Inline check_expr_meets_expectation_or_error · f3589a72
      Michael Goulet 提交于
      f3589a72
    • M
      No need for Expectation::IsLast · 6868b93c
      Michael Goulet 提交于
      6868b93c
    • B
      Auto merge of #113220 - tgross35:cstr-bytes-docs, r=workingjubilee · d8bbef50
      bors 提交于
      Clarify documentation for `CStr`
      
      * Better differentiate summaries for `from_bytes_until_nul` and `from_bytes_with_nul`
      * Add some links where they may be helpful
      d8bbef50
    • B
      Auto merge of #113292 - MU001999:fix/issue-113222, r=Nilstrieb · aa70e5fb
      bors 提交于
      Suggest `x build library` for a custom toolchain that fails to load `core`
      
      Fixes #113222
      
      The nicer suggestion for dev-channel won't be emitted if `-Z ui-testing` enabled. IMO, this is acceptable for now.
      aa70e5fb
    • B
      Auto merge of #107254 - chenyukang:yukang/fix-107113-wrong-sugg-in-macro, r=estebank · 736ef39a
      bors 提交于
      Avoid wrong code suggesting for attribute macro
      
      Fixes #107113
      r? `@estebank`
      736ef39a
    • N
      Remove `MacDelimiter`. · d75ee2a6
      Nicholas Nethercote 提交于
      It's the same as `Delimiter`, minus the `Invisible` variant. I'm
      generally in favour of using types to make impossible states
      unrepresentable, but this one feels very low-value, and the conversions
      between the two types are annoying and confusing.
      
      Look at the change in `src/tools/rustfmt/src/expr.rs` for an example:
      the old code converted from `MacDelimiter` to `Delimiter` and back
      again, for no good reason. This suggests the author was confused about
      the types.
      d75ee2a6
    • B
      Auto merge of #114364 - weihanglo:update-cargo, r=weihanglo · 8131b977
      bors 提交于
      Update cargo
      
      10 commits in c91a693e7977e33a1064b63a5daf5fb689f01651..020651c52257052d28f6fd83fbecf5cfa1ed516c
      2023-07-31 00:26:46 +0000 to 2023-08-02 16:00:37 +0000
      - Update rustix to 0.38.6 (rust-lang/cargo#12436)
      - replace `master` branch by default branch in documentation (rust-lang/cargo#12435)
      - `#[allow(internal_features)]` in RUSTC_BOOTSTRAP test (rust-lang/cargo#12429)
      - ci: rewrite bump check and respect semver (rust-lang/cargo#12395)
      - fix(update): Tweak CLI behavior (rust-lang/cargo#12428)
      - chore(deps): update compatible (rust-lang/cargo#12426)
      - Display crate version on timings graph (rust-lang/cargo#12420)
      - chore(deps): update alpine docker tag to v3.18 (rust-lang/cargo#12427)
      - Use thiserror for credential provider errors (rust-lang/cargo#12424)
      - Clarify in `--help` that `cargo test --all-targets` excludes doctests (rust-lang/cargo#12422)
      
      r? `@ghost`
      8131b977
    • E
      Temporarily eholk from review rotation · 50b174b8
      Eric Holk 提交于
      50b174b8
    • B
      Auto merge of #114345 - lqd:revert-113588, r=RalfJung · 6e6d39a4
      bors 提交于
      Revert #113588 to fix bootstrap timings
      
      This reverts #113588 which seems to have broken perf's bootstrap timings via some git issue
      
      https://github.com/rust-lang/rust/pull/114318#issuecomment-1660807886 show a newly broken benchmark, the error at the time was
      
      ```
      fatal: Path 'src/ci/channel' exists on disk, but not in 'e62323df'.
             thread 'main' panicked at 'command did not execute successfully: cd "/home/collector/rustc-perf/rust" && "git" "show" "e62323df:src/ci/channel"
             expected success, got: exit status: 128', config.rs:1786:27
      ```
      
      If this lands, it will reopen #101907 and annoy miri, but it could actually be an issue that would appear during the next bootstrap bump, not just rustc-perf today.
      
      r? `@ghost`
      6e6d39a4
    • W
      Update cargo · 1f960bc9
      Weihang Lo 提交于
      1f960bc9
    • B
      Auto merge of #114202 - fee1-dead-contrib:rm-constness-2, r=oli-obk · 20747af8
      bors 提交于
      Remove `constness` from `TraitPredicate`
      
      Any ICEs or compiler errors created by this PR are expected and intended to be fixed in the future.
      
      r? `@oli-obk`
      cc #110395
      20747af8
  2. 02 8月, 2023 19 次提交