Skip to content

Commit 2ca9b2c

Browse files
authored
Rollup merge of rust-lang#132253 - Zalathar:keyword-idents-bug, r=jieyouxu
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).
2 parents a4acbd5 + dfafbc4 commit 2ca9b2c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Submodule file used by test `../multi-file.rs`.
2+
3+
// Keywords reserved from Rust 2018:
4+
fn async() {}
5+
fn await() {}
6+
fn try() {}
7+
fn dyn() {}
8+
9+
// Keywords reserved from Rust 2024:
10+
fn gen() {}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#![deny(keyword_idents)] // Should affect the submodule, but doesn't.
2+
//@ edition: 2015
3+
//@ known-bug: #132218
4+
//@ check-pass (known bug; should be check-fail)
5+
6+
// Because `keyword_idents_2018` and `keyword_idents_2024` are pre-expansion
7+
// lints, configuring them via lint attributes doesn't propagate to submodules
8+
// in other files.
9+
// <https://github.com/rust-lang/rust/issues/132218>
10+
11+
#[path = "./auxiliary/multi_file_submod.rs"]
12+
mod multi_file_submod;
13+
14+
fn main() {}

0 commit comments

Comments
 (0)