summaryrefslogtreecommitdiffstats
path: root/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed')
-rw-r--r--src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed82
1 files changed, 0 insertions, 82 deletions
diff --git a/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed b/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed
deleted file mode 100644
index c815080fc..000000000
--- a/src/test/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed
+++ /dev/null
@@ -1,82 +0,0 @@
-// Under the 2015 edition with the keyword_idents lint, `dyn` is not
-// entirely acceptable as an identifier. We currently do not attempt
-// to detect or fix uses of `dyn` under a macro. Since we are testing
-// this file via `rustfix`, we want the rustfix output to be
-// compilable; so the macros here carefully use `dyn` "correctly."
-//
-// edition:2015
-// run-rustfix
-
-#![allow(non_camel_case_types)]
-#![deny(keyword_idents)]
-
-mod outer_mod {
- pub mod r#dyn {
-//~^ ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
- pub struct r#dyn;
-//~^ ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
- }
-}
-use outer_mod::r#dyn::r#dyn;
-//~^ ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
-//~| ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
-
-fn main() {
- match r#dyn { r#dyn => {} }
-//~^ ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
-//~| ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
- macro_defn::r#dyn();
-//~^ ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
-
- macro_defn::boxed();
-}
-
-mod macro_defn {
- use super::Trait;
-
- macro_rules! r#dyn {
-//~^ ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
-
- // Note that we do not lint nor fix occurrences under macros
- ($dyn:tt) => { (Box<dyn Trait>, Box<$dyn Trait>) }
- }
-
- pub fn r#dyn() -> ::outer_mod::r#dyn::r#dyn {
-//~^ ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
-//~| ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
-//~| ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
- ::outer_mod::r#dyn::r#dyn
-//~^ ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
-//~| ERROR `dyn` is a keyword
-//~| WARN this is accepted in the current edition
- }
-
-
-
- pub fn boxed() -> r#dyn!(
- //~^ ERROR `dyn` is a keyword
- //~| WARN this is accepted in the current edition
-
- // Note that we do not lint nor fix occurrences under macros
- dyn
- )
- {
- (Box::new(1), Box::new(2))
- }
-}
-
-pub trait Trait { }
-
-impl Trait for u32 { }