about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-12-02Preparing for merge from rustcRalf Jung-1/+1
2023-12-02Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errorsbors-12/+12
Cleanup error handlers Mostly by making function naming more consistent. More to do after this, but this is enough for one PR. r? compiler-errors
2023-12-01rustdoc: do not escape quotes in body textMichael Howell-8/+50
Escaping quote marks is only needed in attributes, not text. ```console $ du -hs doc-old/ doc-new/ 670M doc-old/ 669M doc-new/ ```
2023-12-02Rename `LayoutCalculator::delay_bug` as `LayoutCalculator::delayed_bug`.Nicholas Nethercote-1/+1
To match with the previous commits.
2023-12-02Rename `HandlerInner::delay_span_bug` as `HandlerInner::span_delayed_bug`.Nicholas Nethercote-5/+5
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug` follows the pattern used everywhere else: `span_err`, `span_warning`, etc.
2023-12-02Rename `*note_without_error` as `*note`.Nicholas Nethercote-1/+1
Because the variant name in `Level` is `Note`, and the `without_error` suffix is omitted in similar cases like `struct_allow` and `struct_help`.
2023-12-02Rename `*note_without_error` as `*note`.Nicholas Nethercote-5/+5
Because the variant name in `Level` is `Note`, and the `without_error` suffix is omitted in similar cases like `struct_allow` and `struct_help`.
2023-12-02Rename `Handler::span_note_diag` as `struct_span_note`.Nicholas Nethercote-1/+1
Because `span_note_diag` doesn't follow the naming structure used for the error reporting functions.
2023-12-01Merge commit 'f0cdee4a3f094416189261481eae374b76792af1' into clippy-subtree-syncPhilipp Krones-1174/+3660
2023-12-01Auto merge of #117472 - jmillikin:stable-c-str-literals, r=Nilstriebbors-26/+22
Stabilize C string literals RFC: https://rust-lang.github.io/rfcs/3348-c-str-literal.html Tracking issue: https://github.com/rust-lang/rust/issues/105723 Documentation PR (reference manual): https://github.com/rust-lang/reference/pull/1423 # Stabilization report Stabilizes C string and raw C string literals (`c"..."` and `cr#"..."#`), which are expressions of type [`&CStr`](https://doc.rust-lang.org/stable/core/ffi/struct.CStr.html). Both new literals require Rust edition 2021 or later. ```rust const HELLO: &core::ffi::CStr = c"Hello, world!"; ``` C strings may contain any byte other than `NUL` (`b'\x00'`), and their in-memory representation is guaranteed to end with `NUL`. ## Implementation Originally implemented by PR https://github.com/rust-lang/rust/pull/108801, which was reverted due to unintentional changes to lexer behavior in Rust editions < 2021. The current implementation landed in PR https://github.com/rust-lang/rust/pull/113476, which restricts C string literals to Rust edition >= 2021. ## Resolutions to open questions from the RFC * Adding C character literals (`c'.'`) of type `c_char` is not part of this feature. * Support for `c"..."` literals does not prevent `c'.'` literals from being added in the future. * C string literals should not be blocked on making `&CStr` a thin pointer. * It's possible to declare constant expressions of type `&'static CStr` in stable Rust (as of v1.59), so C string literals are not adding additional coupling on the internal representation of `CStr`. * The unstable `concat_bytes!` macro should not accept `c"..."` literals. * C strings have two equally valid `&[u8]` representations (with or without terminal `NUL`), so allowing them to be used in `concat_bytes!` would be ambiguous. * Adding a type to represent C strings containing valid UTF-8 is not part of this feature. * Support for a hypothetical `&Utf8CStr` may be explored in the future, should such a type be added to Rust.
2023-12-01Add highlighting for comments in items declarationGuillaume Gomez-8/+14
2023-12-01Rollup merge of #118483 - notriddle:notriddle/fmt-newline, r=GuillaumeGomezTakayuki Maeda-16/+8
rustdoc: `div.where` instead of fmt-newline class This is about equally readable, a lot more terse, and stops special-casing functions and methods. ```console $ du -hs doc-old/ doc-new/ 671M doc-old/ 670M doc-new/ ```
2023-11-30Auto merge of #116892 - ojeda:rethunk, r=wesleywiserbors-0/+25
Add `-Zfunction-return={keep,thunk-extern}` option This is intended to be used for Linux kernel RETHUNK builds. With this commit (optionally backported to Rust 1.73.0), plus a patched Linux kernel to pass the flag, I get a RETHUNK build with Rust enabled that is `objtool`-warning-free and is able to boot in QEMU and load a sample Rust kernel module. Issue: https://github.com/rust-lang/rust/issues/116853.
2023-11-30move exposed-provenance APIs into separate feature gate and explain the ↵Ralf Jung-7/+7
relationship of Exposed Provenance and Strict Provenance
2023-11-30Fix cg_gcc CI runGuillaume Gomez-7/+8
2023-11-30Add `-Zfunction-return={keep,thunk-extern}` optionMiguel Ojeda-0/+25
This is intended to be used for Linux kernel RETHUNK builds. With this commit (optionally backported to Rust 1.73.0), plus a patched Linux kernel to pass the flag, I get a RETHUNK build with Rust enabled that is `objtool`-warning-free and is able to boot in QEMU and load a sample Rust kernel module. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2023-11-30Auto merge of #118448 - ZetaNumbers:link_arg_attribute, r=petrochenkovbors-0/+21
Enable `link-arg` link kind inside of `#[link]` attribute https://github.com/rust-lang/rust/issues/99427#issuecomment-1234443468 > ... > This would help to make `link-arg` usable in `#[link]` attributes and e.g. wrap libc and libgcc into a group (*) in the libc crate like > > ``` > #[link(kind = "link-arg", name = "--start-group")] > #[link(kind = "static", name = "c")] > #[link(kind = "static", name = "gcc")] > #[link(kind = "link-arg", name = "--end-group")] > ``` > > (*) to address cyclic dependencies between them > > This is an analogue of CMake's LINKER: prefix (https://cmake.org/cmake/help/git-stage/command/target_link_options.html#handling-compiler-driver-differences), and was discussed as a possible future extension in the link modifier RFC (https://github.com/rust-lang/rfcs/blob/master/text/2951-native-link-modifiers.md#support-linkarg--string-in-addition-to-the-modifiers).
2023-11-30rustdoc: `div.where` instead of fmt-newline classMichael Howell-16/+8
This is about equally readable, a lot more terse, and stops special-casing functions and methods. ```console $ du -hs doc-old/ doc-new/ 671M doc-old/ 670M doc-new/ ```
2023-11-30Enable link-arg link kind inside of #[link] attributezetanumbers-0/+21
- Implement link-arg as an attribute - Apply suggestions from review - Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> - Add unstable book entry
2023-11-30Auto merge of #118036 - DianQK:thinlto-tests, r=tmiaskobors-15/+55
Add thinlto support to codegen, assembly and coverage tests Using `--emit=llvm-ir` with thinlto usually result in multiple IR files. Resolve test case failure issue reported in #113923.
2023-11-30give macOS some extra time, it needs thatRalf Jung-1/+1
2023-11-30move some validity-related tests into subdirRalf Jung-8/+8
2023-11-30move 'uninit' tests into common directoryRalf Jung-2/+4
2023-11-30Add thinlto support to codegen, assembly and coverage testsDianQK-15/+55
2023-11-30Merge from rustcRalf Jung-461/+1311
2023-11-30Preparing for merge from rustcRalf Jung-1/+1
2023-11-30Auto merge of #118473 - matthiaskrgr:rollup-q96bm3u, r=matthiaskrgrbors-36/+27
Rollup of 5 pull requests Successful merges: - #118452 (rustdoc-search: allow spaces around `::` in path query) - #118453 (Tweak message on ADT with private fields building) - #118456 (rustc_span: Remove unused symbols.) - #118458 (rustdoc: remove small from `small-section-header`) - #118464 (Dispose llvm::TargetMachines prior to llvm::Context being disposed) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-30Rollup merge of #118458 - notriddle:notriddle/small-section-header, ↵Matthias Krüger-16/+16
r=GuillaumeGomez rustdoc: remove small from `small-section-header` There's no such thing as a big section header, so I don't know why the name was used.
2023-11-30Rollup merge of #118452 - notriddle:coloncolonspace, r=GuillaumeGomez,jshaMatthias Krüger-20/+11
rustdoc-search: allow spaces around `::` in path query This restriction made sense back when spaces separated function parameters, but now that they separate path components, there's no real ambiguity any more. Additionally, the Rust language allows it. The other two commits are misc code cleanup.
2023-11-30Auto merge of #118408 - RalfJung:aggregate-assign-uninit, r=saethlinbors-0/+42
miri: add test checking that aggregate assignments reset memory to uninit Also, `write_aggregate` is really just a helper for evaluating `Aggregate` rvalues, so it should be in `step.rs`, not `place.rs`. Also factor out `Repeat` rvalues into their own function while we are at it. r? `@saethlin` Fixes https://github.com/rust-lang/miri/issues/3195
2023-11-29Re-enable `rustc_codegen_gcc` tests in CIJosh Stone-3/+11
2023-11-29rustdoc: remove small from `small-section-header`Michael Howell-16/+16
There's no such thing as a big section header, so I don't know why the name was used.
2023-11-29rustdoc-search: replace TAB/NL/LF with SP firstMichael Howell-10/+6
This way, most of the parsing code doesn't need to be designed to handle it, since they should always be treated exactly the same anyhow.
2023-11-29rustdoc-search: removed dead parser codeMichael Howell-2/+0
This is already covered by the normal unexpected char path.
2023-11-29rustdoc-search: allow `:: ` and ` ::`Michael Howell-8/+5
This restriction made sense back when spaces separated function parameters, but now that they separate path components, there's no real ambiguity any more. Additionally, the Rust language allows it.
2023-11-29Auto merge of #118132 - onur-ozkan:stdlib-assertion-status-to-compiletest, ↵bors-2/+12
r=wesleywiser utilize stdlib debug assertion status in compiletest Implemented a new flag `--with-debug-assertions` on compiletest to pass the stdlib debug assertion status from bootstrap. Resolves #115171
2023-11-29jobserver: check file descriptorsbelovdv-0/+8
2023-11-29Rollup merge of #118438 - AkhilTThomas:patch-1, r=JohnTitorMatthias Krüger-4/+2
Update nto-qnx.md x.py does not support specifying multiple `--target` keywords. The targets must be specified comma separated. Error: `error: the argument '--target <TARGET>' cannot be used multiple times`
2023-11-29Rollup merge of #118428 - aDotInTheVoid:doc-cleanup, r=GuillaumeGomezMatthias Krüger-20/+21
rustdoc: Move `AssocItemRender` and `RenderMode` to `html::render`. They're only used for HTML, so it makes more sense for them to live their.
2023-11-29Rollup merge of #118157 - Nadrieril:never_pat-feature-gate, r=compiler-errorsMatthias Krüger-4/+14
Add `never_patterns` feature gate This PR adds the feature gate and most basic parsing for the experimental `never_patterns` feature. See the tracking issue (https://github.com/rust-lang/rust/issues/118155) for details on the experiment. `@scottmcm` has agreed to be my lang-team liaison for this experiment.
2023-11-29Update nto-qnx.mdAkhilTThomas-4/+2
x.py does not support specify multiple --target keywords. The targets must be specified comma separated.
2023-11-29Auto merge of #118433 - matthiaskrgr:rollup-fi9lrwg, r=matthiaskrgrbors-12/+12
Rollup of 7 pull requests Successful merges: - #116839 (Implement thread parking for xous) - #118265 (remove the memcpy-on-equal-ptrs assumption) - #118269 (Unify `TraitRefs` and `PolyTraitRefs` in `ValuePairs`) - #118394 (Remove HIR opkinds) - #118398 (Add proper cfgs in std) - #118419 (Eagerly return `ExprKind::Err` on `yield`/`await` in wrong coroutine context) - #118422 (Fix coroutine validation for mixed panic strategy) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-29explain tests that disable the provenance GCRalf Jung-0/+9
2023-11-29Rollup merge of #118425 - weihanglo:update-cargo, r=weihangloMatthias Krüger-0/+0
Update cargo 7 commits in 9b13310ca596020a737aaa47daa4ed9ff8898a2f..26333c732095d207aa05932ce863d850fb309386 2023-11-24 16:20:51 +0000 to 2023-11-28 20:07:39 +0000 - docs: link to the packages lint table from the related workspace table (rust-lang/cargo#13057) - Add more doc comments for gc changes. (rust-lang/cargo#13055) - docs: Provide pointers for MSRV (rust-lang/cargo#13056) - Fixed typo in SemVer Compatibility documentation page (rust-lang/cargo#13054) - refactor: use custom error instead of anyhow (rust-lang/cargo#13050) - review and remove ignored tests in rustfix (rust-lang/cargo#13047) - docs: add doc comments for rustfix (rust-lang/cargo#13048) r? ghost
2023-11-29Rollup merge of #118394 - nnethercote:rm-hir-Ops, r=cjgillotMatthias Krüger-12/+12
Remove HIR opkinds `hir::BinOp`, `hir::BinOpKind`, and `hir::UnOp` are identical to `ast::BinOp`, `ast::BinOpKind`, and `ast::UnOp`, respectively. This seems silly, so this PR removes the HIR ones. (A re-export lets the AST ones be referred to using a `hir::` qualifier, which avoids renaming churn.) r? `@cjgillot`
2023-11-29Add `never_patterns` feature gateNadrieril-4/+14
2023-11-29rustdoc: Move `AssocItemRender` and `RenderMode` to `html::render`.Alona Enraght-Moony-20/+21
They're only used for HTML, so it makes more sense for them to live their.
2023-11-28Use a u64 for the rmeta root positionBen Kimock-8/+13
2023-11-28Remove Stacked Borrows GC heuristicsBen Kimock-13/+7
2023-11-28Update cargoWeihang Lo-0/+0