Commit f8af227
committed
feat(semantic): Warn when an extern type/function is declared outside the corelib.
Adds the `extern_outside_corelib` warning (E2201), emitted on any `extern type`
or `extern fn` declared outside the core crate. Silenceable per-item with
`#[allow(extern_outside_corelib)]`; internal tests that declare externs are
annotated accordingly.1 parent 6296ede commit f8af227
78 files changed
Lines changed: 547 additions & 100 deletions
File tree
- crates
- cairo-lang-lowering/src
- analysis/test_data
- borrow_check/test_data
- cache/test_data
- lower
- flow_control/test_data
- test_data
- optimizations/test_data
- test_data
- cairo-lang-plugins/src/test_data
- cairo-lang-runner/src/profiling_test_data
- cairo-lang-semantic/src
- diagnostic_test_data
- expr
- semantic_test_data
- test_data
- items
- tests
- resolve
- cairo-lang-sierra-generator/src
- block_generator_test_data
- dummy_program_generator_test_data
- function_generator_test_data
- local_variables_test_data
- program_generator_test_data
- cairo-lang-starknet/cairo_level_tests/contracts
- cairo-lang-syntax/src/attribute
- tests
- bug_samples
- e2e_test_data
- libfuncs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1236 | 1236 | | |
1237 | 1237 | | |
1238 | 1238 | | |
| 1239 | + | |
1239 | 1240 | | |
1240 | 1241 | | |
1241 | 1242 | | |
| |||
1350 | 1351 | | |
1351 | 1352 | | |
1352 | 1353 | | |
| 1354 | + | |
1353 | 1355 | | |
1354 | 1356 | | |
1355 | 1357 | | |
| |||
1457 | 1459 | | |
1458 | 1460 | | |
1459 | 1461 | | |
| 1462 | + | |
1460 | 1463 | | |
1461 | 1464 | | |
1462 | 1465 | | |
| |||
1552 | 1555 | | |
1553 | 1556 | | |
1554 | 1557 | | |
| 1558 | + | |
1555 | 1559 | | |
1556 | 1560 | | |
1557 | 1561 | | |
| |||
1943 | 1947 | | |
1944 | 1948 | | |
1945 | 1949 | | |
| 1950 | + | |
1946 | 1951 | | |
1947 | 1952 | | |
1948 | 1953 | | |
| |||
0 commit comments