diff options
Diffstat (limited to 'crates/proc_macro_srv/src')
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/diagnostic.rs | 9 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/rustc_server.rs | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/crates/proc_macro_srv/src/proc_macro/diagnostic.rs b/crates/proc_macro_srv/src/proc_macro/diagnostic.rs index 55d93917c..9ceda2a47 100644 --- a/crates/proc_macro_srv/src/proc_macro/diagnostic.rs +++ b/crates/proc_macro_srv/src/proc_macro/diagnostic.rs | |||
@@ -91,7 +91,7 @@ impl<'a> Iterator for Children<'a> { | |||
91 | impl Diagnostic { | 91 | impl Diagnostic { |
92 | /// Creates a new diagnostic with the given `level` and `message`. | 92 | /// Creates a new diagnostic with the given `level` and `message`. |
93 | pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic { | 93 | pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic { |
94 | Diagnostic { level: level, message: message.into(), spans: vec![], children: vec![] } | 94 | Diagnostic { level, message: message.into(), spans: vec![], children: vec![] } |
95 | } | 95 | } |
96 | 96 | ||
97 | /// Creates a new diagnostic with the given `level` and `message` pointing to | 97 | /// Creates a new diagnostic with the given `level` and `message` pointing to |
@@ -101,12 +101,7 @@ impl Diagnostic { | |||
101 | S: MultiSpan, | 101 | S: MultiSpan, |
102 | T: Into<String>, | 102 | T: Into<String>, |
103 | { | 103 | { |
104 | Diagnostic { | 104 | Diagnostic { level, message: message.into(), spans: spans.into_spans(), children: vec![] } |
105 | level: level, | ||
106 | message: message.into(), | ||
107 | spans: spans.into_spans(), | ||
108 | children: vec![], | ||
109 | } | ||
110 | } | 105 | } |
111 | 106 | ||
112 | diagnostic_child_methods!(span_error, error, Level::Error); | 107 | diagnostic_child_methods!(span_error, error, Level::Error); |
diff --git a/crates/proc_macro_srv/src/rustc_server.rs b/crates/proc_macro_srv/src/rustc_server.rs index 5d765f6e2..077b95ac8 100644 --- a/crates/proc_macro_srv/src/rustc_server.rs +++ b/crates/proc_macro_srv/src/rustc_server.rs | |||
@@ -539,7 +539,7 @@ impl server::Literal for Rustc { | |||
539 | } else { | 539 | } else { |
540 | n.parse::<u128>().unwrap().to_string() | 540 | n.parse::<u128>().unwrap().to_string() |
541 | }; | 541 | }; |
542 | return Literal { text: n.into(), id: tt::TokenId::unspecified() }; | 542 | Literal { text: n.into(), id: tt::TokenId::unspecified() } |
543 | } | 543 | } |
544 | 544 | ||
545 | fn typed_integer(&mut self, n: &str, kind: &str) -> Self::Literal { | 545 | fn typed_integer(&mut self, n: &str, kind: &str) -> Self::Literal { |