| Age | Commit message (Collapse) | Author | Lines |
|
|
|
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
|
|
Escaping quote marks is only needed in attributes, not text.
```console
$ du -hs doc-old/ doc-new/
670M doc-old/
669M doc-new/
```
|
|
To match with the previous commits.
|
|
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug`
follows the pattern used everywhere else: `span_err`, `span_warning`,
etc.
|
|
Because the variant name in `Level` is `Note`, and the `without_error`
suffix is omitted in similar cases like `struct_allow` and
`struct_help`.
|
|
Because the variant name in `Level` is `Note`, and the `without_error`
suffix is omitted in similar cases like `struct_allow` and
`struct_help`.
|
|
Because `span_note_diag` doesn't follow the naming structure used for
the error reporting functions.
|
|
|
|
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.
|
|
|
|
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/
```
|
|
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.
|
|
relationship of Exposed Provenance and Strict Provenance
|
|
|
|
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>
|
|
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).
|
|
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/
```
|
|
- Implement link-arg as an attribute
- Apply suggestions from review
- Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
- Add unstable book entry
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
|
|
There's no such thing as a big section header, so I don't know why the
name was used.
|
|
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.
|
|
This is already covered by the normal unexpected char path.
|
|
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.
|
|
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
|
|
|
|
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`
|
|
rustdoc: Move `AssocItemRender` and `RenderMode` to `html::render`.
They're only used for HTML, so it makes more sense for them to live their.
|
|
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.
|
|
x.py does not support specify multiple --target keywords. The targets must be specified comma separated.
|
|
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
|
|
|
|
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
|
|
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`
|
|
|
|
They're only used for HTML, so it makes more sense for them to live
their.
|
|
|
|
|
|
|