forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#132253 - Zalathar:keyword-idents-bug, r=jie…
…youxu Known-bug test for `keyword_idents` lint not propagating to other files Known-bug test for `keyword_idents` lint not propagating to other files when configured via attribute (rust-lang#132218).
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
tests/ui/lint/keyword-idents/auxiliary/multi_file_submod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Submodule file used by test `../multi-file.rs`. | ||
|
||
// Keywords reserved from Rust 2018: | ||
fn async() {} | ||
fn await() {} | ||
fn try() {} | ||
fn dyn() {} | ||
|
||
// Keywords reserved from Rust 2024: | ||
fn gen() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#![deny(keyword_idents)] // Should affect the submodule, but doesn't. | ||
//@ edition: 2015 | ||
//@ known-bug: #132218 | ||
//@ check-pass (known bug; should be check-fail) | ||
|
||
// Because `keyword_idents_2018` and `keyword_idents_2024` are pre-expansion | ||
// lints, configuring them via lint attributes doesn't propagate to submodules | ||
// in other files. | ||
// <https://github.com/rust-lang/rust/issues/132218> | ||
|
||
#[path = "./auxiliary/multi_file_submod.rs"] | ||
mod multi_file_submod; | ||
|
||
fn main() {} |