this repo has no description

Remove constructor

-41
-4
compiler-core/src/parse.rs
··· 96 97 #[derive(Debug, Eq, PartialEq, Clone)] 98 pub enum Warning { 99 - // TODO: remove after next release 100 - DeprecatedOptionBitString { location: SrcSpan }, 101 - // TODO: remove after next release 102 - DeprecatedOptionBinary { location: SrcSpan }, 103 ReservedWord { location: SrcSpan, word: EcoString }, 104 } 105
··· 96 97 #[derive(Debug, Eq, PartialEq, Clone)] 98 pub enum Warning { 99 ReservedWord { location: SrcSpan, word: EcoString }, 100 } 101
-37
compiler-core/src/warning.rs
··· 158 pub fn to_diagnostic(&self) -> Diagnostic { 159 match self { 160 Self::Parse { path, warning, src } => match warning { 161 - crate::parse::Warning::DeprecatedOptionBitString { location } => { 162 - let text = "This option has been replaced by the `bits` option.\n".into(); 163 - Diagnostic { 164 - title: "Deprecated bit literal option".into(), 165 - text, 166 - hint: Some("Run `gleam format` to auto-fix your code.".into()), 167 - level: diagnostic::Level::Warning, 168 - location: Some(Location { 169 - path: path.to_path_buf(), 170 - src: src.clone(), 171 - label: diagnostic::Label { 172 - text: None, 173 - span: *location, 174 - }, 175 - extra_labels: Vec::new(), 176 - }), 177 - } 178 - } 179 - 180 - crate::parse::Warning::DeprecatedOptionBinary { location } => { 181 - let text = "This option has been replaced by the `bytes` option.\n".into(); 182 - Diagnostic { 183 - title: "Deprecated bit literal option".into(), 184 - text, 185 - hint: Some("Run `gleam format` to auto-fix your code.".into()), 186 - level: diagnostic::Level::Warning, 187 - location: Some(Location { 188 - path: path.to_path_buf(), 189 - src: src.clone(), 190 - label: diagnostic::Label { 191 - text: None, 192 - span: *location, 193 - }, 194 - extra_labels: Vec::new(), 195 - }), 196 - } 197 - } 198 crate::parse::Warning::ReservedWord { location, word } => { 199 let text = format!( 200 "The word `{word}` has been reserved for future use.
··· 158 pub fn to_diagnostic(&self) -> Diagnostic { 159 match self { 160 Self::Parse { path, warning, src } => match warning { 161 crate::parse::Warning::ReservedWord { location, word } => { 162 let text = format!( 163 "The word `{word}` has been reserved for future use.