about summary refs log tree commit diff
path: root/tests/ui/parser/typod-const-in-const-param-def.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-29 03:04:06 +0000
committerbors <bors@rust-lang.org>2023-05-29 03:04:06 +0000
commitdc0943d2eebf139e7e509882b803f77bfd25656d (patch)
treef676e20f47d2b60f37c2828f39b2cfbcb29d0fc2 /tests/ui/parser/typod-const-in-const-param-def.rs
parentf8447b963893b410f1dbce2cd752a898dc3ed8d4 (diff)
parente71b3b3cfac1ea515bc3cf2a6495f9261f265f43 (diff)
downloadrust-dc0943d2eebf139e7e509882b803f77bfd25656d.tar.gz
rust-dc0943d2eebf139e7e509882b803f77bfd25656d.zip
Auto merge of #112055 - matthiaskrgr:rollup-y3exx8c, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #112029 (Recover upon mistyped error on typo'd `const` in const param def)
 - #112037 (Add details about `unsafe_op_in_unsafe_fn` to E0133)
 - #112039 (compiler: update solaris/illumos to enable tsan support.)
 - #112042 (Migrate GUI colors test to original CSS color format)
 - #112045 (Followup to #111973)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/parser/typod-const-in-const-param-def.rs')
-rw-r--r--tests/ui/parser/typod-const-in-const-param-def.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/parser/typod-const-in-const-param-def.rs b/tests/ui/parser/typod-const-in-const-param-def.rs
new file mode 100644
index 00000000000..85d3ebba57a
--- /dev/null
+++ b/tests/ui/parser/typod-const-in-const-param-def.rs
@@ -0,0 +1,16 @@
+pub fn foo<Const N: u8>() {}
+//~^ ERROR `const` keyword was mistyped as `Const`
+
+pub fn bar<Const>() {}
+// OK
+
+pub fn baz<Const N: u8, T>() {}
+//~^ ERROR `const` keyword was mistyped as `Const`
+
+pub fn qux<T, Const N: u8>() {}
+//~^ ERROR `const` keyword was mistyped as `Const`
+
+pub fn quux<T, Const N: u8, U>() {}
+//~^ ERROR `const` keyword was mistyped as `Const`
+
+fn main() {}