-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 7 pull requests #132005
Rollup of 7 pull requests #132005
Conversation
…to SUMMARY.md for mdBooks
This comes with a big docs rewrite.
stabilize Strict Provenance and Exposed Provenance APIs Given that [RFC 3559](https://rust-lang.github.io/rfcs/3559-rust-has-provenance.html) has been accepted, t-lang has approved the concept of provenance to exist in the language. So I think it's time that we stabilize the strict provenance and exposed provenance APIs, and discuss provenance explicitly in the docs: ```rust // core::ptr pub const fn without_provenance<T>(addr: usize) -> *const T; pub const fn dangling<T>() -> *const T; pub const fn without_provenance_mut<T>(addr: usize) -> *mut T; pub const fn dangling_mut<T>() -> *mut T; pub fn with_exposed_provenance<T>(addr: usize) -> *const T; pub fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T; impl<T: ?Sized> *const T { pub fn addr(self) -> usize; pub fn expose_provenance(self) -> usize; pub fn with_addr(self, addr: usize) -> Self; pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self; } impl<T: ?Sized> *mut T { pub fn addr(self) -> usize; pub fn expose_provenance(self) -> usize; pub fn with_addr(self, addr: usize) -> Self; pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self; } impl<T: ?Sized> NonNull<T> { pub fn addr(self) -> NonZero<usize>; pub fn with_addr(self, addr: NonZero<usize>) -> Self; pub fn map_addr(self, f: impl FnOnce(NonZero<usize>) -> NonZero<usize>) -> Self; } ``` I also did a pass over the docs to adjust them, because this is no longer an "experiment". The `ptr` docs now discuss the concept of provenance in general, and then they go into the two families of APIs for dealing with provenance: Strict Provenance and Exposed Provenance. I removed the discussion of how pointers also have an associated "address space" -- that is not actually tracked in the pointer value, it is tracked in the type, so IMO it just distracts from the core point of provenance. I also adjusted the docs for `with_exposed_provenance` to make it clear that we cannot guarantee much about this function, it's all best-effort. There are two unstable lints associated with the strict_provenance feature gate; I moved them to a new [strict_provenance_lints](rust-lang#130351) feature since I didn't want this PR to have an even bigger FCP. ;) `@rust-lang/opsem` Would be great to get some feedback on the docs here. :) Nominating for `@rust-lang/libs-api.` Part of rust-lang#95228. [FCP comment](rust-lang#130350 (comment))
linkchecker: add a reminder on broken links to add new/renamed pages to `SUMMARY.md` for mdBooks I spent an embarrassingly long amount of time trying to figure out why CI was failing for a PR adding new platform support docs. In turns out it's because the PR author didn't register the new page in `SUMMARY.md`. I completely forgot about it too, and was reading linkchecker source because I thought it was a bug in linkchecker. So this PR adds a note to modify `SUMMARY.md` when adding new pages in a mdBook. E.g. ``` # Adding a new `meow` target but forgor to register the page in `SUMMARY.md` rustc\platform-support.html:183: broken link - `rustc\platform-support\meow.html` rustc\print.html:9730: broken link - `rustc\platform-support\meow.html` checked links in: 19.1s number of HTML files scanned: 43588 number of HTML redirects found: 13735 number of links checked: 3145951 number of links ignored due to external: 156244 number of links ignored due to exceptions: 9 number of intra doc links ignored: 8 errors found: 2 NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md found some broken links ```
test: Add test for trait in FQS cast, issue rust-lang#98565 Closes rust-lang#98565 by adding a test to check for diagnostics when the built-in type `str` is used in a cast where a trait is expected.
… r=jieyouxu Make `rustc_abi` compile on stable again rust-lang#131473 accidentally broke this
…pkin Improve test coverage for `unit_bindings` lint Follow-up to rust-lang#112380, apparently at the time I didn't add much of any test coverage outside of just "generally works as intended on the test suites and in the crater run". r? compiler
…compiler-errors fix coherence error for very large tuples™ see https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/diesel.20error for an in-depth explanation of this issue. We once again specialize `NormalizesTo` goals to avoid the impact of erasing their expected term. fixes rust-lang#131969 r? `@compiler-errors`
…cross update ABI compatibility docs for new option-like rules Documents the rules decided [here](rust-lang#130628 (comment)) for our ABI compatibility rules. Long-term this should be moved to the reference, but for now this is what we got. Cc `@rust-lang/lang` `@rust-lang/opsem`
@bors r+ rollup=never p=7 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: edbd9398dc In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (31e102c): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 0.4%, secondary 0.9%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 781.116s -> 782.781s (0.21%) |
Successful merges:
SUMMARY.md
for mdBooks #131737 (linkchecker: add a reminder on broken links to add new/renamed pages toSUMMARY.md
for mdBooks)rustc_abi
compile on stable again #131997 (Makerustc_abi
compile on stable again)unit_bindings
lint #131999 (Improve test coverage forunit_bindings
lint)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup