Skip to content

Commit fbbd1e9

Browse files
committed
Tweaks
1 parent 3b78e3c commit fbbd1e9

7 files changed

+18
-8
lines changed

compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__dead_code_detection__shadowed_imported_value_marked_unused.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
source: compiler-core/src/type_/tests/dead_code_detection.rs
3+
assertion_line: 431
34
expression: "\nimport wibble.{wibble}\n\npub const wibble = 2\n"
5+
snapshot_kind: text
46
---
57
----- SOURCE CODE
68
-- wibble.gleam
@@ -32,4 +34,4 @@ warning: Shadowed Import
3234

3335
Definition of wibble shadows an imported value.
3436
The imported value could not be used in this module anyway.
35-
Hint: Either rename the definition or remove its import.
37+
Hint: Either rename the definition or remove the import.

compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__dead_code_detection__used_shadowed_imported_value.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
source: compiler-core/src/type_/tests/dead_code_detection.rs
3+
assertion_line: 448
34
expression: "\nimport wibble.{wibble}\n\npub const wibble = wibble\n"
5+
snapshot_kind: text
46
---
57
----- SOURCE CODE
68
-- wibble.gleam
@@ -24,4 +26,4 @@ warning: Shadowed Import
2426

2527
Definition of wibble shadows an imported value.
2628
The imported value could not be used in this module anyway.
27-
Hint: Either rename the definition or remove its import.
29+
Hint: Either rename the definition or remove the import.

compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__warnings__shadow_imported_constant.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
source: compiler-core/src/type_/tests/warnings.rs
3+
assertion_line: 3950
34
expression: "\nimport module.{value}\n\npub const value = 1\n"
5+
snapshot_kind: text
46
---
57
----- SOURCE CODE
68
-- module.gleam
@@ -32,4 +34,4 @@ warning: Shadowed Import
3234

3335
Definition of value shadows an imported value.
3436
The imported value could not be used in this module anyway.
35-
Hint: Either rename the definition or remove its import.
37+
Hint: Either rename the definition or remove the import.

compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__warnings__shadow_imported_function.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
source: compiler-core/src/type_/tests/warnings.rs
3+
assertion_line: 3932
34
expression: "\nimport module.{wibble}\n\npub fn wibble() { Nil }\n"
5+
snapshot_kind: text
46
---
57
----- SOURCE CODE
68
-- module.gleam
@@ -32,4 +34,4 @@ warning: Shadowed Import
3234

3335
Definition of wibble shadows an imported value.
3436
The imported value could not be used in this module anyway.
35-
Hint: Either rename the definition or remove its import.
37+
Hint: Either rename the definition or remove the import.

compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__warnings__unused_alias_warning_test.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
source: compiler-core/src/type_/tests/warnings.rs
3+
assertion_line: 974
34
expression: "\n import gleam/wibble.{one} as wobble\n pub const one = one\n "
5+
snapshot_kind: text
46
---
57
----- SOURCE CODE
68
-- gleam/wibble.gleam
@@ -32,4 +34,4 @@ warning: Shadowed Import
3234

3335
Definition of one shadows an imported value.
3436
The imported value could not be used in this module anyway.
35-
Hint: Either rename the definition or remove its import.
37+
Hint: Either rename the definition or remove the import.

compiler-core/src/warning.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,8 +1305,8 @@ can already tell whether it will be true or false.",
13051305

13061306
type_::Warning::TopLevelDefinitionShadowsImport { location, name } => {
13071307
let text = format!(
1308-
"Definition of {} shadows an imported value.\n\
1309-
The imported value could not be used in this module anyway.",
1308+
"Definition of {} shadows an imported value.
1309+
The imported value could not be used in this module anyway.",
13101310
name
13111311
);
13121312
Diagnostic {
@@ -1322,7 +1322,7 @@ can already tell whether it will be true or false.",
13221322
},
13231323
extra_labels: Vec::new(),
13241324
}),
1325-
hint: Some("Either rename the definition or remove its import.".into()),
1325+
hint: Some("Either rename the definition or remove the import.".into()),
13261326
}
13271327
}
13281328
},

0 commit comments

Comments
 (0)