diff options
| author | bors <bors@rust-lang.org> | 2025-02-16 01:29:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-16 01:29:09 +0000 |
| commit | 500a686ba8bb1b51df7e7f8f81d286b2e20209ff (patch) | |
| tree | a7d6969c682059d906e33ff189816feb67e0b413 /compiler/rustc_expand/src | |
| parent | e72df78268bafbfe28366aa0e382713f55a491e7 (diff) | |
| parent | b3d5a770f696460c3eb513e1804a59dbb04641d9 (diff) | |
| download | rust-500a686ba8bb1b51df7e7f8f81d286b2e20209ff.tar.gz rust-500a686ba8bb1b51df7e7f8f81d286b2e20209ff.zip | |
Auto merge of #137093 - matthiaskrgr:rollup-72j7mut, r=matthiaskrgr
Rollup of 8 pull requests
Successful merges:
- #127581 (Fix crate name validation)
- #136490 (Do not allow attributes on struct field rest patterns)
- #136808 (Try to recover from path sep error in type parsing)
- #137055 (rustdoc: Properly restore search input placeholder)
- #137068 (fix(rustdoc): Fixed `Copy Item Path` in rust doc)
- #137070 (Do not generate invalid links in job summaries)
- #137074 (compiletest: add `{ignore,only}-rustc_abi-x86-sse2` directives)
- #137076 (triagebot.toml: ping me on changes to `tests/rustdoc-json`)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/module.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_expand/src/module.rs b/compiler/rustc_expand/src/module.rs index 9c35b26772b..e925052c607 100644 --- a/compiler/rustc_expand/src/module.rs +++ b/compiler/rustc_expand/src/module.rs @@ -183,12 +183,12 @@ pub(crate) fn mod_file_path_from_attr( let first_path = attrs.iter().find(|at| at.has_name(sym::path))?; let Some(path_sym) = first_path.value_str() else { // This check is here mainly to catch attempting to use a macro, - // such as #[path = concat!(...)]. This isn't currently supported - // because otherwise the InvocationCollector would need to defer - // loading a module until the #[path] attribute was expanded, and - // it doesn't support that (and would likely add a bit of - // complexity). Usually bad forms are checked in AstValidator (via - // `check_builtin_attribute`), but by the time that runs the macro + // such as `#[path = concat!(...)]`. This isn't supported because + // otherwise the `InvocationCollector` would need to defer loading + // a module until the `#[path]` attribute was expanded, and it + // doesn't support that (and would likely add a bit of complexity). + // Usually bad forms are checked during semantic analysis via + // `TyCtxt::check_mod_attrs`), but by the time that runs the macro // is expanded, and it doesn't give an error. validate_attr::emit_fatal_malformed_builtin_attribute(&sess.psess, first_path, sym::path); }; |
