about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-09-22Add more test cases for block-no-opening-bracePavel Grigorenko-12/+48
2024-09-22Auto merge of #130709 - RalfJung:miri-sync, r=RalfJungbors-2149/+2200
Miri subtree update r? `@ghost`
2024-09-22Auto merge of #3852 - tiif:rwrefactor, r=RalfJungbors-153/+249
Refactor fd read/write This PR passed the responsibility of reading to user supplied buffer and dest place to each implementation of ``FileDescription::read/write/pread/pwrite``. This is part of #3665.
2024-09-22simplify eventfd handling a bitRalf Jung-49/+30
2024-09-22remove some unnecessary to_ownedRalf Jung-9/+9
2024-09-22read, write: move cast-to-usize logic up and deduplicate itRalf Jung-4/+6
2024-09-22further tweak FileDescription commentsRalf Jung-17/+12
2024-09-22Pass pointer and len to FileDescription::write and change the type of len in ↵tiif-47/+60
read to usize
2024-09-22Use &[u8] instead of Vec<u8> and improve docstiif-13/+25
2024-09-22Auto merge of #130697 - bjoernager:const-char-make-ascii, r=dtolnaybors-2/+4
Mark `char::make_ascii_uppercase` and `char::make_ascii_lowercase` as const. Relevant tracking issue: #130698 The `make_ascii_uppercase` and `make_ascii_lowercase` methods in `char` should be marked "const." With the stabilisation of [`const_mut_refs`](https://github.com/rust-lang/rust/issues/57349/), this simply requires adding the `const` specifier to the function signatures.
2024-09-22Mark 'make_ascii_uppercase' and 'make_ascii_lowercase' in 'char' as const;Gabriel Bjørnager Jensen-2/+4
2024-09-22Auto merge of #3903 - RalfJung:auto-prs, r=RalfJungbors-0/+3
try to give the CI job permission to create PRs See the discussion [here](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/did.20github.20token.20permissions.20change.3F). `@rust-lang/infra` just a heads-up that we are doing this -- I have no idea if this could cause any issues elsewhere, or if it is important that we limit the permissions here somehow, or so.
2024-09-22try to give the CI job permission to create PRsRalf Jung-0/+3
2024-09-22Auto merge of #130689 - RalfJung:rustc_nonnull_optimization_guaranteed, ↵bors-4/+8
r=jieyouxu fix rustc_nonnull_optimization_guaranteed docs As far as I can tell, even back when this was [added](https://github.com/rust-lang/rust/pull/60300) it never *enabled* any optimizations. It just indicates that the FFI compat lint should accept those types for NPO.
2024-09-22fix rustc_nonnull_optimization_guaranteed docsRalf Jung-4/+8
2024-09-22Auto merge of #130688 - workingjubilee:rollup-ovre6p7, r=workingjubileebors-44/+247
Rollup of 5 pull requests Successful merges: - #130648 (move enzyme flags from general cargo to rustc-specific cargo) - #130650 (Fixup Apple target's description strings) - #130664 (Generate line numbers for non-rust code examples as well) - #130665 (Prevent Deduplication of `LongRunningWarn`) - #130669 (tests: Test that `extern "C" fn` ptrs lint on slices) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-22Auto merge of #3902 - RalfJung:rustup, r=RalfJungbors-746/+2412
Rustup
2024-09-22rustfmt: switch over to setting style_editionRalf Jung-1/+1
2024-09-22Merge from rustcRalf Jung-744/+2410
2024-09-22Preparing for merge from rustcRalf Jung-1/+1
2024-09-21Rollup merge of #130669 - workingjubilee:slicing-fnptr-tests-finely, ↵Jubilee-0/+25
r=compiler-errors tests: Test that `extern "C" fn` ptrs lint on slices This seems to have slipped past the `improper_ctypes_definitions` lint at some point. I found similar tests but not one with this exact combination, so test the semi-unique combination.
2024-09-21Rollup merge of #130665 - veera-sivarajan:fix-118612, r=compiler-errorsJubilee-1/+126
Prevent Deduplication of `LongRunningWarn` Fixes #118612 As mention in the issue, `LongRunningWarn` is meant to be repeated multiple times. Therefore, this PR stores a unique number in every instance of `LongRunningWarn` so that it's not hashed into the same value and omitted by the deduplication mechanism.
2024-09-21Rollup merge of #130664 - GuillaumeGomez:generate-line-numbers-on-non-rust, ↵Jubilee-19/+74
r=notriddle Generate line numbers for non-rust code examples as well Currently, the "enable line numbers" setting only generated it for rust code examples. Found this limitation a bit strange so I decided to remove it. You can test it [here](https://rustdoc.crud.net/imperio/generate-line-number-non-rust/doc/lib2/sub_mod/struct.Foo.html). r? ``@notriddle``
2024-09-21Rollup merge of #130650 - BlackHoleFox:apple-target-desc-consistency, r=jieyouxuJubilee-18/+18
Fixup Apple target's description strings Noticed this inconsistency in how the Apple target's had their new descriptions written while looking at https://github.com/rust-lang/rust/pull/130614, and figured it was easy enough to fixup shortly. I think prefixing every OS with `Apple` is clearer, especially for less known ones like `visionOS` and `watchOS`; so that's what was done here along with making the architecture names more consistent and then some other small tweaks. ~~r​? `@thomcc~~` cc `@madsmtm`
2024-09-21Rollup merge of #130648 - onur-ozkan:enzyme-linking, r=KobzolJubilee-6/+4
move enzyme flags from general cargo to rustc-specific cargo Resolves #130637.
2024-09-22Auto merge of #130446 - durin42:llvm-20-fix-CommandLineArgs, r=workingjubileebors-1/+19
rustc_llvm: adapt to flattened CLI args in LLVM This changed in llvm/llvm-project@e190d074a0a77c9f8a7d7938a8187a7e2076e290. I decided to stick with more duplication between the ifdef blocks to make the code easier to read for the next two years before we can plausibly drop LLVM 19. `@rustbot` label: +llvm-main try-job: x86_64-msvc
2024-09-22Auto merge of #130246 - dianne:issue-97589-fix, r=petrochenkovbors-3/+31
rustc_expand: remember module `#[path]`s during expansion During invocation collection, if a module item parsed from a `#[path]` attribute needed a second pass after parsing, its path wouldn't get added to the file path stack, so cycle detection broke. This checks the `#[path]` in such cases, so that it gets added appropriately. I think it should work identically to the case for external modules that don't need a second pass, but I'm not 100% sure. Fixes #97589
2024-09-22Auto merge of #130337 - BoxyUwU:anon_const_macro_call, r=camelidbors-28/+210
Fix anon const def-creation when macros are involved take 2 Fixes #130321 There were two cases that #129137 did not handle correctly: - Given a const argument `Foo<{ bar!() }>` in which `bar!()` expands to `N`, we would visit the anon const and then visit the `{ bar() }` expression instead of visiting the macro call. This meant that we would build a def for the anon const as `{ bar!() }` is not a trivial const argument as `bar!()` is not a path. - Given a const argument `Foo<{ bar!() }>` is which `bar!()` expands to `{ qux!() }` in which `qux!()` expands to `N`, it should not be considered a trivial const argument as `{{ N }}` has two pairs of braces. If we only looked at `qux`'s expansion it would *look* like a trivial const argument even though it is not. We have to track whether we have "unwrapped" a brace already when recursing into the expansions of `bar`/`qux`/any macro r? `@camelid`
2024-09-22Add GUI regression test for non-rust code blocks line numbersGuillaume Gomez-7/+60
2024-09-22Generate line numbers for non-rust code examples as wellGuillaume Gomez-7/+9
2024-09-22Strip last backline from non-rust code examplesGuillaume Gomez-5/+5
2024-09-21Auto merge of #130674 - compiler-errors:rollup-yu105fl, r=compiler-errorsbors-455/+2213
Rollup of 8 pull requests Successful merges: - #127766 (add `extern "C-cmse-nonsecure-entry" fn` ) - #129629 (Implement Return Type Notation (RTN)'s path form in where clauses) - #130408 (Avoid re-validating UTF-8 in `FromUtf8Error::into_utf8_lossy`) - #130651 (Add --enable-profiler to armhf dist) - #130653 (ABI compatibility: mention Result guarantee) - #130666 (Assert that `explicit_super_predicates_of` and `explicit_item_super_predicates` truly only contains bounds for the type itself) - #130667 (compiler: Accept "improper" ctypes in extern "rust-cold" fn) - #130673 (Parser: recover from `:::` to `::`) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-21Handle macro calls in anon const def creation take 2Boxy-28/+210
2024-09-21Rollup merge of #130673 - GrigorenkoPV:path-triple-colon, r=compiler-errorsMichael Goulet-16/+366
Parser: recover from `:::` to `::` Closes #130613
2024-09-21Rollup merge of #130667 - workingjubilee:she-is-c-c-c-cold, r=compiler-errorsMichael Goulet-1/+18
compiler: Accept "improper" ctypes in extern "rust-cold" fn
2024-09-21Rollup merge of #130666 - compiler-errors:super-bounds, r=fee1-dead,fmeaseMichael Goulet-25/+85
Assert that `explicit_super_predicates_of` and `explicit_item_super_predicates` truly only contains bounds for the type itself We distinguish _implied_ predicates (anything that is implied from elaborating a trait bound) from _super_ predicates, which are are the subset of implied predicates that share the same self type as the trait predicate we're elaborating. This was originally done in #107614, which fixed a large class of ICEs and strange errors where the compiler expected the self type of a trait predicate not to change when elaborating super predicates. Specifically, super predicates are special for various reasons: they're the valid candidates for trait upcasting, are the only predicates we elaborate when doing closure signature inference, etc. So making sure that we get this list correct and don't accidentally "leak" any other predicates into this list is quite important. This PR adds some debug assertions that we're in fact not doing so, and it fixes an oversight in the effect desugaring rework.
2024-09-21Rollup merge of #130653 - RalfJung:result-abi-compat, r=traviscrossMichael Goulet-0/+2
ABI compatibility: mention Result guarantee This has been already documented in https://doc.rust-lang.org/std/result/index.html#representation, but for `Option` we mirrored those docs in the "ABI compatibility" section, so let's do the same here. Cc ``@workingjubilee`` ``@rust-lang/lang``
2024-09-21Rollup merge of #130651 - qwertynerd97:patch-1, r=KobzolMichael Goulet-1/+1
Add --enable-profiler to armhf dist Adds the --enable-profiler flag to the RUST_CONFIGURE_ARGS for armhf distribution for Linux. This enables running coverage for tests in builds for this target try-job: dist-armhf-linux
2024-09-21Rollup merge of #130408 - okaneco:into_lossy_refactor, r=NoratriebMichael Goulet-1/+63
Avoid re-validating UTF-8 in `FromUtf8Error::into_utf8_lossy` Part of the unstable feature `string_from_utf8_lossy_owned` - #129436 Refactor `FromUtf8Error::into_utf8_lossy` to copy valid UTF-8 bytes into the buffer, avoiding double validation of bytes. Add tests that mirror the `String::from_utf8_lossy` tests.
2024-09-21Rollup merge of #129629 - compiler-errors:rtn-in-path, r=jackh726Michael Goulet-229/+1493
Implement Return Type Notation (RTN)'s path form in where clauses Implement return type notation (RTN) in path position for where clauses. We already had RTN in associated type position ([e.g.](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=627a4fb8e2cb334863fbd08ed3722c09)), but per [the RFC](https://rust-lang.github.io/rfcs/3654-return-type-notation.html#where-rtn-can-be-used-for-now): > As a standalone type, RTN can only be used as the Self type of a where-clause [...] Specifically, in order to enable code like: ```rust trait Foo { fn bar() -> impl Sized; } fn is_send(_: impl Send) {} fn test<T>() where T: Foo, T::bar(..): Send, { is_send(T::bar()); } ``` * In the resolver, when we see a `TyKind::Path` whose final segment is `GenericArgs::ParenthesizedElided` (i.e. `(..)`), resolve that path in the *value* namespace, since we're looking for a method. * When lowering where clauses in HIR lowering, we first try to intercept an RTN self type via `lower_ty_maybe_return_type_notation`. If we find an RTN type, we lower it manually in a way that respects its higher-ranked-ness (see below) and resolves to the corresponding RPITIT. Anywhere else, we'll emit the same "return type notation not allowed in this position yet" error we do when writing RTN in every other position. * In `resolve_bound_vars`, we add some special treatment for RTN types in where clauses. Specifically, we need to add new lifetime variables to our binders for the early- and late-bound vars we encounter on the method. This implements the higher-ranked desugaring [laid out in the RFC](https://rust-lang.github.io/rfcs/3654-return-type-notation.html#converting-to-higher-ranked-trait-bounds). This PR also adds a bunch of tests, mostly negative ones (testing error messages). In a follow-up PR, I'm going to mark RTN as no longer incomplete, since this PR basically finishes the impl surface that we should initially stabilize, and the RFC was accepted. cc [RFC 3654](https://github.com/rust-lang/rfcs/pull/3654) and https://github.com/rust-lang/rust/issues/109417
2024-09-21Rollup merge of #127766 - folkertdev:c-cmse-nonsecure-entry, r=jackh726Michael Goulet-182/+185
add `extern "C-cmse-nonsecure-entry" fn` tracking issue #75835 in https://github.com/rust-lang/rust/issues/75835#issuecomment-1183517255 it was decided that using an abi, rather than an attribute, was the right way to go for this feature. This PR adds that ABI and removes the `#[cmse_nonsecure_entry]` attribute. All relevant tests have been updated, some are now obsolete and have been removed. Error 0775 is no longer generated. It contains the list of targets that support the CMSE feature, and maybe we want to still use this? right now a generic "this abi is not supported on this platform" error is returned when this abi is used on an unsupported platform. On the other hand, users of this abi are likely to be experienced rust users, so maybe the generic error is good enough.
2024-09-21Parser: recover from `:::` to `::` in delegationsPavel Grigorenko-1/+127
2024-09-21Parser: recover from `:::` to `::`Pavel Grigorenko-15/+239
2024-09-21tests: Test that `extern "C" fn` ptrs lint on slicesJubilee Young-0/+25
2024-09-21Don't elaborate effects predicates into bounds list unless we're actually ↵Michael Goulet-15/+9
collecting implied bounds, not super bounds
2024-09-21Assert that explicit_super_predicates_of and explicit_item_bounds truly only ↵Michael Goulet-10/+76
bounds for the type itself
2024-09-21Auto merge of #127546 - workingjubilee:5-level-paging-exists, r=saethlinbors-120/+103
Correct outdated object size limit The comment here about 48 bit addresses being enough was written in 2016 but was made incorrect in 2019 by 5-level paging, and then persisted for another 5 years before being noticed and corrected. The bolding of the "exclusive" part is merely to call attention to something I missed when reading it and doublechecking the math. try-job: i686-msvc try-job: test-various
2024-09-21compiler: Accept "improper" ctypes in extern "rust-cold" fnJubilee Young-1/+18
2024-09-21Fixup Apple target's description stringsBlackHoleFox-18/+18
2024-09-21Prevent Deduplication of `LongRunningWarn`Veera-2/+83