11 matches across 1 files for error lang:Rust lang:Rust path:compiler/rustc_ast/src/util/literal.rs
snippet_mode: auto · sorted by relevance
compiler/rustc_ast/src/util/literal.rs RUST 11 matches · showing 5 view file →
33
34#[derive(Debug)]
35pub enum LitError {
36 InvalidSuffix(Symbol),
37 InvalidIntSuffix(Symbol),
· · ·
43impl LitKind {
44 /// Converts literal token into a semantic literal.
45 pub fn from_token_lit(lit: token::Lit) -> Result<LitKind, LitError> {
46 let token::Lit { kind, symbol, suffix } = lit;
47 if let Some(suffix) = suffix
· · ·
48 && !kind.may_have_suffix()
49 {
50 return Err(LitError::InvalidSuffix(suffix));
51 }
52
· · ·
217impl MetaItemLit {
218 /// Converts a token literal into a meta item literal.
219 pub fn from_token_lit(token_lit: token::Lit, span: Span) -> Result<MetaItemLit, LitError> {
220 Ok(MetaItemLit {
221 symbol: token_lit.symbol,
· · ·
268 suffix: Option<Symbol>,
269 base: u32,
270) -> Result<LitKind, LitError> {
271 debug!("filtered_float_lit: {:?}, {:?}, {:?}", symbol, suffix, base);
272 if base != 10 {
+ 6 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.