This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ fn main() {
1111 Symbol::intern("foo") == rustc_span::sym::clippy;
1212 Symbol::intern("foo") == rustc_span::symbol::kw::SelfLower;
1313 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;
1616}
Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ fn main() {
1111 Symbol :: intern ( "foo" ) . as_str ( ) == "clippy" ;
1212 Symbol :: intern ( "foo" ) . to_string ( ) == "self" ;
1313 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 ( ) ;
1616}
Original file line number Diff line number Diff line change @@ -26,14 +26,13 @@ LL | Symbol::intern("foo").to_ident_string() != "Self";
2626error: unnecessary `Symbol` to string conversion
2727 --> $DIR/unnecessary_symbol_str.rs:14:5
2828 |
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`
3131
3232error: unnecessary `Symbol` to string conversion
3333 --> $DIR/unnecessary_symbol_str.rs:15:5
3434 |
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`
3737
3838error: aborting due to 5 previous errors
39-
You can’t perform that action at this time.
0 commit comments