From a44e9aa7006262c8c01defc0eeef67f51ffb8374 Mon Sep 17 00:00:00 2001 From: vms Date: Thu, 1 Apr 2021 18:38:16 +0300 Subject: [PATCH] fix error message --- crates/wit/src/parsed_type.rs | 2 +- fluence/tests/export_functions/improper_types.stderr | 8 ++++---- fluence/tests/import_functions/improper_types.stderr | 2 +- fluence/tests/records/struct_with_improper_types.stderr | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/wit/src/parsed_type.rs b/crates/wit/src/parsed_type.rs index 955bf4d..ea82523 100644 --- a/crates/wit/src/parsed_type.rs +++ b/crates/wit/src/parsed_type.rs @@ -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(), diff --git a/fluence/tests/export_functions/improper_types.stderr b/fluence/tests/export_functions/improper_types.stderr index a77fcc0..484a611 100644 --- a/fluence/tests/export_functions/improper_types.stderr +++ b/fluence/tests/export_functions/improper_types.stderr @@ -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) {} | ^^^^^^^^ -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) {} | ^^^^^^^ -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) {} @@ -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 { diff --git a/fluence/tests/import_functions/improper_types.stderr b/fluence/tests/import_functions/improper_types.stderr index 6879314..af4f71d 100644 --- a/fluence/tests/import_functions/improper_types.stderr +++ b/fluence/tests/import_functions/improper_types.stderr @@ -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); diff --git a/fluence/tests/records/struct_with_improper_types.stderr b/fluence/tests/records/struct_with_improper_types.stderr index 8275e88..c6584d4 100644 --- a/fluence/tests/records/struct_with_improper_types.stderr +++ b/fluence/tests/records/struct_with_improper_types.stderr @@ -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, | ^^^^^^^^ -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, | ^^^^^^^ -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,