Skip to content

Commit

Permalink
Add internal_features lint
Browse files Browse the repository at this point in the history
It lints against features that are inteded to be internal to the
compiler and standard library. Implements MCP rust-lang#596.

We allow `internal_features` in the standard library and compiler as those
use many features and this _is_ the standard library from the "internal to the compiler and
standard library" after all.

Marking some features as internal wasn't exactly the most scientific approach, I just marked some
mostly obvious features. While there is a categorization in the macro,
it's not very well upheld (should probably be fixed in another PR).

We always pass `-Ainternal_features` in the testsuite
About 400 UI tests and several other tests use internal features.
Instead of throwing the attribute on each one, just always allow them.
There's nothing wrong with testing internal features^^
  • Loading branch information
Nilstrieb committed Aug 3, 2023
1 parent ff27f90 commit 85b5e98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ fn base_config(test_dir: &str) -> compiletest::Config {
[
"--emit=metadata",
"-Aunused",
"-Ainternal_features",
"-Zui-testing",
"-Dwarnings",
&format!("-Ldependency={}", deps_path.display()),
Expand Down

0 comments on commit 85b5e98

Please sign in to comment.