Disallow calling `#[test]` functions from non-`#[test]` code
Open
compiler
compiler: frontend
forc-test
team:compiler
- Dominant language
- Rust
- Stars
- 61.4k
- Forks
- 5.4k
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 4
Description
Calling `#[test]` functions from non-test code shouldn't be particularly harmful, but is just a bit confusing and would make supporting `dev-dependencies` more complicated (or at least produce confusing results).
We should check function calls to ensure `#[test]` functions are never called from non-test code.
Contributor guide
No contributing guide indexed for this repository
Research direction
No files or tests are named. Start by locating the compiler checks for function calls and the handling of #[test] functions, then add coverage showing that non-test code cannot call them; done means those calls are rejected while calls from test code remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100