⭐️ A friendly language for building type-safe, scalable systems!

clippy

authored by giacomocavalieri.me and committed by Louis Pilfold aa27a823 9e64f324

Changed files
+8 -8
compiler-core
src
+8 -8
compiler-core/src/error.rs
··· 4274 4274 ParseErrorType::ListSpreadWithAnotherSpread { first_spread_location, second_spread_location } => 4275 4275 Diagnostic { 4276 4276 title, 4277 - text: vec![ 4277 + text: [ 4278 4278 "Lists are immutable and singly-linked, so to join two or more lists", 4279 4279 "all the elements of the lists would need to be copied into a new list.", 4280 4280 "This would be slow, so there is no built-in syntax for it.", ··· 4303 4303 ParseErrorType::ListSpreadFollowedByElements => 4304 4304 Diagnostic { 4305 4305 title, 4306 - text: vec![ 4306 + text: [ 4307 4307 "Lists are immutable and singly-linked, so to append items to them", 4308 4308 "all the elements of a list would need to be copied into a new list.", 4309 4309 "This would be slow, so there is no built-in syntax for it.", ··· 4326 4326 ParseErrorType::ListPatternSpreadFollowedByElements => 4327 4327 Diagnostic { 4328 4328 title, 4329 - text: vec![ 4329 + text: [ 4330 4330 "Lists are immutable and singly-linked, so to match on the end", 4331 4331 "of a list would require the whole list to be traversed. This", 4332 4332 "would be slow, so there is no built-in syntax for it. Pattern", ··· 4442 4442 ParseErrorType::ConcatPatternVariableLeftHandSide => 4443 4443 Diagnostic { 4444 4444 title, 4445 - text: vec![ 4445 + text: [ 4446 4446 "We can't tell what size this prefix should be so we don't know", 4447 4447 "how to handle this pattern.", 4448 4448 "", ··· 4584 4584 ParseErrorType::InvalidModuleTypePattern => 4585 4585 Diagnostic { 4586 4586 title, 4587 - text: vec![ 4587 + text: [ 4588 4588 "I'm expecting a pattern here", 4589 4589 "Hint: A pattern can be a constructor name, a literal value", 4590 4590 "or a variable to bind a value to, etc.", ··· 4624 4624 4625 4625 Diagnostic { 4626 4626 title, 4627 - text: vec![ 4627 + text: [ 4628 4628 "Each custom type variant must have a constructor:\n".into(), 4629 4629 format!("{accessor}{opaque}type {name} {{"), 4630 4630 format!(" {name}("), ··· 4666 4666 ParseErrorType::IfExpression => 4667 4667 Diagnostic { 4668 4668 title, 4669 - text: vec![ 4669 + text: [ 4670 4670 "If you want to write a conditional expression you can use a `case`:", 4671 4671 "", 4672 4672 " case condition {", ··· 4760 4760 ParseErrorType::IncorrectImportModuleSeparator { module, item } => 4761 4761 Diagnostic { 4762 4762 title, 4763 - text: vec![ 4763 + text: [ 4764 4764 "Perhaps you meant one of:".into(), 4765 4765 "".into(), 4766 4766 format!(" import {module}/{item}"),