Clarify what specific name in the Core package is looked for when diagnosing that the Core package is not found (#4571)

I believe this makes the error easier to understand.
This commit is contained in:
Boaz Brickner
2024-11-22 15:48:18 +00:00
committed by GitHub
parent d870e0bd7c
commit bbd8b55be2
12 changed files with 19 additions and 17 deletions
@@ -10,7 +10,7 @@
interface I {}
// CHECK:STDERR: fail_impl_bad_type.carbon:[[@LINE+3]]:6: error: package `Core` implicitly referenced here, but not found [CoreNotFound]
// CHECK:STDERR: fail_impl_bad_type.carbon:[[@LINE+3]]:6: error: `Core.ImplicitAs` implicitly referenced here, but package `Core` not found [CoreNotFound]
// CHECK:STDERR: impl true as I {}
// CHECK:STDERR: ^~~~
impl true as I {}
@@ -30,7 +30,7 @@ import library "import_generic";
var c: C({}) = {};
// We're just checking that this doesn't crash. It's not expected to compile.
// CHECK:STDERR: fail_use_in_fn_decl.carbon:[[@LINE+7]]:11: error: package `Core` implicitly referenced here, but not found [CoreNotFound]
// CHECK:STDERR: fail_use_in_fn_decl.carbon:[[@LINE+7]]:11: error: `Core.ImplicitAs` implicitly referenced here, but package `Core` not found [CoreNotFound]
// CHECK:STDERR: fn F() -> c.(I.F)() {}
// CHECK:STDERR: ^~~~~~~~~
// CHECK:STDERR: