1. 15 8月, 2023 1 次提交
  2. 13 8月, 2023 13 次提交
    • B
      Auto merge of #114757 - Urgau:transmute-with-invalid_reference_casting, r=est31 · 570601f0
      bors 提交于
      Also consider `mem::transmute` with the `invalid_reference_casting` lint
      
      This PR extend the `invalid_reference_casting` lint with regard to the `std::mem::transmute` function.
      
      ```
      error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
        --> $DIR/reference_casting.rs:27:16
         |
      LL |     let _num = &mut *std::mem::transmute::<_, *mut i32>(&num);
         |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      ```
      
      *I encourage anyone reviewing this PR to do so [without whitespaces](https://github.blog/2011-10-21-github-secrets/#whitespace).*
      570601f0
    • B
      Auto merge of #114723 - petrochenkov:noplugin2, r=davidtwco · 5f3abbc5
      bors 提交于
      rustc: Move `features` from `Session` to `GlobalCtxt`
      
      Removes one more piece of mutable state.
      Follow up to #114622.
      
      The rule I used for passing feature in function signatures:
      - if a crate already depends on `rustc_middle`, then `Session` is replaced with `TyCtxt`
      - otherwise session and features are passed as a pair `sess: &Session, features: &Features`
      
      The code in `rustc_lint` is ultimately used for implementing a trait from `rustc_expand`, so it also doesn't use tcx despite the dependency on `rustc_middle`.
      5f3abbc5
    • B
      Auto merge of #114773 - weihanglo:update-cargo, r=weihanglo · 1702d0ff
      bors 提交于
      Update cargo
      
      21 commits in d78bbf4bde3c6b95caca7512f537c6f9721426ff..7e9de3f4ec3708f500bec142317895b96131e47c
      2023-08-03 12:58:25 +0000 to 2023-08-13 00:47:32 +0000
      - feat: remove `--keep-going` from `cargo test/bench` (rust-lang/cargo#12478)
      - chore: window-sys should be a platform-specific dependency (rust-lang/cargo#12483)
      - docs: make the env var source of rerun-if-env-changed clearer (rust-lang/cargo#12482)
      - doc: note the backward compatible `.cargo/credential` file exists (rust-lang/cargo#12479)
      - Fix elided lifetime in associated const (rust-lang/cargo#12475)
      - prompt the use of `--nocapture` flag if `cargo test` process is terminated via a signal. (rust-lang/cargo#12463)
      - cargo-credential: reset stdin & stdout to the Console (rust-lang/cargo#12469)
      - Fix cargo remove incorrectly removing used patches (rust-lang/cargo#12454)
      - chore(gh): Expand update window (rust-lang/cargo#12466)
      - Fix panic when enabling http.debug for certain strings (rust-lang/cargo#12468)
      - fix(cli): Make `--help` easier to browse (rust-lang/cargo#11905)
      - fix: preserve jobserver file descriptors on rustc invocation to get `TargetInfo` (rust-lang/cargo#12447)
      - refactor: migrate to `tracing` (rust-lang/cargo#12458)
      - docs: add example for cargo-credential (rust-lang/cargo#12461)
      - Bail out an error when using cargo:: in custom build script (rust-lang/cargo#12332)
      - Fix printing multiple warning messages for unused fields in [registries] table (rust-lang/cargo#12439)
      - Update windows dependencies (rust-lang/cargo#12453)
      - Rustfmt a let-else statement (rust-lang/cargo#12451)
      - Add allow(internal_features) (rust-lang/cargo#12450)
      - Update pretty_env_logger to 0.5 (rust-lang/cargo#12445)
      - Remove build metadata from libgit2-sys dependency (rust-lang/cargo#12444)
      
      r? `@ghost`
      1702d0ff
    • B
      Auto merge of #114732 - gurry:issue-114683, r=compiler-errors · bd54536e
      bors 提交于
      Fix typo in suggest.rs where f32 was used instead of f64
      
      Fixes #114683
      bd54536e
    • W
      Update cargo · ce9bdb18
      Weihang Lo 提交于
      ce9bdb18
    • B
      Auto merge of #114457 - lcnr:trait_ref_is_knowable-normalize, r=compiler-errors · 7455aa53
      bors 提交于
      normalize in `trait_ref_is_knowable` in new solver
      
      fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/51
      
      Alternatively we could avoid normalizing the self type and do this at the end of the `assemble_candidates_via_self_ty` stack by splitting candidates into:
      - applicable without normalizing self type
      - applicable for aliases, even if they can be normalized
      - applicable for stuff which cannot get normalized further
      
      I don't think this would have any significant benefits and it also seems non-trivial to avoid normalizing only the self type in `trait_ref_is_knowable`.
      
      r? `@compiler-errors`
      7455aa53
    • B
      Auto merge of #114755 - GuillaumeGomez:migrate-gui-test-color-31, r=notriddle · cb0c2997
      bors 提交于
      Migrate GUI colors test to original CSS color format
      
      Follow-up of https://github.com/rust-lang/rust/pull/111459.
      
      r? `@notriddle`
      cb0c2997
    • B
      Auto merge of #114739 - lcnr:int-infer-impls, r=compiler-errors · 49af618e
      bors 提交于
      remove builtin `Copy` and `Clone` impl for float and int infer
      
      it's only change is whether `{integer}: Copy` is ambiguous, this has the following properties
      
      - these goals get proven earlier, potentially resulting in slightly better perf
      - it causes inconsistent behavior and ICE if there do not exist impls for all integers, causing issues when using `#[no_core]`
      - it means `Clone` has user-facing differences from other traits from `core` with the new solver because it can potentially guide inference there
      - it's just very sus™ to have a builtin impl which applies during type inference but not afterwards
      49af618e
    • B
      Auto merge of #114763 - Kobzol:fix-ci-docker-caching, r=Mark-Simulacrum · 28eb857b
      bors 提交于
      CI: fix Docker layer caching
      
      As reported by `@klensy` on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/docker.20images.20always.20rebuilded), Github Actions have recently updated their Docker version from 20.x to 23.x, which enabled the BuildKit build backend by default.
      
      This broke our way of performing Docker layer caching on CI, which immediately made all non-PR CI builds (including try builds) ~1 hour longer (Docker caching didn't work on PR builds before, so it wasn't affected). The moment this started happening can be seen [here](https://github.com/rust-lang-ci/rust/actions?page=2&query=branch%3Aauto+is%3Asuccess).
      
      The problem is with the following command:
      ```
      docker history -q rust-ci | \
                grep -v missing | \
                xargs docker save | \
                gzip | \
                $upload
      ```
      which returns the intermediate layers as `<missing>`, if BuildKit is enabled. This was investigated by `@klensy` in https://github.com/rust-lang/rust/pull/114621. Thanks for that!
      
      I will continue experimenting with how we can enable the cache with BuildKit in https://github.com/rust-lang/rust/pull/114762, but for the time being, I think that we should just hotfix this.
      
      This PR reverts the build backend back to the old one, which fixes the caching. However, we also have to bust the cache of all Dockerfiles, otherwise caching would only start kicking in for them the next time they are updated (or the next time GH updates their docker version). Because when the Docker version was updated the last time, the Dockerfiles were cached on S3 with basically an empty cache, and unless we bust it, even after reverting to the old build engine, the CI script would just download the empty cache and rebuild the Dockerfile from scratch, thus nullifying our fix.
      
      r? `@Mark-Simulacrum`
      28eb857b
    • L
      lower `evaluate_goal` stability check to `warn` · 51762886
      lcnr 提交于
      51762886
    • L
      normalize in `trait_ref_is_knowable` in new solver · 9eeaf1fd
      lcnr 提交于
      9eeaf1fd
    • B
      Auto merge of #114756 - matthiaskrgr:rollup-4m7l4p6, r=matthiaskrgr · cbb48a5e
      bors 提交于
      Rollup of 7 pull requests
      
      Successful merges:
      
       - #94455 (Partially stabilize `int_roundings`)
       - #114132 (Better Debug for Vars and VarsOs)
       - #114584 (E0277 nolonger points at phantom `.await`)
       - #114667 (Record binder for bare trait object in LifetimeCollectVisitor)
       - #114692 (downgrade `internal_features` to warn)
       - #114703 (Cover ParamConst in smir)
       - #114734 (Mark oli as "on vacation")
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      cbb48a5e
    • J
      CI: fix Docker layer caching · 6ca13d05
      Jakub Beránek 提交于
      6ca13d05
  3. 12 8月, 2023 17 次提交
  4. 11 8月, 2023 9 次提交