about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-24Auto merge of #132099 - matthiaskrgr:rollup-myi94r8, r=matthiaskrgrbors-204/+156
Rollup of 5 pull requests Successful merges: - #129248 (Taking a raw ref (`&raw (const|mut)`) of a deref of pointer (`*ptr`) is always safe) - #131906 (rustdoc: adjust spacing and typography in header) - #132084 (Consider param-env candidates even if they have errors) - #132096 (Replace an FTP link in comments with an equivalent HTTPS link) - #132098 (rustc_feature::Features: explain what that 'Option<Symbol>' is about) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-24Rollup merge of #132098 - RalfJung:features-since, r=jieyouxuMatthias Krüger-0/+6
rustc_feature::Features: explain what that 'Option<Symbol>' is about
2024-10-24Rollup merge of #132096 - Zalathar:ftp-link, r=jieyouxuMatthias Krüger-1/+1
Replace an FTP link in comments with an equivalent HTTPS link Modern browsers and editors often don't support following FTP links, so using an ordinary web link gives the same result in a more convenient way.
2024-10-24Rollup merge of #132084 - compiler-errors:param-env-with-err, r=lcnr,estebankMatthias Krüger-104/+50
Consider param-env candidates even if they have errors I added this logic in https://github.com/rust-lang/rust/pull/106309, but frankly I don't know why -- the logic was a very large hammer. It seems like recent changes to error tainting has made that no longer necessary. Ideally we'd rework the way we handle error reporting in all of candidate assembly to be a bit more responsible; we're just suppressing candidates all willy-nilly and it leads to mysterious *other* errors cropping up, like the one that #132082 originally wanted to fix. **N.B.** This has the side-effect of turning a failed resolution like `where Missing: Sized` into a trivial where clause that matches all types, but also I don't think it really matters? I'm putting this up as an alternative to #132082, since that PR doesn't address the case when one desugars the APIT into a regular type param. r? lcnr vibeck
2024-10-24Rollup merge of #131906 - notriddle:notriddle/spacing, r=GuillaumeGomezMatthias Krüger-47/+53
rustdoc: adjust spacing and typography in header Fixes #131589 Preview: https://notriddle.com/rustdoc-html-demo-12/spacing/std/index.html | Before | After | |--|--| | ![image](https://github.com/user-attachments/assets/b5c5132d-1e5e-402e-ba19-1dea9e70ea6f) | ![image](https://github.com/user-attachments/assets/72570b93-bb16-4553-9da7-fc4f29b98873) | ![image](https://github.com/user-attachments/assets/264983f0-5aec-4120-8a03-f62e52d4360d) | ![image](https://github.com/user-attachments/assets/b6925945-95e6-4858-8e91-4cfd90c164f0) | ![image](https://github.com/user-attachments/assets/df96bfe7-195d-4aaf-97f1-a45ade34cab2) | ![image](https://github.com/user-attachments/assets/c6fe2d57-bd8a-42aa-b3cf-4f635809b9b4) | ![image](https://github.com/user-attachments/assets/7519faa5-d6b2-41ba-9d95-6000d1dd89d1) | ![image](https://github.com/user-attachments/assets/7233c2d6-82d9-4820-bb63-dc4776a34601) First of all, we put 4px additional margin below the search box, and 4px margin below the header to balance it out. The bigger problem we have to solve is making the lines look logically spaced. This is troublesome, because Fira Sans (the typeface we use here) wants to look good on average, and to avoid breaking, with text that uses [ascenders and descenders](https://www.w3.org/TR/css-inline-3/images/text-edge.png). If the text we're putting in happens to not have any, things look weird (strictly speaking, there’s hand-tuning here, because the Copy Path button messes with stuff, but the overall point is that there is no true, one perfect layout). In order to play nicely with the font, I've tweaked the text to use that space. The word "Source" for the link is now capitalized, and the Since version number now uses oldstyle nums with descenders.
2024-10-24Rollup merge of #129248 - compiler-errors:raw-ref-deref, r=nnethercoteMatthias Krüger-52/+46
Taking a raw ref (`&raw (const|mut)`) of a deref of pointer (`*ptr`) is always safe T-opsem decided in https://github.com/rust-lang/reference/pull/1387 that `*ptr` is only unsafe if the place is accessed. This means that taking a raw ref of a deref expr is always safe, since it doesn't constitute a read. This also relaxes the `DEREF_NULLPTR` lint to stop warning in the case of raw ref of a deref'd nullptr, and updates its docs to reflect that change in the UB specification. This does not change the behavior of `addr_of!((*ptr).field)`, since field projections still require the projection is in-bounds. I'm on the fence whether this requires an FCP, since it's something that is guaranteed by the reference you could ostensibly call this a bugfix since we were counting truly safe operations as unsafe. Perhaps someone on opsem has a strong opinion? cc `@rust-lang/opsem`
2024-10-24rustc_feature::Features: explain what that 'Option<Symbol>' is aboutRalf Jung-0/+6
2024-10-24Replace an FTP link in comments with an equivalent HTTPS linkZalathar-1/+1
2024-10-24Auto merge of #131951 - notriddle:notriddle/sha256-compile-time, ↵bors-14/+58
r=GuillaumeGomez rustdoc: hash assets at rustdoc build time Since sha256 is slow enough to show up on small benchmarks, we can save time by embedding the hash in the executable. Addresses https://github.com/rust-lang/rust/pull/131934#issuecomment-2424213861
2024-10-24Auto merge of #132094 - Zalathar:rollup-5r1ppqt, r=Zalatharbors-586/+619
Rollup of 10 pull requests Successful merges: - #130225 (Rename Receiver -> LegacyReceiver) - #131169 (Fix `target_vendor` in QNX Neutrino targets) - #131623 (misc cleanups) - #131756 (Deeply normalize `TypeTrace` when reporting type error in new solver) - #131898 (minor `*dyn` cast cleanup) - #131909 (Prevent overflowing enum cast from ICEing) - #131930 (Don't allow test revisions that conflict with built in cfgs) - #131956 (coverage: Pass coverage mappings to LLVM as separate structs) - #132076 (HashStable for rustc_feature::Features: stop hashing compile-time constant) - #132088 (Print safety correctly in extern static items) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-24Rollup merge of #132088 - compiler-errors:extern-static, r=jieyouxuStuart Cook-1/+18
Print safety correctly in extern static items Fixes #132080 r? spastorino or anyone really
2024-10-24Rollup merge of #132076 - RalfJung:feature-hashing, ↵Stuart Cook-6/+1
r=nnethercote,Mark-Simulacrum HashStable for rustc_feature::Features: stop hashing compile-time constant It seems like back in https://github.com/rust-lang/rust/commit/542bc75deaaf4e84dcd7a196685bc1a1cb100d32 this was added as "hash the boolean value of each lang feature", but then in https://github.com/rust-lang/rust/commit/1487bd6a174f813967ffff6b3334b4fe296f1f30 this got split into first hashing a sequence of `bool`s (representing all the features) and then hashing all the feature names... but the list of feature names is a compile-time constant, so it seems entirely unnecessary to hash them? Cc `@Mark-Simulacrum` who wrote the second of the commits mentioned above. Cc `@nnethercote`
2024-10-24Rollup merge of #131956 - Zalathar:llvm-counters, r=compiler-errors,SwatinemStuart Cook-444/+220
coverage: Pass coverage mappings to LLVM as separate structs Instead of trying to cram *N* different kinds of coverage mapping data into a single list for FFI, pass *N* different lists of simpler structs. This avoids the need to fill unused fields with dummy values, and avoids the need to tag structs with their underlying kind. It also lets us call the dedicated LLVM constructors for each different mapping type, instead of having to go through the complex general-purpose constructor. Even though this adds multiple new structs to the FFI surface area, the resulting C++ code is simpler and shorter. --- I've structured this mostly as a single atomic patch, rather than a series of incremental changes, because that avoids the need to make fiddly fixes to code that is about to be deleted anyway.
2024-10-24Rollup merge of #131930 - clubby789:revision-cfg-collide, r=jieyouxuStuart Cook-2/+24
Don't allow test revisions that conflict with built in cfgs Fixes #128964 Sorry `@heysujal` I started working on this about 1 minute before your comment by complete coincidence 😅
2024-10-24Rollup merge of #131909 - clubby789:enum-overflow-cast, r=compiler-errorsStuart Cook-3/+76
Prevent overflowing enum cast from ICEing Fixes #131902
2024-10-24Rollup merge of #131898 - lukas-code:ptr-cast-cleanup, r=compiler-errorsStuart Cook-16/+69
minor `*dyn` cast cleanup Small follow-up to https://github.com/rust-lang/rust/pull/130234 to remove a redundant check and clean up comments. No functional changes. Also, explain why casts cannot drop the principal even though coercions can, and add a test because apparently we didn't have one already. r? `@WaffleLapkin` or `@compiler-errors`
2024-10-24Rollup merge of #131756 - compiler-errors:deeply-normalize-type-err, r=lcnrStuart Cook-39/+135
Deeply normalize `TypeTrace` when reporting type error in new solver Normalize the values that come from the `TypeTrace` for various type mismatches. Side-note: We can't normalize the `TypeError` itself bc it may come from instantiated binders, so it may reference values from within the probe... r? lcnr
2024-10-24Rollup merge of #131623 - matthiaskrgr:clippy_sat, r=NadrierilStuart Cook-18/+11
misc cleanups
2024-10-24Rollup merge of #131169 - madsmtm:target-info-nto-vendor, r=wesleywiserStuart Cook-0/+2
Fix `target_vendor` in QNX Neutrino targets The `x86_64-pc-nto-qnx710` and `i586-pc-nto-qnx700` targets have `pc` in their target triple names, but the vendor was set to the default `"unknown"`. CC target maintainers `@flba-eb,` `@gh-tr,` `@jonathanpallant` and `@japaric`
2024-10-24Rollup merge of #130225 - adetaylor:rename-old-receiver, r=wesleywiserStuart Cook-57/+63
Rename Receiver -> LegacyReceiver As part of the "arbitrary self types v2" project, we are going to replace the current `Receiver` trait with a new mechanism based on a new, different `Receiver` trait. This PR renames the old trait to get it out the way. Naming is hard. Options considered included: * HardCodedReceiver (because it should only be used for things in the standard library, and hence is sort-of hard coded) * LegacyReceiver * TargetLessReceiver * OldReceiver These are all bad names, but fortunately this will be temporary. Assuming the new mechanism proceeds to stabilization as intended, the legacy trait will be removed altogether. Although we expect this trait to be used only in the standard library, we suspect it may be in use elsehwere, so we're landing this change separately to identify any surprising breakages. It's known that this trait is used within the Rust for Linux project; a patch is in progress to remove their dependency. This is a part of the arbitrary self types v2 project, https://github.com/rust-lang/rfcs/pull/3519 https://github.com/rust-lang/rust/issues/44874 r? `@wesleywiser`
2024-10-24Deeply normalize type trace in type error reportingMichael Goulet-1/+38
2024-10-24Plumb through param_env to note_type_errMichael Goulet-39/+98
2024-10-24Consider param-env candidates even if they have errorsMichael Goulet-104/+50
2024-10-24Print safety correctly in extern static itemsMichael Goulet-1/+18
2024-10-23rustdoc: adjust spacing and typography in headerMichael Howell-47/+53
2024-10-23Auto merge of #132079 - fmease:rollup-agrd358, r=fmeasebors-317/+738
Rollup of 9 pull requests Successful merges: - #130991 (Vectorized SliceContains) - #131928 (rustdoc: Document `markdown` module.) - #131955 (Set `signext` or `zeroext` for integer arguments on RISC-V and LoongArch64) - #131979 (Minor tweaks to `compare_impl_item.rs`) - #132036 (Add a test case for #131164) - #132039 (Specialize `read_exact` and `read_buf_exact` for `VecDeque`) - #132060 ("innermost", "outermost", "leftmost", and "rightmost" don't need hyphens) - #132065 (Clarify documentation of `ptr::dangling()` function) - #132066 (Fix a typo in documentation of `pointer::sub_ptr()`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-23clone range in a more obvious wayMatthias Krüger-4/+1
2024-10-23fix some manual_mapMatthias Krüger-8/+4
2024-10-23fix a couple clippy:complexitysMatthias Krüger-6/+6
double_parens filter_map_identity needless_question_mark redundant_guards
2024-10-23Rollup merge of #132066 - tifv:ptr-docs-typo, r=AmanieuLeón Orell Valerian Liehr-2/+2
Fix a typo in documentation of `pointer::sub_ptr()` Just a typo in docs.
2024-10-23Rollup merge of #132065 - tifv:dangling-docs, r=NoratriebLeón Orell Valerian Liehr-5/+3
Clarify documentation of `ptr::dangling()` function Also fixes the safety comment in `NonNull::dangling()` function. Fixes #132004.
2024-10-23Rollup merge of #132060 - joshtriplett:innermost-outermost, r=jieyouxuLeón Orell Valerian Liehr-45/+45
"innermost", "outermost", "leftmost", and "rightmost" don't need hyphens These are all standard dictionary words and don't require hyphenation. ----- Encountered an instance of this in error messages and it bugged me, so I figured I'd fix it across the entire codebase.
2024-10-23Rollup merge of #132039 - a1phyr:vecdeque_read_exact, r=NoratriebLeón Orell Valerian Liehr-0/+46
Specialize `read_exact` and `read_buf_exact` for `VecDeque`
2024-10-23Rollup merge of #132036 - DianQK:test-131164, r=jieyouxuLeón Orell Valerian Liehr-0/+26
Add a test case for #131164 The upstream has already been fixed, but it won't be backported to LLVM 19. r? jieyouxu or compiler try-job: x86_64-gnu-stable
2024-10-23Rollup merge of #131979 - compiler-errors:compare-pred-entail, r=fmeaseLeón Orell Valerian Liehr-94/+109
Minor tweaks to `compare_impl_item.rs` 1. Stop using the `InstantiatedPredicates` struct for `hybrid_preds` in `compare_impl_item.rs`, since we never actually push anything into the `spans` part of it. 2. Remove redundant impl args and don't do useless identity substitution, prefer calling `instantiate_identity`.
2024-10-23Rollup merge of #131955 - SpriteOvO:riscv-int-arg-attr, r=workingjubileeLeón Orell Valerian Liehr-168/+468
Set `signext` or `zeroext` for integer arguments on RISC-V and LoongArch64 This PR contains 3 commits: - the first one introduces a new function `adjust_for_rust_abi` in `rustc_target`, and moves the x86 specific adjustment code into it; - the second one adds RISC-V specific adjustment code into it, which sets `signext` or `zeroext` attribute for integer arguments. - **UPDATE**: added the 3rd commit to apply the same adjustment for LoongArch64.
2024-10-23Rollup merge of #131928 - aDotInTheVoid:wait-we-support-this, r=GuillaumeGomezLeón Orell Valerian Liehr-3/+13
rustdoc: Document `markdown` module. Rustdoc markdown handling is currently split between: - html::markdown, which contains all the meaty login - markdown, which is only used for when rustdoc renders a standalone markdown file Adds module-level doc-comment to markdown, and rename the function so it's clear that it's doing IO (instead of just rendering to a string).
2024-10-23Rollup merge of #130991 - LaihoE:vectorized_slice_contains, r=NoratriebLeón Orell Valerian Liehr-0/+26
Vectorized SliceContains Godbolt for the u32 case: https://rust.godbolt.org/z/exT9xYWGs Unsure about: - Should align_to be used? It didn't seem to matter in my benchmark but maybe I was lucky with alignment? - Should u8/i8 also be implemented? Currently uses memchr (SWAR) Some benchmarks on x86 (contains called on an array with no matches, worst case may be slightly worse): ## Large N ![large_n_contains](https://github.com/user-attachments/assets/5be79072-970b-44be-a56c-16dc677dee46) ## Small N ![small_n_contains](https://github.com/user-attachments/assets/b8a33790-c176-459f-84f4-05feee893cd0)
2024-10-23Auto merge of #132070 - fmease:rollup-4i4k587, r=fmeasebors-115/+290
Rollup of 5 pull requests Successful merges: - #131043 (Refactor change detection for rustdoc and download-rustc) - #131181 (Compiletest: Custom differ) - #131487 (Add wasm32v1-none target (compiler-team/#791)) - #132054 (do not remove `.cargo` directory) - #132058 (CI: rfl: use rust-next temporary commit) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-23vectorized SliceContainsLaiho-0/+26
2024-10-23Don't allow test revisions that conflict with built in cfgsclubby789-2/+24
2024-10-23stop hashing compile-time constantRalf Jung-6/+1
2024-10-23Rollup merge of #132058 - adetaylor:use-rust-next-in-ci, r=lqdLeón Orell Valerian Liehr-1/+1
CI: rfl: use rust-next temporary commit Commit c95bbb59a9b22f9b838b15d28319185c1c884329 within rust-next contains some changes required to be compatible with upcoming arbitraty self types work. Roll RFL CI forward to the latest rust-next to include that work. Related: https://github.com/rust-lang/rust/pull/130225 https://github.com/rust-lang/rust/issues/44874 r? ``@ojeda`` try-job: x86_64-rust-for-linux
2024-10-23Rollup merge of #132054 - onur-ozkan:cargo-config, r=KobzolLeón Orell Valerian Liehr-3/+0
do not remove `.cargo` directory If vendoring isn't used bootstrap removes `.cargo` directory, which prevents developers from setting certain options in the `.cargo/config.toml` file. This was introduced in https://github.com/rust-lang/rust/pull/97513 (specifically in [this commit](https://github.com/rust-lang/rust/pull/97513/commits/345eb14f6c841cd38e76a5b0bbf99e1b94a90d40)). Also, since https://github.com/rust-lang/rust/pull/123942, vendoring is now possible even in git sources, which means we shouldn't remove `.cargo` directory in git sources anymore.
2024-10-23Rollup merge of #131487 - graydon:wasm32v1-none, r=alexcrichtonLeón Orell Valerian Liehr-8/+192
Add wasm32v1-none target (compiler-team/#791) This is a preliminary implementation of the MCP discussed in [compiler-team#791](https://github.com/rust-lang/compiler-team/issues/791). It's not especially "major" but you know, process! Anyway it adds a new wasm32v1-none target which just pins down a set of wasm features. I think this is close to the consensus that emerged when discussing it on Zulip so I figured I'd sketch to see how hard it is. Turns out not very.
2024-10-23Rollup merge of #131181 - dev-ardi:custom-differ, r=jieyouxuLeón Orell Valerian Liehr-37/+74
Compiletest: Custom differ This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail. I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it. This is how it looks [with debug info silenced](https://github.com/rust-lang/rust/pull/131182) (#131182) `COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser` ![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
2024-10-23Rollup merge of #131043 - liwagu:unify, r=albertlarsan68,onur-ozkanLeón Orell Valerian Liehr-66/+23
Refactor change detection for rustdoc and download-rustc This pull request refactors the change detection logic in the build process by consolidating redundant code into a new helper method. The key changes include the removal of duplicate logic for checking changes in directories and the addition of a new method to handle this functionality. Refactoring and code simplification: * [`src/bootstrap/src/core/build_steps/tool.rs`](diffhunk://#diff-dc86e288bcf7b3ca3f8c127d3568fbafc785704883bc7fc336bd185910aed5daL588-R593): Removed redundant change detection logic and replaced it with a call to the new `check_for_changes` method. * [`src/bootstrap/src/core/config/config.rs`](diffhunk://#diff-5f5330cfcdb0a89b85ac3547b761c3a45c2534a85c4aaae8fea88c711a7a65b2R2837-R2872): Added a new method `check_for_changes` to centralize the logic for detecting changes in specified directories since a given commit. * [`src/bootstrap/src/core/config/config.rs`](diffhunk://#diff-5f5330cfcdb0a89b85ac3547b761c3a45c2534a85c4aaae8fea88c711a7a65b2L2728-R2740): Updated the existing change detection code to use the new `check_for_changes` method. Cleanup: * [`src/bootstrap/src/core/build_steps/tool.rs`](diffhunk://#diff-dc86e288bcf7b3ca3f8c127d3568fbafc785704883bc7fc336bd185910aed5daL13-R13): Removed the unused import `git` from the helpers module. r? ``@AlbertLarsan68``
2024-10-23More compare_impl_item simplificationsMichael Goulet-76/+95
2024-10-23fix a typo in documentation of pointer::sub_ptr()July Tikhonov-2/+2
2024-10-23fix documentation of ptr::dangling() functionJuly Tikhonov-5/+3