-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #129993
Rollup of 9 pull requests #129993
Commits on Jul 7, 2024
-
Call the target libdir target libdir
Because it's the target libdir. `--print` uses the same terminology, and it's a simple way to make it obviously different from `$sysroot/lib`.
Configuration menu - View commit details
-
Copy full SHA for 7627a54 - Browse repository at this point
Copy the full SHA 7627a54View commit details
Commits on Aug 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 27f92b6 - Browse repository at this point
Copy the full SHA 27f92b6View commit details
Commits on Aug 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c6111c0 - Browse repository at this point
Copy the full SHA c6111c0View commit details -
Move
WriteInfo
out ofAllocations
.It doesn't need to be in there, and the move simplifies lifetimes.
Configuration menu - View commit details
-
Copy full SHA for 0a282ea - Browse repository at this point
Copy the full SHA 0a282eaView commit details -
It's not necessary, and just complicates things.
Configuration menu - View commit details
-
Copy full SHA for ad5a6e1 - Browse repository at this point
Copy the full SHA ad5a6e1View commit details -
By making it own the index maps, instead of holding references to them. This requires moving the free function `find_candidate` into `Candidate::reset_and_find`. It lets the `'alloc` lifetime be removed everywhere that still has it.
Configuration menu - View commit details
-
Copy full SHA for 1be2204 - Browse repository at this point
Copy the full SHA 1be2204View commit details
Commits on Aug 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0d156f2 - Browse repository at this point
Copy the full SHA 0d156f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b75f8a - Browse repository at this point
Copy the full SHA 5b75f8aView commit details
Commits on Sep 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5afc461 - Browse repository at this point
Copy the full SHA 5afc461View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84259ff - Browse repository at this point
Copy the full SHA 84259ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 35a7c1b - Browse repository at this point
Copy the full SHA 35a7c1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd5f7bc - Browse repository at this point
Copy the full SHA dd5f7bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4825fb1 - Browse repository at this point
Copy the full SHA 4825fb1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a85632 - Browse repository at this point
Copy the full SHA 5a85632View commit details -
Configuration menu - View commit details
-
Copy full SHA for 01d8235 - Browse repository at this point
Copy the full SHA 01d8235View commit details
Commits on Sep 2, 2024
-
Simplify CSS but wrapping scraped example into a div and move the tit…
…le out of the code block
Configuration menu - View commit details
-
Copy full SHA for e3af6dc - Browse repository at this point
Copy the full SHA e3af6dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 55bc638 - Browse repository at this point
Copy the full SHA 55bc638View commit details
Commits on Sep 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 65e78db - Browse repository at this point
Copy the full SHA 65e78dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3626b66 - Browse repository at this point
Copy the full SHA 3626b66View commit details -
Configuration menu - View commit details
-
Copy full SHA for efc20de - Browse repository at this point
Copy the full SHA efc20deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 277a08c - Browse repository at this point
Copy the full SHA 277a08cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e45b53e - Browse repository at this point
Copy the full SHA e45b53eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7157f98 - Browse repository at this point
Copy the full SHA 7157f98View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4f2a31 - Browse repository at this point
Copy the full SHA a4f2a31View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5525043 - Browse repository at this point
Copy the full SHA 5525043View commit details
Commits on Sep 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8860008 - Browse repository at this point
Copy the full SHA 8860008View commit details
Commits on Sep 5, 2024
-
run_make_support: rename
Command::stdin
tostdin_buf
and add `std……{in,out,err}` config helpers Previously `Command::stdin` was actually just a stdin buffer helper, but this is different from `std::process::Command::stdin`. This is needlessly confusing, and blocks support to add `std{in,out,err}` config that tests may want to use to e.g. redirect to `/dev/ptmx`.
Configuration menu - View commit details
-
Copy full SHA for 2031eac - Browse repository at this point
Copy the full SHA 2031eacView commit details -
Configuration menu - View commit details
-
Copy full SHA for afed862 - Browse repository at this point
Copy the full SHA afed862View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8871ce0 - Browse repository at this point
Copy the full SHA 8871ce0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a459403 - Browse repository at this point
Copy the full SHA a459403View commit details -
Configuration menu - View commit details
-
Copy full SHA for f96aff9 - Browse repository at this point
Copy the full SHA f96aff9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1884983 - Browse repository at this point
Copy the full SHA 1884983View commit details -
Configuration menu - View commit details
-
Copy full SHA for d059f37 - Browse repository at this point
Copy the full SHA d059f37View commit details -
Configuration menu - View commit details
-
Copy full SHA for 238944c - Browse repository at this point
Copy the full SHA 238944cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f9c4b3 - Browse repository at this point
Copy the full SHA 8f9c4b3View commit details -
Don't worry about uncaptured contravariant lifetimes if they outlive …
…a captured lifetime
Configuration menu - View commit details
-
Copy full SHA for f8f4d50 - Browse repository at this point
Copy the full SHA f8f4d50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7064135 - Browse repository at this point
Copy the full SHA 7064135View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1d0410 - Browse repository at this point
Copy the full SHA c1d0410View commit details -
Rollup merge of rust-lang#126136 - Noratrieb:bootstrap-naming, r=onur…
…-ozkan Call the target libdir target libdir Because it's the target libdir. `--print` uses the same terminology, and it's a simple way to make it obviously different from `$sysroot/lib`.
Configuration menu - View commit details
-
Copy full SHA for b514f52 - Browse repository at this point
Copy the full SHA b514f52View commit details -
Rollup merge of rust-lang#128820 - LYF1999:yf/dev, r=nikic
fix: get llvm type of global val using `LLVMTypeOf` on a global var always return ptr. so create a new function to access the value type of a global
Configuration menu - View commit details
-
Copy full SHA for 9039bcf - Browse repository at this point
Copy the full SHA 9039bcfView commit details -
Rollup merge of rust-lang#129028 - compiler-errors:contra, r=lcnr
`impl_trait_overcaptures`: Don't worry about uncaptured contravariant lifetimes if they outlive a captured lifetime **NOTE:** Review only the first commit carefully. The second one is just moving stuff around, so you can turn whitespace off for that one. This PR relaxes the `impl_trait_overcaptures` lint to not fire in cases like: ```rust struct Ctxt<'tcx>(&'tcx ()); impl<'tcx> Ctxt<'tcx> { fn compute(&self) -> impl Sized + '_ { } } ``` Specifically, the lint will not fire if **all** overcaptured regions (i.e. those which will be captured in edition 2024, which are not captured today) **satisfy**: * The region is contravariant (or bivariant) in the function signature * The region outlives some other region which is captured by the opaque ### The idea behind this Why is this OK? My reasoning is that since the region is contravariant in the function signature, we know that it can be shortened arbitrarily at the call site. And specifically, we know it can be shortened to be equal to one of the regions that it outlives -- that's why we need to prove that it outlives some other region that *is* captured. We could technically relax this further, but there would be (IMO somewhat easy) cases to make this a false negative in real code. For example, if the region is invariant, then we can hit issues like: ```rust struct Ctxt<'tcx>(&'tcx mut &'tcx mut ()); impl<'tcx> Ctxt<'tcx> { fn compute(&self) -> impl Sized + use<'_, 'tcx> { } // We use `use<'_, 'tcx>` to show what happens in edition 2024 } fn test<'a, 'b>(x: &'a Ctxt<'b>, y: &'a Ctxt<'a>) { let results = [x.compute(), y.compute()]; //~^ ERROR lifetime may not live long enough // Since both opaques now capture `'tcx`, this enforces that `'a == 'b`. } ``` ### Is this actually totally fine? There's one case where users might still hit issues, and it's if we turbofish lifetimes directly: ```rust struct Ctxt<'tcx>(&'tcx ()); impl<'tcx> Ctxt<'tcx> { fn compute(&self) -> impl Sized + use<'_, 'tcx> { } } fn test<'a, 'b>(x: &'a Ctxt<'b>, y: &'a Ctxt<'a>) { let results = [Ctxt::<'b>::compute(x), Ctxt::<'a>::compute(y)]; //~^ ERROR lifetime may not live long enough // Since both opaques now capture `'tcx`, this enforces that `'a == 'b`. // Note that we don't shorten `'b` to `'a` since we turbofished it. } ``` ### Well... we should still warn? I kinda don't care about this case, though I guess we could possibly downgrade the lint to something like `IMPL_TRAIT_OVERCAPTURES_STRICT` instead of suppressing it altogether. Thoughts? If we were to do this, then I'd probably also opt to include the invariant case in `IMPL_TRAIT_OVERCAPTURES_STRICT` and move it out of `IMPL_TRAIT_OVERCAPTURES`.
Configuration menu - View commit details
-
Copy full SHA for 8f396e0 - Browse repository at this point
Copy the full SHA 8f396e0View commit details -
Rollup merge of rust-lang#129471 - GuillaumeGomez:sort-impl-associate…
…d-items, r=t-rustdoc-frontend [rustdoc] Sort impl associated items by kinds and then by appearance Following [this zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/.22Freeze.22.20order.20of.20items.20in.20.28trait.29.20impls.3F), I implemented it. This brings the following change: impl associated items will now be grouped by kind and will now be first sorted by kind and then by the order they are declared in the source code (like currently). The kinds are sorted in the following order: 1. Constants 2. Types 3. Functions The reason behind this order is that associated constants can be used in associated types (like length in arrays) and both associated types and associated constants can be used in associated functions. So if an associated item from the same impl is used, its definition will always be above where it's being used. cc `@camelid` r? `@notriddle`
Configuration menu - View commit details
-
Copy full SHA for 36f4539 - Browse repository at this point
Copy the full SHA 36f4539View commit details -
Rollup merge of rust-lang#129706 - compiler-errors:scratch, r=estebank
Rename dump of coroutine by-move-body to be more consistent, fix ICE in dump_mir First, we add a missing match for `DefKind::SyntheticCoroutineBody` in `dump_mir`. Fixes rust-lang#129703. The second commit (directly below) serves as a test. Second, we reorder the `dump_mir` in `coroutine_by_move_body_def_id` to be *after* we adjust the body source, and change the disambiguator so it reads more like any other MIR body. This also serves as a test for the ICE, since we're dumping the MIR of a body with `DefKind::SyntheticCoroutineBody`. Third, we change the parenting of the synthetic MIR body to have the *coroutine-closure* (i.e. async closure) as its parent, so we don't have long strings of `{closure#0}-{closure#0}-{closure#0}`. try-job: test-various
Configuration menu - View commit details
-
Copy full SHA for 41ce7a9 - Browse repository at this point
Copy the full SHA 41ce7a9View commit details -
Rollup merge of rust-lang#129720 - nnethercote:simplify-dest_prop-mm,…
… r=cjgillot Simplify DestProp memory management The DestProp MIR pass has some convoluted memory management. This PR simplifies it. r? ``@davidtwco``
Configuration menu - View commit details
-
Copy full SHA for e590201 - Browse repository at this point
Copy the full SHA e590201View commit details -
Rollup merge of rust-lang#129796 - GuillaumeGomez:unify-code-examples…
…, r=notriddle Unify scraped examples with other code examples Fixes rust-lang#129763. This first PR both fixes rust-lang#129763 but also unifies buttons display for code examples: ![image](https://github.com/user-attachments/assets/c8475945-dcc3-4c25-8d7d-1659f85301c8) You can test it [here](https://rustdoc.crud.net/imperio/unify-code-examples/doc/scrape_examples/fn.test.html) and [here](https://rustdoc.crud.net/imperio/unify-code-examples/doc/scrape_examples/fn.test_many.html). I'm planning to send a follow-up to make the buttons generated in JS directly (or I can do it in this PR directly if you prefer). cc ``@willcrichton`` r? ``@notriddle``
Configuration menu - View commit details
-
Copy full SHA for 3f99c12 - Browse repository at this point
Copy the full SHA 3f99c12View commit details -
Rollup merge of rust-lang#129938 - chancancode:patch-1, r=thomcc
Elaborate on deriving vs implementing `Copy` I was reading this documentation and this wasn't immediately clear to me. In my mind, it seemed obvious that a type can only claim to be `Copy` if the bits it is storing can be `Copy`, and in the case of a generic struct that can only be the case if `T: Copy`. So the bound added by the derive seemed necessary at all times, and I thought what the documentation was trying to say is that the custom implementation allows you to add _additional bounds_. Of course what it was actually trying to point out is that just because you have a generic parameter `T`, it doesn't necessarily mean you are storing the bits of `T`. And if you aren't, it may be the case that your own bits can be copied regardless of whether the bits of `T` can be safely copied. Thought it may be worth elaborating to make that a bit more clear. Haven't tested/didn't try to figure out how to render this locally. Mainly not sure if the `PhantomData` back link is going to just work or need some extra stuff, but I figured someone else probably could just tell.
Configuration menu - View commit details
-
Copy full SHA for 86bd866 - Browse repository at this point
Copy the full SHA 86bd866View commit details -
Rollup merge of rust-lang#129973 - jieyouxu:rework-rmake-stdio, r=Kobzol
run_make_support: rename `Command::stdin` to `stdin_buf` and add `std{in,out,err}` config helpers Previously `Command::stdin` was actually just a stdin buffer helper, but this is different from `std::process::Command::stdin`. This is needlessly confusing, and blocks support to add `std{in,out,err}` config helpers that tests may want to use to e.g. redirect to `/dev/ptmx`.
Configuration menu - View commit details
-
Copy full SHA for 0be10be - Browse repository at this point
Copy the full SHA 0be10beView commit details