Detect when a macro without exclamation mark uses square brackets - #159996
Merged
Conversation
``` error: expected one of `.`, `?`, `]`, or an operator, found `,` --> $DIR/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.rs:2:19 | LL | let _x = vec[1, 2, 3]; | ^ expected one of `.`, `?`, `]`, or an operator | help: you might have meant to call a macro | LL | let _x = vec![1, 2, 3]; | + ```
Collaborator
|
The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease |
Collaborator
|
r? @oli-obk rustbot has assigned @oli-obk. Use Why was this reviewer chosen?The reviewer was selected based on:
|
oli-obk
approved these changes
Jul 27, 2026
Contributor
|
@bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jul 27, 2026
Detect when a macro without exclamation mark uses square brackets ``` error: expected one of `.`, `?`, `]`, or an operator, found `,` --> $DIR/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.rs:2:19 | LL | let _x = vec[1, 2, 3]; | ^ expected one of `.`, `?`, `]`, or an operator | help: you might have meant to call a macro | LL | let _x = vec![1, 2, 3]; | + ``` Fix rust-lang#101490.
This was referenced Jul 27, 2026
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 27, 2026
…uwer Rollup of 14 pull requests Successful merges: - #158417 (Avoid ICE when cfg_eval recovers no item from derive input) - #159085 (Fix decoding attributes of `SyntheticCoroutineBody`) - #159554 (feat: Update method signature of int_from_ascii) - #159637 (Some place analysis tweaks) - #159649 (Normalize region obligations before regionck) - #159961 (sanitize_standard_fds: Miri supports poll now) - #159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs) - #159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static) - #159804 (Expand docs for fs::metadata and fs::symlink_metadata) - #159821 (Update expect message using the recommended style in binary_heap module) - #159840 (Fix opaque type ICE in late lints under the next-generation trait solver) - #159956 (Fix observable intermediate state in `thread::add_spawn_hook`) - #159991 (std: make send_process_group_signal unsupported on VxWorks) - #159996 (Detect when a macro without exclamation mark uses square brackets)
rust-timer
added a commit
that referenced
this pull request
Jul 27, 2026
Rollup merge of #159996 - estebank:issue-101490, r=oli-obk Detect when a macro without exclamation mark uses square brackets ``` error: expected one of `.`, `?`, `]`, or an operator, found `,` --> $DIR/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.rs:2:19 | LL | let _x = vec[1, 2, 3]; | ^ expected one of `.`, `?`, `]`, or an operator | help: you might have meant to call a macro | LL | let _x = vec![1, 2, 3]; | + ``` Fix #101490.
pull Bot
pushed a commit
to xtqqczze/rust-lang-miri
that referenced
this pull request
Jul 28, 2026
…uwer Rollup of 14 pull requests Successful merges: - rust-lang/rust#158417 (Avoid ICE when cfg_eval recovers no item from derive input) - rust-lang/rust#159085 (Fix decoding attributes of `SyntheticCoroutineBody`) - rust-lang/rust#159554 (feat: Update method signature of int_from_ascii) - rust-lang/rust#159637 (Some place analysis tweaks) - rust-lang/rust#159649 (Normalize region obligations before regionck) - rust-lang/rust#159961 (sanitize_standard_fds: Miri supports poll now) - rust-lang/rust#159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs) - rust-lang/rust#159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static) - rust-lang/rust#159804 (Expand docs for fs::metadata and fs::symlink_metadata) - rust-lang/rust#159821 (Update expect message using the recommended style in binary_heap module) - rust-lang/rust#159840 (Fix opaque type ICE in late lints under the next-generation trait solver) - rust-lang/rust#159956 (Fix observable intermediate state in `thread::add_spawn_hook`) - rust-lang/rust#159991 (std: make send_process_group_signal unsupported on VxWorks) - rust-lang/rust#159996 (Detect when a macro without exclamation mark uses square brackets)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #101490.