diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-20 02:25:36 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-08-05 07:10:31 +0500 |
| commit | d09cf616f74e068cfb092e91472fb0ae371529ad (patch) | |
| tree | 56a7b05cd13b9382e53d2ee7c59b16e818b73c51 /tests/ui/parser/issues | |
| parent | f63685ddf3d3c92a61158cd55d44bde17c2b024f (diff) | |
| download | rust-d09cf616f74e068cfb092e91472fb0ae371529ad.tar.gz rust-d09cf616f74e068cfb092e91472fb0ae371529ad.zip | |
Added checks for attribute in type case
Diffstat (limited to 'tests/ui/parser/issues')
| -rw-r--r-- | tests/ui/parser/issues/issue-103143.rs | 2 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-103143.stderr | 11 |
2 files changed, 4 insertions, 9 deletions
diff --git a/tests/ui/parser/issues/issue-103143.rs b/tests/ui/parser/issues/issue-103143.rs index a584274c405..90f10fc1a08 100644 --- a/tests/ui/parser/issues/issue-103143.rs +++ b/tests/ui/parser/issues/issue-103143.rs @@ -1,5 +1,5 @@ fn main() { x::<#[a]y::<z>> - //~^ ERROR invalid const generic expression + //~^ ERROR attributes cannot be applied to generic arguments //~| ERROR cannot find value `x` in this scope } diff --git a/tests/ui/parser/issues/issue-103143.stderr b/tests/ui/parser/issues/issue-103143.stderr index 4035c69afa7..168a2077396 100644 --- a/tests/ui/parser/issues/issue-103143.stderr +++ b/tests/ui/parser/issues/issue-103143.stderr @@ -1,13 +1,8 @@ -error: invalid const generic expression - --> $DIR/issue-103143.rs:2:13 +error: attributes cannot be applied to generic arguments + --> $DIR/issue-103143.rs:2:9 | LL | x::<#[a]y::<z>> - | ^^^^^^ - | -help: expressions must be enclosed in braces to be used as const generic arguments - | -LL | x::<#[a]{ y::<z> }> - | + + + | ^^^^ attributes are not allowed here error[E0425]: cannot find value `x` in this scope --> $DIR/issue-103143.rs:2:5 |
