File tree Expand file tree Collapse file tree 4 files changed +55
-0
lines changed Expand file tree Collapse file tree 4 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ fn run_mode(mode: &'static str) {
19
19
fn compile_test ( ) {
20
20
run_mode ( "compile-fail" ) ;
21
21
run_mode ( "run-pass" ) ;
22
+ run_mode ( "ui" ) ;
22
23
23
24
#[ cfg( not( feature = "stable" ) ) ]
24
25
run_mode ( "pretty" ) ;
Original file line number Diff line number Diff line change
1
+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ // run-rustfix
12
+
13
+ #![allow(unused_variables)]
14
+ #![deny(keyword_idents)]
15
+
16
+ fn main() {
17
+ let r#dyn = (); //~ ERROR dyn
18
+ //~^ WARN hard error in the 2018 edition
19
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ // run-rustfix
12
+
13
+ #![ allow( unused_variables) ]
14
+ #![ deny( keyword_idents) ]
15
+
16
+ fn main ( ) {
17
+ let dyn = ( ) ; //~ ERROR dyn
18
+ //~^ WARN hard error in the 2018 edition
19
+ }
Original file line number Diff line number Diff line change
1
+ error: `dyn` is a keyword in the 2018 edition
2
+ --> $DIR/dyn-keyword.rs:17:9
3
+ |
4
+ 17 | let dyn = (); //~ ERROR dyn
5
+ | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn`
6
+ |
7
+ note: lint level defined here
8
+ --> $DIR/dyn-keyword.rs:14:9
9
+ |
10
+ 14 | #![deny(keyword_idents)]
11
+ | ^^^^^^^^^^^^^^
12
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
13
+ = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
14
+
15
+ error: aborting due to previous error
16
+
You can’t perform that action at this time.
0 commit comments