about summary refs log tree commit diff
path: root/compiler/rustc_attr_parsing
AgeCommit message (Collapse)AuthorLines
2025-09-13Rollup merge of #146389 - jdonszelmann:no-std, r=oli-obkJana Dönszelmann-2/+28
Convert `no_std` and `no_core` to the new attribute infrastructure r? ```@oli-obk``` Also added a test for these, since we didn't have any and I was kind of surprised new diagnostics didn't break anything hehe
2025-09-10fixup no_{core,std} handling codeJana Dönszelmann-4/+5
2025-09-10Rollup merge of #146178 - folkertdev:static-align, ↵Matthias Krüger-1/+30
r=jdonszelmann,ralfjung,traviscross Implement `#[rustc_align_static(N)]` on `static`s Tracking issue: https://github.com/rust-lang/rust/issues/146177 ```rust #![feature(static_align)] #[rustc_align_static(64)] static SO_ALIGNED: u64 = 0; ``` We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`. r? `@traviscross`
2025-09-09port `#[no_std]` to the new attribute parsing infrastructureJana Dönszelmann-1/+13
2025-09-09port `#[no_core]` to the new attribute parsing infrastructureJana Dönszelmann-2/+15
2025-09-09allow `#[rustc_align_static(N)]` on `static`sFolkert de Vries-1/+30
We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`.
2025-09-08fixup limit handling codeJana Dönszelmann-23/+27
2025-09-08port `#[pattern_complexity_limit]` to the new attribute parsing infrastructureJana Dönszelmann-1/+30
2025-09-08port `#[type_length_limit]` to the new attribute parsing infrastructureJana Dönszelmann-1/+31
2025-09-08port `#[move_size_limit]` to the new attribute parsing infrastructureJana Dönszelmann-1/+28
2025-09-08port `#[recursion_limit]` to the new attribute parsing infrastructureJana Dönszelmann-3/+78
2025-09-04Rollup merge of #146112 - scrabsha:push-utkysktvulto, r=WaffleLapkinStuart Cook-1/+1
don't uppercase error messages
2025-09-03don't uppercase error messagesSasha Pourcelot-1/+1
a more general version of https://github.com/rust-lang/rust/pull/146080. after a bit of hacking in [`fluent.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_fluent_macro/src/fluent.rs), i discovered that i'm not the only one that is bad at following guidelines :sweat_smile:. this pr lowercases the first letter of all the error messages in the codebase. (i did not change things that are traditionally uppercased such as _MIR_, _ABI_ or _C_) i think it's reasonable to run a `@bors try` so all the test suite is checked, as i cannot run some of the tests on my machine. i double checked (and replaced manually) all the old error messages, but better be safe than sorry. in the future i will try to add a check in `x test tidy` that errors if an error message starts with an uppercase letter.
2025-09-02Revert introduction of `[workspace.dependencies]`.Nicholas Nethercote-1/+1
This was done in #145740 and #145947. It is causing problems for people using r-a on anything that uses the rustc-dev rustup package, e.g. Miri, clippy. This repository has lots of submodules and subtrees and various different projects are carved out of pieces of it. It seems like `[workspace.dependencies]` will just be more trouble than it's worth.
2025-08-30Remove incorrect FIXMEJonathan Brouwer-1/+1
2025-08-28Rollup merge of #145937 - jdonszelmann:doc-hidden-prelude, r=fmeaseGuillaume Gomez-1/+11
add doc-hidden to exports in attribute prelude Seems to fix rust-lang/rust#145870, at least temporarily. The underlying problem of course is still there. r? `@fmease` <img width="653" height="167" alt="image" src="https://github.com/user-attachments/assets/b5a8094c-849e-4328-997d-b772f9aa4088" /> Fixes rust-lang/rust#145870
2025-08-28Improve error messages around invalid literals in attribute argumentsJonathan Brouwer-23/+36
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-28Rollup merge of #143193 - JonathanBrouwer:link_rework, r=jdonszelmannStuart Cook-4/+568
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
2025-08-27Rollup merge of #145826 - scrabsha:push-vrpwttmzqwpt, r=jdonszelmannJacob Pratt-29/+17
Use AcceptContext in AttribueParser::check_target
2025-08-27Port the `#[link]` attribute to the new parserJonathan Brouwer-4/+566
2025-08-27Move `NativeLibKind` from `rustc_session` to `rustc_hir`Jonathan Brouwer-0/+2
2025-08-27add doc-hidden to exports in attribute preludeJana Dönszelmann-1/+11
2025-08-27Use `AcceptContext` in `AttribueParser::check_target`Sasha Pourcelot-29/+17
2025-08-27Add `thin-vec` to newly added `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-26Rollup merge of #145792 - scrabsha:push-umpytyxunpxq, r=jdonszelmannSamuel Tardieu-10/+100
Use attribute name in message for "outer attr used as inner attr" errors
2025-08-25Use attribute name in message for "outer attr used as inner attr" errorsSasha Pourcelot-10/+100
2025-08-24Warn on macro calls for attributes that had this behaviour previouslyJonathan Brouwer-11/+27
2025-08-24fix ICE on stable related to attrs on macrosJana Dönszelmann-29/+12
2025-08-24Port crate name to the new attribute systemJana Dönszelmann-9/+43
2025-08-24Support lints in early attribute parsingJana Dönszelmann-12/+32
2025-08-24Allow errors to be emitted as fatal during attribute parsingJana Dönszelmann-22/+43
2025-08-23port attribute to the new parsing infrastructureJana Dönszelmann-7/+110
2025-08-22Rollup merge of #145762 - jdonszelmann:attrs-strings-to-symbols, r=lqdJacob Pratt-31/+36
convert strings to symbols in attr diagnostics r? `@lcnr` As you rightfully noticed in https://github.com/rust-lang/rust/pull/145670
2025-08-22Rollup merge of #145573 - veluca93:unsafe-force-target-feature, r=davidtwcoJacob Pratt-42/+81
Add an experimental unsafe(force_target_feature) attribute. This uses the feature gate for https://github.com/rust-lang/rust/issues/143352, but is described in https://github.com/rust-lang/rfcs/pull/3820 which is strongly tied to the experiment.
2025-08-22convert strings to symbols in attr diagnosticsJana Dönszelmann-31/+36
2025-08-22Use the new attribute parser throughout the codebaseJonathan Brouwer-26/+55
2025-08-22Rewrite the new attribute parserJonathan Brouwer-232/+291
2025-08-22Move validate_attr to `rustc_attr_parsing`Jonathan Brouwer-1/+408
2025-08-22Add an experimental unsafe(force_target_feature) attribute.Luca Versari-42/+81
This uses the feature gate for https://github.com/rust-lang/rust/issues/143352, but is described in https://github.com/rust-lang/rfcs/pull/3820 which is strongly tied to the experiment.
2025-08-21split up context.rsJana Dönszelmann-329/+359
2025-08-21Introduce a prelude for very common imports across dozens of filesJana Dönszelmann-216/+70
2025-08-21refactor target checking, move out of context.rs and rename MaybeWarn to PolicyJana Dönszelmann-325/+402
2025-08-19Auto merge of #145601 - jieyouxu:rollup-t5mbqhc, r=jieyouxubors-0/+1
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145538 (bufreader::Buffer::backshift: don't move the uninit bytes) - rust-lang/rust#145542 (triagebot: Don't warn no-mentions on subtree updates) - rust-lang/rust#145549 (Update rust maintainers in openharmony.md) - rust-lang/rust#145550 (Avoid using `()` in `derive(From)` output.) - rust-lang/rust#145556 (Allow stability attributes on extern crates) - rust-lang/rust#145560 (Remove unused `PartialOrd`/`Ord` from bootstrap) - rust-lang/rust#145568 (ignore frontmatters in `TokenStream::new`) - rust-lang/rust#145571 (remove myself from some adhoc-groups and pings) - rust-lang/rust#145576 (Add change tracker entry for `--timings`) - rust-lang/rust#145578 (Add VEXos "linked files" support to `armv7a-vex-v5`) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-19Rollup merge of #145556 - JonathanBrouwer:extern-crate-stable, r=jdonszelmann许杰友 Jieyou Xu (Joe)-0/+1
Allow stability attributes on extern crates Fixes https://github.com/rust-lang/rust/issues/145497 r? ``@jdonszelmann``
2025-08-19Rollup merge of #145500 - JonathanBrouwer:must_use_target, r=jdonszelmann许杰友 Jieyou Xu (Joe)-2/+24
Port must_use to the new target checking This PR ports `must_use` to the new target checking logic This also adds a tool-only suggestion to remove attributes on invalid targets, as to not immediately undo the work of https://github.com/rust-lang/rust/pull/145274 r? `@jdonszelmann`
2025-08-19Port `must_use` to the new target checkingJonathan Brouwer-2/+18
2025-08-19Make tool-only suggestion to remove attributes on invalid targetsJonathan Brouwer-0/+6
2025-08-19Rollup merge of #145243 - jdonszelmann:inner-attr-errors, r=petrochenkovStuart Cook-11/+29
take attr style into account in diagnostics when the original attribute was specified as an inner attribute, the suggestion will now match that attribute style
2025-08-18Allow stability attributes on extern cratesJonathan Brouwer-0/+1
2025-08-18Rollup merge of #145485 - JonathanBrouwer:fix-deprecation-targets, ↵Stuart Cook-0/+5
r=jdonszelmann Fix deprecation attributes on foreign statics r? ````````@jdonszelmann```````` Fixes https://github.com/rust-lang/rust/issues/145437