Commit graph

25 commits

Author SHA1 Message Date
Guillaume Gomez
34f6f4827d Move remaining doc attribute parsing errors to warnings
(cherry picked from commit c910511cab)
2026-02-05 11:44:34 -08:00
Guillaume Gomez
d8ac42edd1 Make more doc attribute parsing error into future warnings
(cherry picked from commit 6d713489d0)
2026-02-05 11:38:02 -08:00
Guillaume Gomez
9126c7a0b7 Emit a future error warning for duplicate doc attribute
(cherry picked from commit 7dbbab63e2)
2026-02-05 11:36:45 -08:00
bors
b08c11df4b Auto merge of #151162 - GuillaumeGomez:cleanup-attr-parsing, r=JonathanBrouwer
Clean up `rustc_attr_parsing`

Follow-up of rust-lang/rust#150934.

It removes the `Option<>` wrapping for `SharedContext::target` field and completely removed the `target_id` field. Considering this type contains a closure and never updates its `target_id` field, there is no need to keep it around, it can be used directly in the lint emitter.

r? @JonathanBrouwer
2026-01-16 13:03:57 +00:00
Guillaume Gomez
cd7d40d975 Update rustc_attr_parsing::SharedContext::target type from Option<Target> to Target 2026-01-15 15:06:29 +01:00
mejrs
00384df080 Delete MetaItemOrLitParser::Err 2026-01-14 17:47:11 +01:00
Guillaume Gomez
ef1e4e65b7 Move checks from check_doc_attrs directly into rustc_attr_parsing 2026-01-11 18:36:03 +01:00
Jonathan Brouwer
ae39d3d9ab
Improve spans of malformed attribute errors 2025-12-13 17:13:36 +01:00
Jonathan Brouwer
aa6db80ab2
Remove lifetime param from parser functions 2025-12-12 09:02:54 +01:00
Guillaume Gomez
51806323f9 Do not error if there are duplicated doc attributes 2025-12-11 01:35:28 +01:00
Guillaume Gomez
2bc2a0db69 For now, ignore target checking for doc attributes in attr_parsing 2025-12-10 20:18:42 +01:00
Guillaume Gomez
64aaeacd71 Update to new API, allowing to remove check_doc_cfg.rs file from librustdoc 2025-12-10 12:28:08 +01:00
Guillaume Gomez
40907f522d Fix doc alias suggestion 2025-12-10 12:28:08 +01:00
Guillaume Gomez
2340f8054c Update to new lint API 2025-12-10 12:28:07 +01:00
Guillaume Gomez
8d4f59bed7 Clean up code 2025-12-10 12:28:07 +01:00
Guillaume Gomez
4936973d49 Fix ui tests 2025-12-10 12:28:05 +01:00
Guillaume Gomez
e4f57dd4b3 Finish fixing ui tests 2025-12-10 12:27:34 +01:00
Guillaume Gomez
9c8c67bfdd Fix warning messages 2025-12-10 12:27:34 +01:00
Guillaume Gomez
5c47240ad1 Correctly handle doc(test(attr(...))) 2025-12-10 12:27:34 +01:00
Guillaume Gomez
57870b7242 Fix doc(auto_cfg) attribute parsing 2025-12-10 12:27:34 +01:00
Guillaume Gomez
d35ec316c5 Keep a list of CfgEntry instead of just one 2025-12-10 12:27:33 +01:00
Guillaume Gomez
148e522112 Correctly differentiate between sugared and raw doc comments 2025-12-10 12:27:33 +01:00
Guillaume Gomez
04bcd83eb5 Move doc = "" parsing out of DocParser to keep doc attributes order 2025-12-10 12:27:33 +01:00
Guillaume Gomez
acb32df7b1 Continue migration to new Attribute API for doc attribute 2025-12-10 12:27:33 +01:00
Jana Dönszelmann
df007cf800 rewrite doc attribute (non-doc-comments) 2025-12-10 12:27:33 +01:00