mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
improved phantom type message
This commit is contained in:
parent
7e4a1ef4bd
commit
c42b5a1e5b
2 changed files with 10 additions and 2 deletions
|
@ -425,7 +425,12 @@ pub fn can_problem<'b>(
|
|||
alloc.reflow(" alias definition:"),
|
||||
]),
|
||||
alloc.region(variable_region),
|
||||
alloc.reflow("Roc does not allow phantom type parameters!"),
|
||||
alloc.reflow("Roc does not allow unused type parameters!"),
|
||||
// TODO add link to this guide section
|
||||
alloc.hint().append(alloc.reflow(
|
||||
"If you want an unused type parameter (a so-called \"phantom type\"), \
|
||||
read the guide section on phantom data.",
|
||||
)),
|
||||
]),
|
||||
Problem::DuplicateRecordFieldValue {
|
||||
field_name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue