File tree 3 files changed +8
-9
lines changed
3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ fn main() {
11
11
Symbol::intern("foo") == rustc_span::sym::clippy;
12
12
Symbol::intern("foo") == rustc_span::symbol::kw::SelfLower;
13
13
Symbol::intern("foo") != rustc_span::symbol::kw::SelfUpper;
14
- Ident::invalid ().name == rustc_span::sym::clippy;
15
- rustc_span::sym::clippy == Ident::invalid ().name;
14
+ Ident::empty ().name == rustc_span::sym::clippy;
15
+ rustc_span::sym::clippy == Ident::empty ().name;
16
16
}
Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ fn main() {
11
11
Symbol :: intern ( "foo" ) . as_str ( ) == "clippy" ;
12
12
Symbol :: intern ( "foo" ) . to_string ( ) == "self" ;
13
13
Symbol :: intern ( "foo" ) . to_ident_string ( ) != "Self" ;
14
- & * Ident :: invalid ( ) . as_str ( ) == "clippy" ;
15
- "clippy" == Ident :: invalid ( ) . to_string ( ) ;
14
+ & * Ident :: empty ( ) . as_str ( ) == "clippy" ;
15
+ "clippy" == Ident :: empty ( ) . to_string ( ) ;
16
16
}
Original file line number Diff line number Diff line change @@ -26,14 +26,13 @@ LL | Symbol::intern("foo").to_ident_string() != "Self";
26
26
error: unnecessary `Symbol` to string conversion
27
27
--> $DIR/unnecessary_symbol_str.rs:14:5
28
28
|
29
- LL | &*Ident::invalid ().as_str() == "clippy";
30
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Ident::invalid ().name == rustc_span::sym::clippy`
29
+ LL | &*Ident::empty ().as_str() == "clippy";
30
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Ident::empty ().name == rustc_span::sym::clippy`
31
31
32
32
error: unnecessary `Symbol` to string conversion
33
33
--> $DIR/unnecessary_symbol_str.rs:15:5
34
34
|
35
- LL | "clippy" == Ident::invalid ().to_string();
36
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::clippy == Ident::invalid ().name`
35
+ LL | "clippy" == Ident::empty ().to_string();
36
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::clippy == Ident::empty ().name`
37
37
38
38
error: aborting due to 5 previous errors
39
-
You can’t perform that action at this time.
0 commit comments