1. 15 8月, 2023 10 次提交
    • B
      Auto merge of #114821 - matthiaskrgr:rollup-bahtz9m, r=matthiaskrgr · f960bdf1
      bors 提交于
      Rollup of 5 pull requests
      
      Successful merges:
      
       - #114745 (Make Const more useful in smir)
       - #114752 (fixed *const [type error] does not implement the Copy trait)
       - #114760 (DebugInfo: Updates test cases that add method declarations.)
       - #114815 (Update books)
       - #114817 (Remove unnecessary FIXME)
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      f960bdf1
    • M
      Rollup merge of #114817 - ouz-a:ouz_testing, r=lcnr · 5f0c17fa
      Matthias Krüger 提交于
      Remove unnecessary FIXME
      
      Found this while browsing rustc, I traced it back to https://github.com/rust-lang/rust/pull/27893 when MIR first introduced, some time passed since then and I think this FIXME is no longer necessary.
      5f0c17fa
    • M
      Rollup merge of #114815 - rustbot:docs-update, r=ehuss · e0ee40ff
      Matthias Krüger 提交于
      Update books
      
      ## rust-lang/book
      
      3 commits in 668c64760b5c7ea654facb4ba5fe9faddfda27cc..72187f5cd0beaaa9c6f584156bcd88f921871e83
      2023-08-04 14:42:07 UTC to 2023-08-03 13:36:44 UTC
      
      - redirects: change link for the `#![no_std]` tutorial (rust-lang/book#3705)
      - [chpt10.2] - Small wording changes (rust-lang/book#3724)
      - Improve sentence (rust-lang/book#3725)
      
      ## rust-embedded/book
      
      1 commits in 1e5556dd1b864109985d5871616ae6b9164bcead..99ad2847b865e96d8ae7b333d3ee96963557e621
      2023-08-11 06:31:04 UTC to 2023-08-11 06:31:04 UTC
      
      - Fix a small typo in qemu.md (rust-embedded/book#359)
      
      ## rust-lang/nomicon
      
      1 commits in 302b995bcb24b70fd883980fd174738c3a10b705..388750b081c0893c275044d37203f97709e058ba
      2023-08-10 21:15:21 UTC to 2023-08-10 21:15:21 UTC
      
      - Document thiscall abi (rust-lang/nomicon#311)
      
      ## rust-lang/reference
      
      10 commits in 1ea0178266b3f3f613b0fabdaf16a83961c99cdb..d43038932adeb16ada80e206d4c073d851298101
      2023-08-12 19:07:28 UTC to 2023-07-16 20:12:46 UTC
      
      - Document thiscall abi (rust-lang/reference#1092)
      - add section about implied bounds (rust-lang/reference#1261)
      - Clearly specify the `instruction_set` effects (rust-lang/reference#1307)
      - Fix merge queue building twice. (rust-lang/reference#1383)
      - Clarify UB around immutability & mutation (rust-lang/reference#1385)
      - mention the extra const UB (rust-lang/reference#1273)
      - Operator expressions: make the note about division by zero clearer. (rust-lang/reference#1384)
      - Make unsafe keyword docs less confusing (rust-lang/reference#1379)
      - Say that division by zero for primitive types panics (rust-lang/reference#1382)
      - Add CI trigger for merge queues. (rust-lang/reference#1381)
      
      ## rust-lang/rust-by-example
      
      3 commits in 8a87926a985ce32ca1fad1be4008ee161a0b91eb..07e0df2f006e59d171c6bf3cafa9d61dbeb520d8
      2023-07-24 11:37:55 UTC to 2023-07-24 11:35:36 UTC
      
      - Added attribute unused_labels - fixed warning. (rust-lang/rust-by-example#1729)
      - more explanation about panic (rust-lang/rust-by-example#1728)
      - chore: add the portuguese version of this project to `readme.md` (rust-lang/rust-by-example#1727)
      
      ## rust-lang/rustc-dev-guide
      
      31 commits in b5a12d95e32ae53791cc6ab44417774667ed2ac6..b123ab4754127d822ffb38349ce0fbf561f1b2fd
      2023-08-14 08:34:59 UTC to 2023-07-11 06:02:34 UTC
      
      - fix: stabilize debugger_visualizer (rust-lang/rustc-dev-guide#1766)
      - feat(part-5-intro): make "Part 5" obvious (rust-lang/rustc-dev-guide#1753)
      - Update from `#[warn_]` to `#[warning]` diagnostic attributes (rust-lang/rustc-dev-guide#1765)
      - Add RPITIT documentation (rust-lang/rustc-dev-guide#1764)
      - fix(visitor.md): fix a type name in a code sample (rust-lang/rustc-dev-guide#1762)
      - fix(name-resolution): remove unnecessary closing paranthesis (rust-lang/rustc-dev-guide#1760)
      - fix(macro-expansion.md): fix the article `an` to `a` (rust-lang/rustc-dev-guide#1759)
      - fix(serialization.md): fix the name of a derive macro (rust-lang/rustc-dev-guide#1756)
      - fix(serialization.md): add a necessary plural suffix (rust-lang/rustc-dev-guide#1757)
      - fix(salsa.md): add punctuation to prevent confusion (rust-lang/rustc-dev-guide#1754)
      - fix(salsa.md): remove duplicate "To Be" verb (rust-lang/rustc-dev-guide#1755)
      - feat(fuzzing.md): make `halfempty` word a link (rust-lang/rustc-dev-guide#1750)
      - fix(about.md): use `a` instead of `an` (rust-lang/rustc-dev-guide#1751)
      - refactor(git.md): make git-scm links clickable (rust-lang/rustc-dev-guide#1747)
      - fix(walkthrough.md) add a comma operator to eliminate ambiguity (rust-lang/rustc-dev-guide#1749)
      - fix(git.md): remove a confusing end of sentence character (rust-lang/rustc-dev-guide#1748)
      - refactor(profiling/with_perf): remove a wrong to be verb (rust-lang/rustc-dev-guide#1746)
      - refactor(tests/headers): remove duplicate list item (rust-lang/rustc-dev-guide#1745)
      - refactor(test/headers.md): make the meaning more obvious (rust-lang/rustc-dev-guide#1744)
      - refactor(tests/ui): remove unnecessary duplicate word (rust-lang/rustc-dev-guide#1743)
      - refactor(compiletest): remove unnecessary duplicate word (rust-lang/rustc-dev-guide#1742)
      - generic_arguments.md: substs -> GenericArgs (rust-lang/rustc-dev-guide#1741)
      - fix(suggested): remove an unnecessary and confusing statement (rust-lang/rustc-dev-guide#1739)
      - fix(how-to-build-and-run): fix a typo ("fromer" -> "former") (rust-lang/rustc-dev-guide#1736)
      - fix(how-to-build-and-run): remove a wrong paragraph (rust-lang/rustc-dev-guide#1735)
      - coverage code has moved (rust-lang/rustc-dev-guide#1728)
      - linked issue is closed (rust-lang/rustc-dev-guide#1729)
      - remove duplicate reference in about-this-guide.md (rust-lang/rustc-dev-guide#1734)
      - Explain more in depth what early and late bound generic parameters are (rust-lang/rustc-dev-guide#1732)
      - add section for normalization with the new solver (rust-lang/rustc-dev-guide#1731)
      - Improve cleanup-crew.md with an example post (rust-lang/rustc-dev-guide#1730)
      e0ee40ff
    • M
      Rollup merge of #114760 - DianQK:update-test-for-type-decl-disubprogram, r=cuviper · e6a5ff26
      Matthias Krüger 提交于
      DebugInfo: Updates test cases that add method declarations.
      
      We've investigated one reason why debugging information often goes wrong at https://reviews.llvm.org/D152095.
      > LLVM can't handle IR where subprogram definitions are nested within DICompositeType when doing LTO builds, because there's no good way to cross the CU boundary to insert a nested DISubprogram definition in one CU into a type defined in another CU.
      
      In #111167, we added a declaration for the DISubprogram for the method. This PR completes this test case.
      
      stream history: https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/Dwarf.20CUs/near/384269475.
      e6a5ff26
    • M
      Rollup merge of #114752 - RickleAndMortimer:issue-113788-fix, r=compiler-errors · 378c2fd6
      Matthias Krüger 提交于
      fixed *const [type error] does not implement the Copy trait
      
      Removes "error: arguments for inline assembly must be copyable" when moving an unknown type
      
      Fixes: #113788
      378c2fd6
    • M
      Rollup merge of #114745 - ouz-a:smir_const, r=spastorino · 106d686e
      Matthias Krüger 提交于
      Make Const more useful in smir
      
      Since https://github.com/rust-lang/rust/pull/114587 is merged, we can make use of what we built and make Const more useful by making it not `Opaque`
      
      r? `@spastorino`
      106d686e
    • B
      Auto merge of #113464 - waynr:remove-provider-trait, r=Amanieu · 4cea2bc3
      bors 提交于
      core/any: remove Provider trait, rename Demand to Request
      
      This touches on two WIP features:
      
      * `error_generic_member_access`
        * tracking issue: https://github.com/rust-lang/rust/issues/99301
        * RFC (WIP): https://github.com/rust-lang/rfcs/pull/2895
      * `provide_any`
        * tracking issue: https://github.com/rust-lang/rust/issues/96024
        * RFC: https://github.com/rust-lang/rfcs/pull/3192
      
      The changes in this PR are intended to address libs meeting feedback summarized by `@Amanieu` in https://github.com/rust-lang/rust/issues/96024#issuecomment-1554773172
      
      The specific items this PR addresses so far are:
      
      > We feel that the names "demand" and "request" are somewhat synonymous and would like only one of those to be used for better consistency.
      
      I went with `Request` here since it sounds nicer, but I'm mildly concerned that at first glance it could be confused with the use of the word in networking context.
      
      > The Provider trait should be deleted and its functionality should be merged into Error. We are happy to only provide an API that is only usable with Error. If there is demand for other uses then this can be provided through an external crate.
      
      The net impact this PR has is that examples which previously looked like
      ```
          core::any::request_ref::<String>(&err).unwramp()
      ```
      
      now look like
      ```
          (&err as &dyn core::error::Error).request_value::<String>().unwrap()
      ```
      
      These are methods that based on the type hint when called return an `Option<T>` of that type. I'll admit I don't fully understand how that's done, but it involves `core::any::tags::Type` and `core::any::TaggedOption`, neither of which are exposed in the public API, to construct a `Request` which is then passed to the `Error.provide` method.
      
      Something that I'm curious about is whether or not they are essential to the use of `Request` types (prior to this PR referred to as `Demand`) and if so does the fact that they are kept private imply that `Request`s are only meant to be constructed privately within the standard library? That's what it looks like to me.
      
      These methods ultimately call into code that looks like:
      ```
      /// Request a specific value by tag from the `Error`.
      fn request_by_type_tag<'a, I>(err: &'a (impl Error + ?Sized)) -> Option<I::Reified>
      where
          I: tags::Type<'a>,
      {
          let mut tagged = core::any::TaggedOption::<'a, I>(None);
          err.provide(tagged.as_request());
          tagged.0
      }
      ```
      
      As far as the `Request` API is concerned, one suggestion I would like to make is that the previous example should look more like this:
      ```
      /// Request a specific value by tag from the `Error`.
      fn request_by_type_tag<'a, I>(err: &'a (impl Error + ?Sized)) -> Option<I::Reified>
      where
          I: tags::Type<'a>,
      {
          let tagged_request = core::any::Request<I>::new_tagged();
          err.provide(tagged_request);
          tagged.0
      }
      ```
      This makes it possible for anyone to construct a `Request` for use in their own projects without exposing an implementation detail like `TaggedOption` in the API surface.
      
      Otherwise noteworthy is that I had to add `pub(crate)` on both `core::any::TaggedOption` and `core::any::tags` since `Request`s now need to be constructed in the `core::error` module. I considered moving `TaggedOption` into the `core::error` module but again I figured it's an implementation detail of `Request` and belongs closer to that.
      
      At the time I am opening this PR, I have not yet looked into the following bit of feedback:
      
      > We took a look at the generated code and found that LLVM is unable to optimize multiple .provide_* calls into a switch table because each call fetches the type id from Erased::type_id separately each time and the compiler doesn't know that these calls all return the same value. This should be fixed.
      
      This is what I'll focus on next while waiting for feedback on the progress so far. I suspect that learning more about the type IDs will help me understand the need for `TaggedOption` a little better.
      4cea2bc3
    • N
      fixed *const [type error] does not implement the Copy trait · cac7c127
      nxya 提交于
      cac7c127
    • O
      Remove unnecessary FIXME · dcf20560
      ouz-a 提交于
      dcf20560
    • R
      Update books · cd09d98f
      rustbot 提交于
      cd09d98f
  2. 14 8月, 2023 17 次提交
    • B
      Auto merge of #114781 - fee1-dead-contrib:param-impl-source, r=davidtwco · 475be26d
      bors 提交于
      Remove constness from `ImplSource::Param`
      475be26d
    • B
      Auto merge of #112842 - lcnr:non-defining-use, r=oli-obk · e8459109
      bors 提交于
      check for non-defining uses of RPIT
      
      This PR requires defining uses of RPIT and the async functions return type to use unique generic parameters as type and const arguments, (mostly) fixing #111935. This changes the following snippet to an error (it compiled since 1.62):
      ```rust
      fn foo<T>() -> impl Sized {
          let _: () = foo::<u8>(); //~ ERROR non-defining use of `impl Sized`
      }
      ```
      Since 1.62 we only checked that the generic arguments of opaque types are unique parameters for TAIT and ignored RPITs, so this PR changes the behavior here to be consistent.
      
      For defining uses which do not have unique params as arguments it is unclear how the hidden type should map to the generic params of the opaque. In the following snippet, should the hidden type of `foo<T>::opaque` be `T` or `u32`.
      ```rust
      fn foo<T>() -> impl Sized {
          let _: u32 = foo::<u32>();
          foo::<T>()
      }
      ```
      There are no crater regressions caused by this change.
      
      ---
      
      The same issue exists for lifetime arguments which is not fixed by this PR, currently resulting in an ICE in mir borrowck (I wasn't able to get an example which didn't ICE, it might be possible):
      ```rust
      fn foo<'a: 'a>() -> impl Sized {
          let _: &'static () = foo::<'static>();
          //~^ ICE opaque type with non-universal region substs
          foo::<'a>()
      }
      ```
      Fixing this for lifetimes as well is blocked on https://github.com/rust-lang/rust/issues/113916. Due to this issue, functions returning an RPIT with lifetime parameters equal in the region constraint graph would always result in an error, resulting in breakage found via crater: https://github.com/rust-lang/rust/pull/112842#issuecomment-1610057887
      ```rust
      trait Trait<'a, 'b> {}
      impl Trait<'_, '_> for () {}
      
      struct Type<'a>(&'a ());
      impl<'a> Type<'a> {
          // `'b == 'a`
          fn do_stuff<'b: 'a>(&'b self) -> impl Trait<'a, 'b> {
              // This fails as long there is something in the body
              // which adds the outlives constraints to the constraint graph.
              //
              // This is the case for nested closures.
              (|| ())()
      
          }
      }
      ```
      e8459109
    • L
      review · e04f582e
      lcnr 提交于
      e04f582e
    • L
      check for non-defining uses of RPIT · 95fddbc5
      lcnr 提交于
      95fddbc5
    • D
      Remove constness from `ImplSource::Param` · f441fa08
      Deadbeef 提交于
      f441fa08
    • B
      Auto merge of #114787 - compiler-errors:issue-114783, r=jackh726 · 3071e0ae
      bors 提交于
      Select obligations before processing wf obligation in `compare_method_predicate_entailment`
      
      We need to select obligations before processing the WF obligation for the `IMPLIED_BOUNDS_ENTAILMENT` lint, since it skips over type variables.
      
      Fixes #114783
      
      r? `@jackh726`
      3071e0ae
    • B
      Auto merge of #114742 - compiler-errors:opaques-are-not-injective, r=aliemjay · e81522aa
      bors 提交于
      TAITs do not constrain generic params
      
      Fixes #108425
      
      Not sure if I should rework those two failing tests. I guess `tests/ui/type-alias-impl-trait/coherence.rs` could just have the type parameter removed from it? IDK what `tests/ui/type-alias-impl-trait/coherence_generalization.rs` is even testing, though.
      
      r? `@aliemjay`
      cc `@lcnr` `@oli-obk` (when he's back from 🌴)
      e81522aa
    • M
    • B
      Auto merge of #114786 - GuillaumeGomez:rollup-0cos5gn, r=GuillaumeGomez · 1b198b3a
      bors 提交于
      Rollup of 5 pull requests
      
      Successful merges:
      
       - #94667 (Add `Iterator::map_windows`)
       - #114069 (Allow using external builds of the compiler-rt profile lib)
       - #114354 (coverage: Store BCB counter info externally, not directly in the BCB graph)
       - #114625 (CI: use smaller machines in PR runs)
       - #114777 (Migrate GUI colors test to original CSS color format)
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      1b198b3a
    • W
      core/any: remove Provider trait · a646b399
      wayne warren 提交于
      * remove `impl Provider for Error`
      * rename `Demand` to `Request`
      * update docstrings to focus on the conceptual API provided by `Request`
      * move `core::any::{request_ref, request_value}` functions into `core::error`
      * move `core::any::tag`, `core::any::Request`, an `core::any::TaggedOption` into `core::error`
      * replace `provide_any` feature name w/ `error_generic_member_access`
      * move `core::error::request_{ref,value} tests into core::tests::error module
      * update unit and doc tests
      a646b399
    • G
      Rollup merge of #114777 - GuillaumeGomez:migrate-gui-test-color-32, r=notriddle · be6cda1e
      Guillaume Gomez 提交于
      Migrate GUI colors test to original CSS color format
      
      Follow-up of https://github.com/rust-lang/rust/pull/111459.
      
      r? `@notriddle`
      be6cda1e
    • G
      Rollup merge of #114625 - klensy:ci-pr-workers, r=Mark-Simulacrum · d8682764
      Guillaume Gomez 提交于
      CI: use smaller machines in PR runs
      
      mingw-check job-linux-16c -> job-linux-4c
      ~job-linux-4c 20 min in auto job
      ~job-linux-16c 13 min in pr job
      with current pr regressed to almost 21 min, it's ok.
      
      mingw-check-tidy job-linux-16c -> job-linux-4c small enough, so reduce to minimal
      ~ job-linux-16c 3 min
      with current pr regressed to almost 5 min, it's ok.
      
      x86_64-gnu-tools job-linux-16c this is top job by time in PR, so don't touch it
      ~ job-linux-8c 1.30 hour in auto job
      ~ job-linux-16c 1 hour in pr job (affected by #114613, actual time ~ 30 min)
      
      x86_64-gnu-llvm-15 job-linux-16c don't change too
      ~ job-linux-8c 1.30 hour in auto job
      ~ job-linux-16c 30 min in pr job
      
      Noticed while working on https://github.com/rust-lang/rust/pull/114621, so current time affected by always rebuilded docker images (but pr images always rebuilded before too, so nvm)
      d8682764
    • G
      Rollup merge of #114354 - Zalathar:external-counters, r=jackh726 · 2442c9b7
      Guillaume Gomez 提交于
      coverage: Store BCB counter info externally, not directly in the BCB graph
      
      When deciding how to instrument the underlying MIR for coverage, the `InstrumentCoverage` pass builds a simplified “Basic Counter Block” graph, and then allocates coverage counters/expressions to various nodes/edges in the BCB graph as necessary. Those counters/expressions are then injected into the function's MIR.
      
      The awkward thing here is that the code for doing this needs `&mut` access to the graph, in order to associate coverage info with individual nodes, even though it isn't making any structural changes to the graph itself. That makes it harder to understand and modify the instrumentation code.
      
      In addition, the graph alone can't hold all the information that is needed. There ends up being an extra vector of “intermediate expressions” that needs to be passed around separately anyway.
      
      ---
      
      This PR simplifies things by instead storing all of that temporary coverage information in a number of side-tables inside `CoverageCounters`.
      
      This makes it easier to see all of the information produced by the make-counters step, and how it is used by the inject-into-mir step.
      
      ---
      
      Looking at the combined changes is possible, but I recommend reviewing the commits individually, because the big changes are mostly independent of each other (despite being conceptually related).
      2442c9b7
    • G
      Rollup merge of #114069 - cuviper:profiler-path, r=Mark-Simulacrum · 99144c3f
      Guillaume Gomez 提交于
      Allow using external builds of the compiler-rt profile lib
      
      This changes the bootstrap config `target.*.profiler` from a plain bool
      to also allow a string, which will be used as a path to the pre-built
      profiling runtime for that target. Then `profiler_builtins/build.rs`
      reads that in a `LLVM_PROFILER_RT_LIB` environment variable.
      99144c3f
    • G
      Rollup merge of #94667 - frank-king:feature/iter_map_windows, r=Mark-Simulacrum · 7f787e39
      Guillaume Gomez 提交于
      Add `Iterator::map_windows`
      
      Tracking issue:  #87155.
      
      This is inherited from the old PR  #82413.
      
      Unlike #82413, this PR implements the `MapWindows` to be lazy: only when pulling from the outer iterator, `.next()` of the inner iterator will be called.
      
      ## Implementaion Steps
      - [x] Implement `MapWindows` to keep the iterators' [*Laziness*](https://doc.rust-lang.org/std/iter/index.html#laziness) contract.
      - [x] Fix the known bug of memory access error.
      - [ ] Full specialization of iterator-related traits for `MapWindows`.
          - [x] `Iterator::size_hint`,
          - [x] ~`Iterator::count`~,
          - [x] `ExactSizeIterator` (when `I: ExactSizeIterator`),
          - [x] ~`TrustedLen` (when `I: TrustedLen`)~,
          - [x] `FusedIterator`,
          - [x] ~`Iterator::advance_by`~,
          - [x] ~`Iterator::nth`~,
          - [ ] ...
      - [ ] More tests and docs.
      
      ## Unresolved Questions:
      - [ ] Is there any more iterator-related traits should be specialized?
      - [ ] Is the double-space buffer worth?
      - [ ] Should there be `rmap_windows` or something else?
      - [ ] Taking GAT for consideration, should the mapper function be `FnMut(&[I::Item; N]) -> R` or something like `FnMut(ArrayView<'_, I::Item, N>) -> R`? Where `ArrayView` is mentioned in https://github.com/rust-lang/generic-associated-types-initiative/issues/2.
          - It can save memory, only the same size as the array window is needed,
          - It is more efficient, which requires less data copies,
          - It is possibly compatible with the GATified version of `LendingIterator::windows`.
          - But it prevents the array pattern matching like `iter.map_windows(|_arr: [_; N]| ())`, unless we extend the array pattern to allow matching the `ArrayView`.
      7f787e39
    • B
      Auto merge of #114480 - ozkanonur:fix-stage0-compiler-llvm, r=Mark-Simulacrum · ebbd7154
      bors 提交于
      copy the correct version of LLVM into the stage0 sysroot
      
      In some cases(see https://github.com/rust-lang/rust/issues/109314), when the stage0
      compiler relies on more recent version of LLVM than the beta compiler, it may not
      be able to locate the correct LLVM in the sysroot. This situation typically occurs
      when we upgrade LLVM version while the beta compiler continues to use an older version.
      
      Fixes #109314
      ebbd7154
    • B
      Auto merge of #113722 - bjorn3:allocator_shim_refactor, r=jackh726 · 644e8068
      bors 提交于
      Extract a create_wrapper_function for use in allocator shim writing
      
      This deduplicates some logic and makes it easier to follow what wrappers are produced. In the future it may allow moving the code to determine which wrappers to create to cg_ssa.
      644e8068
  3. 13 8月, 2023 13 次提交
    • B
      Auto merge of #114758 - fmease:fix-nice-re-err-ice-gci, r=cjgillot · 2b26bf58
      bors 提交于
      Don't crash when reporting nice region errors for generic const items
      
      Fixes #114714.
      2b26bf58
    • 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
    • G
      245d3516
    • 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
    • Z
      Store BCB counters externally, not directly in the BCB graph · 5ca30c46
      Zalathar 提交于
      Storing coverage counter information in `CoverageCounters` has a few advantages
      over storing it directly inside BCB graph nodes:
      
      - The graph doesn't need to be mutable when making the counters, making it
      easier to see that the graph itself is not modified during this step.
      
      - All of the counter data is clearly visible in one place.
      
      - It becomes possible to use a representation that doesn't correspond 1:1 to
      graph nodes, e.g. storing all the edge counters in a single hashmap instead of
      several.
      5ca30c46
    • Z
      Accumulate intermediate expressions into `CoverageCounters` · 5302c9d4
      Zalathar 提交于
      This avoids the need to pass around a separate vector to accumulate into, and
      avoids the need to create a fake empty vector when failure occurs.
      5302c9d4
    • Z
      Rename helper struct `BcbCounters` to `MakeBcbCounters` · c74db79c
      Zalathar 提交于
      This avoids confusion with data structures that actually hold BCB counter
      information.
      c74db79c
    • 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