This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ // force-host
2+ // no-prefer-dynamic
3+
4+ #![ crate_type = "proc-macro" ]
5+
6+ extern crate proc_macro;
7+
8+ use proc_macro:: TokenStream ;
9+
10+ #[ proc_macro_attribute]
11+ pub fn vec_ice ( _attr : TokenStream , input : TokenStream ) -> TokenStream {
12+ // This redundant convert is necessary to reproduce ICE.
13+ input. into_iter ( ) . collect ( )
14+ }
Original file line number Diff line number Diff line change 1+ // aux-build:issue-66286.rs
2+
3+ // Regression test for #66286.
4+
5+ extern crate issue_66286;
6+
7+ #[ issue_66286:: vec_ice]
8+ pub extern fn foo ( _: Vec ( u32 ) ) -> u32 {
9+ //~^ ERROR: parenthesized type parameters may only be used with a `Fn` trait
10+ 0
11+ }
12+
13+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
2+ --> $DIR/issue-66286.rs:8:22
3+ |
4+ LL | pub extern fn foo(_: Vec(u32)) -> u32 {
5+ | ^^^^^^^^
6+ | |
7+ | only `Fn` traits may use parentheses
8+ | help: use angle brackets instead: `Vec<u32>`
9+
10+ error: aborting due to previous error
11+
12+ For more information about this error, try `rustc --explain E0214`.
You can’t perform that action at this time.
0 commit comments