| Age | Commit message (Collapse) | Author | Lines |
|
Improve error messages around invalid literals in attribute arguments
r? `@jdonszelmann`
This previously created two errors, which is a bit ugly and the second one didn't add any value
Blocked on https://github.com/rust-lang/rust/pull/143193
|
|
CFI: Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`
Fix rust-lang/rust#142284 by ensuring that `#![no_builtins]` crates can still emit bitcode when proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto) is used.
|
|
Add new `doc(attribute = "...")` attribute
Fixes rust-lang/rust#141123.
The implementation and purpose of this new `#[doc(attribute = "...")]` attribute is very close to `#[doc(keyword = "...")]`. Which means that luckily for us, most of the code needed was already in place and `@Noratrieb` nicely wrote a first draft that helped me implement this new attribute very fast.
Now with all this said, there is one thing I didn't do yet: adding a `rustdoc-js-std` test. I added GUI tests with search results for attributes so should be fine but I still plan on adding one for it once documentation for builtin attributes will be written into the core/std libs.
You can test it [here](https://rustdoc.crud.net/imperio/doc-attribute-attribute/foo/index.html).
cc `@Noratrieb` `@Veykril`
|
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
|
|
with namespace
|
|
`is_primitive`, `is_keyword` and `is_attribute` methods
|
|
|
|
Update `icu_list` to 2.0
This updates the `icu_list` crate, which is used for error formatting, from 1.5 to 2.0.
|
|
Disable `integer_to_ptr_transmutes` suggestion for unsized types
This PR disables the machine-applicable `integer_to_ptr_transmutes` lint suggestion for unsized types, as [`std::ptr::with_exposed_provenance`](https://doc.rust-lang.org/std/ptr/fn.with_exposed_provenance.html) requires sized types.
We should probably mention [`std::ptr::from_raw_parts`](https://doc.rust-lang.org/std/ptr/fn.from_raw_parts.html) when it becomes stable.
Related to https://github.com/rust-lang/rust/issues/145935
|
|
No source fixes
This PR started as a fix for a rendering bug that [got noticed in #143661](https://github.com/rust-lang/rust/pull/143661#discussion_r2199109530), but turned into a fix for any rendering bugs related to files with no source.
- Don't add an end column separator after a file with no source
- Add column separator before secondary messages with no source
- Render continuation between no source labels
Before
```
error[E0423]: expected function, tuple struct or tuple variant, found struct `std::collections::HashMap`
╭▸ $DIR/multi-suggestion.rs:17:13
│
LL │ let _ = std::collections::HashMap();
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
╭▸ $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
│
╰ note: `std::collections::HashMap` defined here
╰╴
note: constructor is not visible here due to private fields
╭▸ $SRC_DIR/alloc/src/boxed.rs:LL:COL
│
╰ note: private field
│
╰ note: private field
```
After
```
error[E0423]: expected function, tuple struct or tuple variant, found struct `std::collections::HashMap`
╭▸ $DIR/multi-suggestion.rs:17:13
│
LL │ let _ = std::collections::HashMap();
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰╴
╭▸ $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
│
╰ note: `std::collections::HashMap` defined here
note: constructor is not visible here due to private fields
╭▸ $SRC_DIR/alloc/src/boxed.rs:LL:COL
│
├ note: private field
│
╰ note: private field
```
Note: This PR also makes it so `rustc` and `annotate-snippets` match in these cases
|
|
Port `#[link]` to the new attribute parsing infrastructure
Ports `link` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- rust-lang/rust#145382 (Add assembly test for `-Zreg-struct-return` option)
- rust-lang/rust#145746 (Fix STD build failing for target_os = "espidf")
- rust-lang/rust#145826 (Use AcceptContext in AttribueParser::check_target)
- rust-lang/rust#145894 (Ensure the coordinator thread terminates before its channels drop)
- rust-lang/rust#145946 (Remove unnecessary `[dependencies.unicode-properties]` entries.)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Remove unnecessary `[dependencies.unicode-properties]` entries.
The Cargo style guide says to put dependencies on a single line if they fit.
r? `@jdonszelmann`
|
|
Ensure the coordinator thread terminates before its channels drop
Fixes rust-lang/rust#142949
Explanation: https://github.com/rust-lang/rust/issues/142949#issuecomment-3224573185
|
|
Use AcceptContext in AttribueParser::check_target
|
|
Use captures(address) instead of captures(none) for indirect args
While provenance cannot be captured through these arguments, the address / object identity can.
Fixes https://github.com/rust-lang/rust/issues/137668.
r? `@ghost`
|
|
The Cargo style guide says to put dependencies on a single line if they
fit.
|
|
rustdoc: a few micro-optimizations targeted at build_impl
Unsure if these will be anything substantial, but the first one at least should git rid of quite a few branches, second one unsure if it's worth it.
r? `@GuillaumeGomez`
|
|
|
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
|
|
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#144274 (add Option::reduce)
- rust-lang/rust#145562 (Simplify macro generating ToString implementations for `&…&str`)
- rust-lang/rust#145625 (improve float to_degrees/to_radians rounding comments and impl)
- rust-lang/rust#145740 (Introduce a `[workspace.dependencies`] section in the top-level `Cargo.toml`)
- rust-lang/rust#145885 (Inherit TCC in debuginfo tests on macOS)
- rust-lang/rust#145905 (Stop calling unwrap when format foreign has trailing dollar)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Stop calling unwrap when format foreign has trailing dollar
Fixes rust-lang/rust#137580
|
|
Introduce a `[workspace.dependencies`] section in the top-level `Cargo.toml`
It lets us avoid a lot of repetition of crate versions, etc.
I've just done a few as a start. Many more can be done in follow-ups.
r? `@Kobzol`
|
|
Region inference: Use outlives-static constraints in constraint search
Revise the extra `r: 'static` constraints added upon universe issues to add an explanation, and use that explanation during constraint blame search. This greatly simplifies the region inference logic, which now does not need to reverse-engineer the event that caused a region to outlive `'static`.
This cosmetically changes the output of two UI tests. I blessed them i separate commits with separate motivations, but that can of course be squashed as desired. We probably want that.
The PR was extracted out of rust-lang/rust#130227 and consists of one-third of its functional payload.
r? lcnr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Access less HIR attributes from typeck
Typeck relies on attributes to modify its own behaviour. This is a problem, as this means that `typeck(some function)` may depend on the span and doc-comments of many other functions.
This PR attempts to reduce such accesses to attributes. This yields to a sizeable perf improvement: https://github.com/rust-lang/rust/pull/144841#issuecomment-3153339771
Fixes https://github.com/rust-lang/rust/issues/124352
|
|
Fix #142284 by ensuring that `#![no_builtins]` crates can still emit bitcode
when proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto) is used.
|
|
Rollup of 9 pull requests
Successful merges:
- rust-lang/rust#144499 (ci: Begin running ui tests with `rust.debuginfo-level-tests=1`)
- rust-lang/rust#145790 (Improve dist for gnullvm hosts)
- rust-lang/rust#145792 (Use attribute name in message for "outer attr used as inner attr" errors)
- rust-lang/rust#145840 (rustc_codegen_ssa: More comprehensive RISC-V ELF flags)
- rust-lang/rust#145876 (Enable building/disting standard library in stage 0)
- rust-lang/rust#145887 (bootstrap: Don't panic if codegen-backends is set to empty)
- rust-lang/rust#145888 (platform-support: Fix LoongArch32 host column)
- rust-lang/rust#145892 (add a flag to codegen fn attrs for foreign items)
- rust-lang/rust#145901 (Fix typo in comment of library/alloc/src/raw_vec/mod.rs)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
add a flag to codegen fn attrs for foreign items
r? `@ghost`
refiled to rerun CI
|
|
rustc_codegen_ssa: More comprehensive RISC-V ELF flags
This change implements more conformant, more comprehensive RISC-V ELF flags handling when generating certain object files directly from rustc.
* Use `"zca"` instead of `"c"`
The "Zca" extension (a subset of "C") is the minimal configuration for compressed instructions to set `EF_RISCV_RVC` flag.
* Set TSO flag from `"ztso"`
The "Ztso" extension denotes that the program depends on the RVTSO (Total Store Ordering) memory consistency model, which is stronger than the standard RVWMO (Weak Memory Ordering) consistency model and on ELF targets, we need to set `EF_RISCV_TSO` flag.
|
|
Use attribute name in message for "outer attr used as inner attr" errors
|
|
|
|
|
|
|
|
|
|
r=GuillaumeGomez
GCC backend subtree update
cc `@antoyo`
r? ghost
|
|
|
|
|
|
|
|
subtree-update_cg_gcc_2025-08-26
|