Skip to content

Known-bug test for keyword_idents lint not propagating to other files #132253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/ui/lint/keyword-idents/auxiliary/multi_file_submod.rs
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() {}
14 changes: 14 additions & 0 deletions tests/ui/lint/keyword-idents/multi-file.rs
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() {}
Loading