fix error message

This commit is contained in:
vms 2021-04-01 18:38:16 +03:00
parent fc320fe50d
commit a44e9aa700
4 changed files with 9 additions and 9 deletions

View File

@ -123,7 +123,7 @@ impl ParsedType {
}
_ if !type_segment.arguments.is_empty() => Err(Error::new(
type_segment.span(),
"type with lifetimes or generics aren't allowed".to_string(),
"types with lifetimes or generics aren't allowed".to_string(),
)),
_ => Ok(ParsedType::Record(
(&type_segment.ident).into_token_stream().to_string(),

View File

@ -1,16 +1,16 @@
error: type with lifetimes or generics aren't allowed
error: types with lifetimes or generics aren't allowed
--> $DIR/improper_types.rs:8:17
|
8 | fn test(_arg_1: Box<i32>) {}
| ^^^^^^^^
error: type with lifetimes or generics aren't allowed
error: types with lifetimes or generics aren't allowed
--> $DIR/improper_types.rs:11:27
|
11 | fn test2(_arg_1: std::rc::Rc<i32>) {}
| ^^^^^^^
error: type with lifetimes or generics aren't allowed
error: types with lifetimes or generics aren't allowed
--> $DIR/improper_types.rs:14:36
|
14 | fn test3(_arg_1: std::collections::HashMap<i32, String>) {}
@ -22,7 +22,7 @@ error: Incorrect argument type - passing only by value is supported now
17 | fn test4(_arg_1: i32) -> (i32, i32) {
| ^^^^^^^^^^
error: type with lifetimes or generics aren't allowed
error: types with lifetimes or generics aren't allowed
--> $DIR/improper_types.rs:22:26
|
22 | fn test5(_arg_1: i32) -> Box<i32> {

View File

@ -1,4 +1,4 @@
error: type with lifetimes or generics aren't allowed
error: types with lifetimes or generics aren't allowed
--> $DIR/improper_types.rs:11:21
|
11 | fn test(_arg_1: Box<i32>);

View File

@ -1,16 +1,16 @@
error: type with lifetimes or generics aren't allowed
error: types with lifetimes or generics aren't allowed
--> $DIR/struct_with_improper_types.rs:9:12
|
9 | pub a: Box<i32>,
| ^^^^^^^^
error: type with lifetimes or generics aren't allowed
error: types with lifetimes or generics aren't allowed
--> $DIR/struct_with_improper_types.rs:14:21
|
14 | pub a: std::rc::Rc<i32>,
| ^^^^^^^
error: type with lifetimes or generics aren't allowed
error: types with lifetimes or generics aren't allowed
--> $DIR/struct_with_improper_types.rs:19:30
|
19 | pub a: std::collections::HashMap<i32, String>,