Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
940c67f
feat: exclude refs from deps and stdlib
Young-Flash Mar 29, 2026
f18e474
fix: exclude declartion
Young-Flash Mar 29, 2026
190557a
test: add test case for exclude refs from deps and stdlib
Young-Flash Mar 29, 2026
67fa3a1
internal: auto exclude
Young-Flash Apr 11, 2026
cb666a0
fix: enable vscode suggest in strings
A4-Tacks Apr 11, 2026
5ff216c
internal: update generated lints
workflows-rust-analyzer[bot] Apr 12, 2026
80a207a
genmc/*: Fix paths and naming for graph-related includes
michaliskok Jan 31, 2026
e77d11d
genmc/exploration: Have {inc,dec}_pos take a count argument
michaliskok Jan 31, 2026
535df2e
genmc/api: Add a curr_pos()
michaliskok Jan 31, 2026
66330fa
genmc/api: Add a MallocResult type
michaliskok Jan 31, 2026
912e6e5
diagnostics,genmc*: Add type to signal execution abortion
michaliskok Mar 28, 2026
ca6e184
diagnostics: End sentences with a period
michaliskok Apr 10, 2026
99ac0a7
Add shims for non-blocking sockets and non-blocking socket operations
WhySoBad Mar 30, 2026
5e2c5b2
avoid duplicating read/write_all logic
RalfJung Apr 12, 2026
ff96bec
feat: add `accept4` with SOCK_NONBLOCK test
WhySoBad Apr 12, 2026
0f36702
Merge pull request #4938 from WhySoBad/network-socket-non-blocking
RalfJung Apr 12, 2026
142d79d
genmc/*: Update GenMC calls to match the new API for NAs
michaliskok Feb 3, 2026
d42fe71
genmc/exploration: Add a FIXME for join
michaliskok Apr 12, 2026
8ac00e5
genmc: Replace BUG_ON() w/ VERIFY()
michaliskok Apr 6, 2026
a428be2
genmc/setup: Don't use InterpreterCallbacks
michaliskok Apr 6, 2026
8a3c8cb
genmc/lib: GENMC_DEBUG has been renamed to ENABLE_GENMC_DEBUG
michaliskok Apr 6, 2026
a8685f7
genmc/build: ENABLE_GENMC_DEBUG is available in config.h
michaliskok Apr 6, 2026
7f7fdd4
genmc/build: Don't add labels for non-atomics to graphs
michaliskok Apr 8, 2026
75897f9
tests/genmc: Bless new results
michaliskok Apr 8, 2026
4fe9768
genmc/build: Bump GenMC version
michaliskok Apr 8, 2026
66cdfc4
tweak some comments
RalfJung Apr 12, 2026
66dd587
Merge pull request #4949 from michaliskok/genmc-no-nas
RalfJung Apr 12, 2026
67ed22e
fix: no deref index-expr for extract_function
A4-Tacks Apr 12, 2026
3204a79
Merge pull request #22025 from A4-Tacks/extract-fun-transparent-index
lnicola Apr 13, 2026
1a77f3d
Support `impl` and `mut` restrictions
ChayimFriedman2 Apr 12, 2026
23e8460
Merge pull request #22022 from ChayimFriedman2/restrictions
ChayimFriedman2 Apr 13, 2026
9cd6a39
internal: Fix rustdoc quoting
Wilfred Apr 13, 2026
2233282
Merge pull request #22028 from Wilfred/fix_rustdoc_quoting
Veykril Apr 13, 2026
1ba2ec7
fix: MIR evaluation of sized &T with recursive const fn
Wilfred Apr 13, 2026
b198955
internal: Ensure rustdoc GitHub action runs on PRs
Wilfred Apr 13, 2026
0813ab8
Merge pull request #22029 from Wilfred/more_rustdoc_fixes
Veykril Apr 13, 2026
92da3d3
fix: complete variants of hidden enums through public aliases
Amit5601 Apr 9, 2026
482a359
Added a field `has_local_inherent_impl` to `CompletionRelevance`.
WeiTheShinobi Apr 13, 2026
385756c
genmc*: Don't split up non-atomic accesses to smaller chunks
michaliskok Apr 10, 2026
7cd9c04
Merge pull request #22031 from WeiTheShinobi/introduce_has_local_inhe…
ChayimFriedman2 Apr 13, 2026
5b573d8
Merge pull request #22030 from Wilfred/pre-mir-relocation-test
ChayimFriedman2 Apr 13, 2026
a91c488
Merge pull request #22003 from Amit5601/fix/hidden-enum-clean
A4-Tacks Apr 13, 2026
51f8800
Merge pull request #22018 from A4-Tacks/vsc-suggest-string
ChayimFriedman2 Apr 13, 2026
2b6088b
Merge pull request #22019 from rust-lang/ci/gen-lints
ChayimFriedman2 Apr 13, 2026
063763f
fix: Fix ref_match position when keyword prefix
A4-Tacks Apr 9, 2026
a6d043a
Merge pull request #4956 from michaliskok/genmc-no-split-nas
RalfJung Apr 13, 2026
3536b19
Merge pull request #21999 from A4-Tacks/refmatch-kwdprefix-quickfix
A4-Tacks Apr 13, 2026
536ce32
feat: add is_mutable_raw_ptr and as_raw_ptr to hir::Type
Mar 18, 2026
164395b
Merge pull request #21835 from mehmet-ylcnky/feat/raw-ptr-mutability-api
ChayimFriedman2 Apr 13, 2026
2fc3961
Minor simplification
ChayimFriedman2 Apr 13, 2026
7bfecf6
Merge pull request #22033 from ChayimFriedman2/simplification
ChayimFriedman2 Apr 14, 2026
c0d6de7
build(deps): bump rand from 0.9.2 to 0.9.3
dependabot[bot] Apr 14, 2026
6971600
Ignore a hangy test
ChayimFriedman2 Apr 14, 2026
89abb12
build(deps): bump rand from 0.9.2 to 0.9.3
dependabot[bot] Apr 14, 2026
9d0eb3f
Merge pull request #22035 from ChayimFriedman2/hangy-test
ChayimFriedman2 Apr 14, 2026
0f4f33b
Allow ambiguity in assoc type shorthand if they resolve to the same a…
ChayimFriedman2 Apr 13, 2026
4e84b77
Merge pull request #4960 from rust-lang/dependabot/cargo/rand-0.9.3
RalfJung Apr 14, 2026
d5146d3
remove set visibility method of HasVisibility
Shourya742 Apr 14, 2026
42c6a7b
add type_bound_text in constructor
Shourya742 Apr 14, 2026
6c84b2b
migrate generate blanket trait impl from make to SyntaxFactory
Shourya742 Apr 14, 2026
4958d77
remove generic params owner edit trait
Shourya742 Apr 14, 2026
b1034b0
update derive_macro
Shourya742 Apr 14, 2026
c6b5496
Support extract variable in macro call
A4-Tacks Jan 18, 2026
f74767b
Add some fixme comments
A4-Tacks Apr 14, 2026
e895255
Merge pull request #22041 from Shourya742/2026-04-14-remove-generic-p…
ChayimFriedman2 Apr 14, 2026
0d2aff0
Merge pull request #22039 from Shourya742/2026-04-14-replace-make-wit…
ChayimFriedman2 Apr 14, 2026
edc1212
Merge pull request #22037 from Shourya742/2026-04-14-remove-set-visib…
ChayimFriedman2 Apr 14, 2026
533f183
remove set_pat from edit_in_place and move set_pat_with_editor in edit
Shourya742 Apr 14, 2026
9919b15
migrate destructure_tuple_binding and convert_let_else_to_match to us…
Shourya742 Apr 14, 2026
e32773b
rename set_path_with_editor to set_path
Shourya742 Apr 14, 2026
15e4438
Merge pull request #21487 from A4-Tacks/extract-var-in-macro
ChayimFriedman2 Apr 14, 2026
6d6b7d0
Merge pull request #22036 from Shourya742/2026-04-14-remove-set-path
ChayimFriedman2 Apr 14, 2026
862febf
add use tree list method to syntaxFactory constructor
Shourya742 Apr 14, 2026
7a56ebd
replace make with syntax_factory definitions
Shourya742 Apr 14, 2026
41b0052
Merge pull request #22042 from Shourya742/2026-04-14-replace-make-wit…
ChayimFriedman2 Apr 14, 2026
3347cb8
Do not complete unstable items that use an internal feature
ChayimFriedman2 Apr 14, 2026
3896b15
genmc tests: add -Zmiri-genmc by default
RalfJung Apr 14, 2026
e95ac9e
parse `type const` items
yPin9 Apr 14, 2026
b2ffd38
Merge pull request #4961 from RalfJung/genmc-tests
RalfJung Apr 14, 2026
abc05d7
Allow changing socket blocking state
WhySoBad Apr 9, 2026
bae3b39
Merge pull request #4955 from WhySoBad/network-socket-set-non-blocking
RalfJung Apr 14, 2026
6615cd9
move SyntaxFactory inside SyntaxEditor
Shourya742 Apr 15, 2026
a6f0e78
fix constructor mapping which were incorrect
Shourya742 Apr 15, 2026
15b3b40
Remove all occurance of explicit SyntaxFactory::with_mapping, and upd…
Shourya742 Apr 15, 2026
02fa156
Bump follow-redirects from 1.15.9 to 1.16.0 in /editors/code
dependabot[bot] Apr 15, 2026
6f70339
Represent lowered coroutines with closures
ChayimFriedman2 Apr 15, 2026
067f4c6
Merge pull request #22050 from ChayimFriedman2/make-asyncs-closures
ChayimFriedman2 Apr 15, 2026
99ec949
Merge pull request #22046 from yPin9/2026-04-15-parse-type-const
Veykril Apr 15, 2026
53b20e4
Merge pull request #22032 from ChayimFriedman2/assoc-types-yet-again
Veykril Apr 15, 2026
722296f
Merge pull request #22044 from ChayimFriedman2/internal-features
Veykril Apr 15, 2026
ddc5e11
Upgrade rustc crates
ChayimFriedman2 Apr 9, 2026
c9440c5
Add support for scalable vectors repr
ChayimFriedman2 Apr 9, 2026
982643a
Update solver types as required by the upgrade
ChayimFriedman2 Apr 9, 2026
9a32199
Separate between normal evaluated consts and type-system consts
ChayimFriedman2 Apr 15, 2026
491e845
Merge pull request #22048 from ChayimFriedman2/upgrade-rustc
ChayimFriedman2 Apr 15, 2026
567d676
introduce interior mutability to SyntaxEditor to let go of &mut usage
Shourya742 Apr 15, 2026
4445220
Adapt changes to assist so that we no longer use mutable editor
Shourya742 Apr 15, 2026
9bf0d06
Merge pull request #22049 from Shourya742/2026-04-15-move-syntax-fact…
ChayimFriedman2 Apr 15, 2026
e933b8d
Bump thin-vec from 0.2.14 to 0.2.16
dependabot[bot] Apr 15, 2026
3083d79
replace make with syntaxFactory
Shourya742 Apr 14, 2026
84d65db
adapt raw strings to new SyntaxEditor semantics
Shourya742 Apr 16, 2026
574a198
remove clone_for_update in move_const_to_impl
Shourya742 Apr 16, 2026
96d2327
Merge pull request #22057 from Shourya742/2026-04-16-remove-clone-for…
A4-Tacks Apr 16, 2026
202df42
Prepare for merging from rust-lang/rust
invalid-email-address Apr 16, 2026
cf1af01
Merge ref 'e8e4541ff196' from rust-lang/rust
invalid-email-address Apr 16, 2026
fb27b3b
Simplify macros for target-modifier and mitigation flags
Zalathar Apr 16, 2026
b4fc58d
Remove `LineIndexDatabase`
Veykril Apr 16, 2026
5580160
Merge pull request #22063 from Veykril/push-zyrytxqturpp
Veykril Apr 16, 2026
fabc30d
fix 'cargo miri nextest <verb> --help' output
RalfJung Apr 16, 2026
9b9dc07
Merge pull request #4966 from RalfJung/help
RalfJung Apr 16, 2026
fa14701
Fix 1.95.0 Clippy
ChayimFriedman2 Apr 17, 2026
f880529
Merge pull request #22065 from ChayimFriedman2/fix-clippy
ChayimFriedman2 Apr 17, 2026
d1fd881
Merge pull request #22043 from Shourya742/2026-04-14-migrate-make-wit…
ChayimFriedman2 Apr 17, 2026
86c3c77
Recognize `#[std::prelude::vX::test]` (not just `#[core::prelude::vX:…
ChayimFriedman2 Apr 17, 2026
1c8738f
Merge pull request #22066 from ChayimFriedman2/std-test
ChayimFriedman2 Apr 17, 2026
1ff2152
Bump salsa
Veykril Feb 7, 2026
1b66051
fix: add parentheses on record expr for replace_let_with_if_let
A4-Tacks Apr 17, 2026
2782382
Merge pull request #22067 from A4-Tacks/let-with-iflet-parens-record
ChayimFriedman2 Apr 17, 2026
fa6376e
internal: remove redundant editor.make() calls
A4-Tacks Apr 17, 2026
31d47e7
Merge pull request #22069 from A4-Tacks/redundant-make-call
ChayimFriedman2 Apr 17, 2026
85f2d15
fix: return canonical short prefix from `Comment::prefix`
Albab-Hasan Apr 17, 2026
ab704f4
internal: support RUSTFMT_TOOLCHAIN for xtask codegen
A4-Tacks Apr 17, 2026
55e0d9d
Merge pull request #22073 from Albab-Hasan/fix-22071-empty-block-comm…
ChayimFriedman2 Apr 17, 2026
8261351
Merge pull request #22074 from A4-Tacks/xtask-rsfmt-toolchain
ChayimFriedman2 Apr 17, 2026
0560fde
remove vec_unique.default.stderr
quiode Apr 17, 2026
47f6f0b
Merge pull request #4967 from quiode/remove-vec_unique.default.stderr
RalfJung Apr 17, 2026
5642dfb
fix: adjust name of extract_type_alias
A4-Tacks Apr 17, 2026
a0d8dd8
fix: wrap match scrutinee in parens when needed in replace_if_let_wit…
Albab-Hasan Apr 17, 2026
19a8a2d
Merge pull request #22077 from Albab-Hasan/fix-22072-if-let-match-par…
A4-Tacks Apr 17, 2026
e24dc1d
tests/ui/extern: add annotations for reference rules
DanielEScherzer Mar 7, 2026
2dda8f6
Fix `make.expr_closure` invalid mappings
A4-Tacks Apr 18, 2026
cdc1d7c
internal: code review tweak
Young-Flash Apr 18, 2026
2814175
misc improvements
ada4a Apr 16, 2026
3310c64
add tests
ada4a Apr 16, 2026
02f0edc
fix: also call `is_deprecated` on `ModuleDef`
ada4a Apr 16, 2026
0b9410f
refactor: merge `RenderContext::is_deprecated` and `RenderContext::is…
ada4a Apr 17, 2026
8463b33
implement custom `Debug` for `MiniCore`
ada4a Apr 16, 2026
7d13144
internal: update generated lints
workflows-rust-analyzer[bot] Apr 19, 2026
6ac2dea
Merge pull request #22084 from ada4a/debug-minicore
ChayimFriedman2 Apr 19, 2026
0bb544a
Support non-body expression store for `upvars_mentioned()`
ChayimFriedman2 Apr 15, 2026
7c732db
Support `self` upvar in `upvars_mentioned()`
ChayimFriedman2 Apr 15, 2026
12094bd
Merge pull request #22055 from ChayimFriedman2/upvars-expr-store
ChayimFriedman2 Apr 19, 2026
4ac95f5
Merge pull request #21906 from Young-Flash/master
ChayimFriedman2 Apr 19, 2026
5c09a55
Merge pull request #22083 from ada4a/22062-deprecatedness
ChayimFriedman2 Apr 19, 2026
599a7e1
Merge pull request #22070 from A4-Tacks/extract-ty-alias-name
ChayimFriedman2 Apr 19, 2026
79963ac
Allow crate authors to declare that their trait prefers to be importe…
ChayimFriedman2 Mar 4, 2026
a207636
fix: Fix incorrect lifetime hints for self with type
A4-Tacks Apr 19, 2026
baad04a
internal: Migrate `convert_iter_for_each_to_for` assist to SyntaxEditor
A4-Tacks Apr 18, 2026
3eb5a1b
Rename param `edit` to `editor` for add_file_edits
A4-Tacks Apr 19, 2026
e332799
Merge pull request #22061 from Veykril/veykril/push-zyolmvzxtoqz
ChayimFriedman2 Apr 19, 2026
eedf870
Suggest returning a reference for unsized place from a closure
chenyukang Feb 5, 2026
a57f175
Merge pull request #22060 from rust-lang/rustc-pull
lnicola Apr 19, 2026
d336d72
Merge pull request #22056 from rust-lang/dependabot/cargo/thin-vec-0.…
lnicola Apr 19, 2026
84d3cbe
Merge pull request #22053 from rust-lang/dependabot/npm_and_yarn/edit…
lnicola Apr 19, 2026
a0b8651
Merge pull request #22034 from rust-lang/dependabot/cargo/rand-0.9.3
lnicola Apr 19, 2026
2bdf361
Prepare for merging from rust-lang/rust
Apr 19, 2026
ed395bb
Merge ref '6f109d8a2da2' from rust-lang/rust
Apr 19, 2026
31f4abb
Merge pull request #22086 from rust-lang/ci/gen-lints
ChayimFriedman2 Apr 19, 2026
8aefb07
clippy
RalfJung Apr 19, 2026
bf61e56
Merge pull request #4969 from rust-lang/rustup-2026-04-19
RalfJung Apr 19, 2026
c31e75d
migrate generate_enum_is_method to syntax editor
Shourya742 Apr 19, 2026
3b6cc1d
migrate generate_enum_projection_method to syntax editor
Shourya742 Apr 19, 2026
9ead6ce
remove unused methods in utils
Shourya742 Apr 19, 2026
d9046fe
Sync function call args check fudging with rustc
ShoyuVanilla Apr 19, 2026
200c699
Merge pull request #22081 from A4-Tacks/migrate-loop-iter-for
ShoyuVanilla Apr 19, 2026
0712092
Merge pull request #22091 from Shourya742/2026-04-19-remove-generate-…
ShoyuVanilla Apr 19, 2026
b1563cd
minor: Bump `scip`
ShoyuVanilla Apr 19, 2026
298aea1
Merge pull request #21740 from ChayimFriedman2/prefer-underscore-import
ChayimFriedman2 Apr 19, 2026
1d9e4eb
Merge pull request #22093 from ShoyuVanilla/bump-scip
ShoyuVanilla Apr 19, 2026
4c365a3
Merge pull request #22092 from ShoyuVanilla/fudge
ShoyuVanilla Apr 19, 2026
b45a460
remove make from convert reange for to while
Shourya742 Apr 19, 2026
f946c4d
fix: Use `ProofTreeVisitor` for unsized coercion
ShoyuVanilla Apr 19, 2026
b603664
Merge pull request #22095 from Shourya742/2026-04-19-replace-make-wit…
ShoyuVanilla Apr 19, 2026
5247dd6
Merge pull request #22087 from A4-Tacks/self-ty-hints
ShoyuVanilla Apr 19, 2026
91f7784
Merge pull request #22096 from ShoyuVanilla/issue-21885
ChayimFriedman2 Apr 19, 2026
de9958b
fix lsp-extensions section header
BenjaminBrienen Apr 19, 2026
333cd70
Merge pull request #22099 from BenjaminBrienen/fix-header
ChayimFriedman2 Apr 19, 2026
5ec1a72
Add missing interner lang items
ChayimFriedman2 Apr 19, 2026
76271a7
In async closures, make the returned async blocks the bindings owner …
ChayimFriedman2 Apr 19, 2026
3fedae8
Accept an ExpressionStoreOwnerId for pretty-printing
ChayimFriedman2 Apr 19, 2026
5657220
Do not check solver's cache validity on every access
ChayimFriedman2 Apr 20, 2026
a49a2b5
Merge pull request #22104 from ChayimFriedman2/reinit-cache
ChayimFriedman2 Apr 20, 2026
a5fb351
Replace make with SyntaxFactory in add_missing_match_arms
Shourya742 Apr 20, 2026
27c4d58
Replace make with SyntaxFactory in convert_named_struct_to_tuple_struct
Shourya742 Apr 20, 2026
8e8d719
Replace make with SyntaxFactory in convert_tuple_struct_to_named_struct
Shourya742 Apr 20, 2026
82e654a
Replace make with SyntaxFactory in generate_trait_from_impl.rs
Shourya742 Apr 20, 2026
c4b9023
Replace make with SyntaxFactory in remove_dbg
Shourya742 Apr 20, 2026
583b5f4
Replace make with SyntaxFactory in unmerge_imports
Shourya742 Apr 20, 2026
807a039
Replace make with SyntaxFactory in unwrap_block
Shourya742 Apr 20, 2026
8282385
migrate wrap_unwrap_cfg_attr to SyntaxEditor
Shourya742 Apr 20, 2026
b503f38
Merge pull request #22105 from Shourya742/2026-04-20-replace-most-mak…
ShoyuVanilla Apr 20, 2026
ac905cc
Fix forgotten case in `walk_child_exprs()`
ChayimFriedman2 Apr 20, 2026
f629488
Make reparsed guard metavars collect tokens
cijiugechu Apr 20, 2026
08e9e17
Prepare for merging from rust-lang/rust
Apr 20, 2026
366676b
Merge ref 'e22c616e4e87' from rust-lang/rust
Apr 20, 2026
d5ebbc4
fmt
Apr 20, 2026
6c13e42
fix: filter rules by names before pushing them
jdrouet Apr 15, 2026
3398413
Merge pull request #22054 from jdrouet/jdrouet/remove-duplicate-lints
ShoyuVanilla Apr 20, 2026
ecd6316
Merge pull request #4970 from rust-lang/rustup-2026-04-20
RalfJung Apr 20, 2026
daab9fc
Prepare for merging from rust-lang/rust
lnicola Apr 20, 2026
f08ee5b
Merge ref 'e22c616e4e87' from rust-lang/rust
lnicola Apr 20, 2026
4b8ef5c
Fix formatting
lnicola Apr 20, 2026
dbaa5f1
Merge pull request #22110 from lnicola/sync-from-rust
lnicola Apr 20, 2026
d7f95de
Port call expr type checking and closure upvar inference from rustc
ChayimFriedman2 Apr 20, 2026
5d84f89
Merge pull request #22101 from ChayimFriedman2/port-infer-call
ChayimFriedman2 Apr 20, 2026
1e57ed2
Remove `AttributeLintKind::DocUnknownSpotlight` variant
GuillaumeGomez Apr 20, 2026
7007737
Remove `AttributeLintKind::DocUnknownPasses` variant
GuillaumeGomez Apr 20, 2026
0ad35a2
Remove `AttributeLintKind::DocUnknownPlugins` variant
GuillaumeGomez Apr 20, 2026
1aee0e0
Remove `AttributeLintKind::DocUnknownAny` variant
GuillaumeGomez Apr 20, 2026
ea690c3
Remove `AttributeLintKind::DocAutoCfgWrongLiteral` variant
GuillaumeGomez Apr 20, 2026
bdc4a72
enable dynamic linking on the vita target
olebeck Apr 20, 2026
7d4c939
Rollup merge of #155556 - lnicola:sync-from-ra, r=lnicola
JonathanBrouwer Apr 20, 2026
0ef5312
Rollup merge of #152162 - chenyukang:yukang-fix-152064-unsized-closur…
JonathanBrouwer Apr 20, 2026
8afe406
Rollup merge of #155389 - Zalathar:flag-macros, r=mati865
JonathanBrouwer Apr 20, 2026
3bfe567
Rollup merge of #155553 - RalfJung:miri, r=RalfJung
JonathanBrouwer Apr 20, 2026
d948b62
Rollup merge of #153546 - DanielEScherzer:test-references-extern, r=e…
JonathanBrouwer Apr 20, 2026
01d1618
Rollup merge of #155475 - cijiugechu:missing-tokens, r=jieyouxu
JonathanBrouwer Apr 20, 2026
39ca32f
Rollup merge of #155560 - GuillaumeGomez:rm-attributelintkind, r=Jona…
JonathanBrouwer Apr 20, 2026
cf0c5fb
Rollup merge of #155563 - olebeck:enable-vita-dynamic-linking, r=petr…
JonathanBrouwer Apr 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 23 additions & 16 deletions compiler/rustc_attr_parsing/src/attributes/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ use super::{AcceptMapping, AttributeParser};
use crate::context::{AcceptContext, FinalizeContext, Stage};
use crate::errors::{
DocAliasDuplicated, DocAutoCfgExpectsHideOrShow, DocAutoCfgHideShowExpectsList,
DocAutoCfgHideShowUnexpectedItem, DocUnknownInclude, IllFormedAttributeInput,
DocAutoCfgHideShowUnexpectedItem, DocAutoCfgWrongLiteral, DocUnknownAny, DocUnknownInclude,
DocUnknownPasses, DocUnknownPlugins, DocUnknownSpotlight, IllFormedAttributeInput,
};
use crate::parser::{ArgParser, MetaItemOrLitParser, MetaItemParser, OwnedPathParser};
use crate::session_diagnostics::{
Expand Down Expand Up @@ -442,9 +443,9 @@ impl DocParser {
ArgParser::NameValue(nv) => {
let MetaItemLit { kind: LitKind::Bool(bool_value), span, .. } = nv.value_as_lit()
else {
cx.emit_lint(
cx.emit_dyn_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::DocAutoCfgWrongLiteral,
move |dcx, level| DocAutoCfgWrongLiteral.into_diag(dcx, level),
nv.value_span,
);
return;
Expand Down Expand Up @@ -613,10 +614,11 @@ impl DocParser {
}
}
Some(sym::spotlight) => {
cx.emit_lint(
let span = path.span();
cx.emit_dyn_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::DocUnknownSpotlight { span: path.span() },
path.span(),
move |dcx, level| DocUnknownSpotlight { sugg_span: span }.into_diag(dcx, level),
span,
);
}
Some(sym::include) if let Some(nv) = args.name_value() => {
Expand All @@ -640,32 +642,37 @@ impl DocParser {
);
}
Some(name @ (sym::passes | sym::no_default_passes)) => {
cx.emit_lint(
let span = path.span();
cx.emit_dyn_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::DocUnknownPasses { name, span: path.span() },
path.span(),
move |dcx, level| {
DocUnknownPasses { name, note_span: span }.into_diag(dcx, level)
},
span,
);
}
Some(sym::plugins) => {
cx.emit_lint(
let span = path.span();
cx.emit_dyn_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::DocUnknownPlugins { span: path.span() },
path.span(),
move |dcx, level| DocUnknownPlugins { label_span: span }.into_diag(dcx, level),
span,
);
}
Some(name) => {
cx.emit_lint(
cx.emit_dyn_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::DocUnknownAny { name },
move |dcx, level| DocUnknownAny { name }.into_diag(dcx, level),
path.span(),
);
}
None => {
let full_name =
path.segments().map(|s| s.as_str()).intersperse("::").collect::<String>();
cx.emit_lint(
let name = Symbol::intern(&full_name);
cx.emit_dyn_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::DocUnknownAny { name: Symbol::intern(&full_name) },
move |dcx, level| DocUnknownAny { name }.into_diag(dcx, level),
path.span(),
);
}
Expand Down
47 changes: 47 additions & 0 deletions compiler/rustc_attr_parsing/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,50 @@ pub(crate) struct DocUnknownInclude {
)]
pub sugg: (Span, Applicability),
}

#[derive(Diagnostic)]
#[diag("unknown `doc` attribute `spotlight`")]
#[note("`doc(spotlight)` was renamed to `doc(notable_trait)`")]
#[note("`doc(spotlight)` is now a no-op")]
pub(crate) struct DocUnknownSpotlight {
#[suggestion(
"use `notable_trait` instead",
style = "short",
applicability = "machine-applicable",
code = "notable_trait"
)]
pub sugg_span: Span,
}

#[derive(Diagnostic)]
#[diag("unknown `doc` attribute `{$name}`")]
#[note(
"`doc` attribute `{$name}` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136>"
)]
#[note("`doc({$name})` is now a no-op")]
pub(crate) struct DocUnknownPasses {
pub name: Symbol,
#[label("no longer functions")]
pub note_span: Span,
}

#[derive(Diagnostic)]
#[diag("unknown `doc` attribute `plugins`")]
#[note(
"`doc` attribute `plugins` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136> and CVE-2018-1000622 <https://nvd.nist.gov/vuln/detail/CVE-2018-1000622>"
)]
#[note("`doc(plugins)` is now a no-op")]
pub(crate) struct DocUnknownPlugins {
#[label("no longer functions")]
pub label_span: Span,
}

#[derive(Diagnostic)]
#[diag("unknown `doc` attribute `{$name}`")]
pub(crate) struct DocUnknownAny {
pub name: Symbol,
}

#[derive(Diagnostic)]
#[diag("expected boolean for `#[doc(auto_cfg = ...)]`")]
pub(crate) struct DocAutoCfgWrongLiteral;
20 changes: 0 additions & 20 deletions compiler/rustc_lint/src/early/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,6 @@ impl<'a> Diagnostic<'a, ()> for DecorateAttrLint<'_, '_, '_> {
.into_diag(dcx, level)
}

&AttributeLintKind::DocUnknownSpotlight { span } => {
lints::DocUnknownSpotlight { sugg_span: span }.into_diag(dcx, level)
}

&AttributeLintKind::DocUnknownPasses { name, span } => {
lints::DocUnknownPasses { name, note_span: span }.into_diag(dcx, level)
}

&AttributeLintKind::DocUnknownPlugins { span } => {
lints::DocUnknownPlugins { label_span: span }.into_diag(dcx, level)
}

&AttributeLintKind::DocUnknownAny { name } => {
lints::DocUnknownAny { name }.into_diag(dcx, level)
}

&AttributeLintKind::DocAutoCfgWrongLiteral => {
lints::DocAutoCfgWrongLiteral.into_diag(dcx, level)
}

&AttributeLintKind::DocTestTakesList => lints::DocTestTakesList.into_diag(dcx, level),

&AttributeLintKind::DocTestUnknown { name } => {
Expand Down
47 changes: 0 additions & 47 deletions compiler/rustc_lint/src/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3303,53 +3303,6 @@ pub(crate) struct ExpectedNoArgs;
)]
pub(crate) struct ExpectedNameValue;

#[derive(Diagnostic)]
#[diag("unknown `doc` attribute `spotlight`")]
#[note("`doc(spotlight)` was renamed to `doc(notable_trait)`")]
#[note("`doc(spotlight)` is now a no-op")]
pub(crate) struct DocUnknownSpotlight {
#[suggestion(
"use `notable_trait` instead",
style = "short",
applicability = "machine-applicable",
code = "notable_trait"
)]
pub sugg_span: Span,
}

#[derive(Diagnostic)]
#[diag("unknown `doc` attribute `{$name}`")]
#[note(
"`doc` attribute `{$name}` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136>"
)]
#[note("`doc({$name})` is now a no-op")]
pub(crate) struct DocUnknownPasses {
pub name: Symbol,
#[label("no longer functions")]
pub note_span: Span,
}

#[derive(Diagnostic)]
#[diag("unknown `doc` attribute `plugins`")]
#[note(
"`doc` attribute `plugins` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136> and CVE-2018-1000622 <https://nvd.nist.gov/vuln/detail/CVE-2018-1000622>"
)]
#[note("`doc(plugins)` is now a no-op")]
pub(crate) struct DocUnknownPlugins {
#[label("no longer functions")]
pub label_span: Span,
}

#[derive(Diagnostic)]
#[diag("unknown `doc` attribute `{$name}`")]
pub(crate) struct DocUnknownAny {
pub name: Symbol,
}

#[derive(Diagnostic)]
#[diag("expected boolean for `#[doc(auto_cfg = ...)]`")]
pub(crate) struct DocAutoCfgWrongLiteral;

#[derive(Diagnostic)]
#[diag("`#[doc(test(...)]` takes a list of attributes")]
pub(crate) struct DocTestTakesList;
Expand Down
5 changes: 0 additions & 5 deletions compiler/rustc_lint_defs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -656,11 +656,6 @@ pub enum DeprecatedSinceKind {
pub enum AttributeLintKind {
UnexpectedCfgName((Symbol, Span), Option<(Symbol, Span)>),
UnexpectedCfgValue((Symbol, Span), Option<(Symbol, Span)>),
DocUnknownSpotlight { span: Span },
DocUnknownPasses { name: Symbol, span: Span },
DocUnknownPlugins { span: Span },
DocUnknownAny { name: Symbol },
DocAutoCfgWrongLiteral,
DocTestTakesList,
DocTestUnknown { name: Symbol },
DocTestLiteral,
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3464,7 +3464,9 @@ impl<'a> Parser<'a> {
}

pub(crate) fn eat_metavar_guard(&mut self) -> Option<Box<Guard>> {
self.eat_metavar_seq(MetaVarKind::Guard, |this| this.parse_match_arm_guard()).flatten()
self.eat_metavar_seq(MetaVarKind::Guard, |this| {
this.expect_match_arm_guard(ForceCollect::Yes)
})
}

fn parse_match_arm_guard(&mut self) -> PResult<'a, Option<Box<Guard>>> {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2641,7 +2641,7 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
if unstable_opts.retpoline_external_thunk {
unstable_opts.retpoline = true;
collected_options.target_modifiers.insert(
OptionsTargetModifiers::UnstableOptions(UnstableOptionsTargetModifiers::retpoline),
OptionsTargetModifiers::UnstableOptions(UnstableOptionsTargetModifiers::Retpoline),
"true".to_string(),
);
}
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#![feature(default_field_values)]
#![feature(iter_intersperse)]
#![feature(macro_derive)]
#![feature(macro_metavar_expr)]
#![feature(rustc_attrs)]
// To generate CodegenOptionsTargetModifiers and UnstableOptionsTargetModifiers enums
// with macro_rules, it is necessary to use recursive mechanic ("Incremental TT Munchers").
Expand Down
Loading
Loading