Benign crates 833,232 installs Download

rustc-ap-rustc_parse 664.0.0

“Automatically published version of the package `rustc_parse` in the rust-lang/rust repository from commit 9a27044f42ace9eb652781b53f598e25d…”

Contains an unbounded block loopSource references XOR syntax
SHA-2569cd7fc4968bd60084f2fa4f280fa450b0cf98660a7983d6b93a7ae41b6d1d322

Evidence

imports log::debug diagnostics.rs · lines 1–21
1use super::ty::AllowPlus;
2use super::{BlockMode, Parser, PathStyle, SemiColonMode, SeqSep, TokenExpectType, TokenType};
3
4use rustc_ast::ast::{self, BinOpKind, BindingMode, BlockCheckMode, Expr, ExprKind, Item, Param};
5use rustc_ast::ast::{AttrVec, ItemKind, Mutability, Pat, PatKind, PathSegment, QSelf, Ty, TyKind};
6use rustc_ast::ptr::P;
7use rustc_ast::token::{self, Lit, LitKind, TokenKind};
8use rustc_ast::util::parser::AssocOp;
9use rustc_ast_pretty::pprust;
10use rustc_data_structures::fx::FxHashSet;
11use rustc_errors::{pluralize, struct_span_err};
12use rustc_errors::{Applicability, DiagnosticBuilder, Handler, PResult};
13use rustc_span::source_map::Spanned;
14use rustc_span::symbol::{kw, Ident};
15use rustc_span::{MultiSpan, Span, SpanSnippetError, DUMMY_SP};
16
17use log::{debug, trace};
18
19const TURBOFISH: &str = "use `::<...>` instead of `<...>` to specify type arguments";
20
21/// Create …
Source references XOR syntax diagnostics.rs · lines 942–950
942:51… a close delimiter token.
943 //
944 // let a = std::process::Command::new("echo")
945 // .arg("1")
946 // ,arg("2")
947 // ^
948 // https://github.com/rust-lang/rust/issues/72253
949 self.expect(&token::Semi)?;
950 return Ok(()); …
Contains an unbounded block loop diagnostics.rs · lines 1266–1270
1266:36… loop (semi={:?}, block={:?})", break_on_semi, break_on_block);
1267 loop {
1268 debug!("recover_stmt_ loop {:?}", self.token);
1269 match self.token.kind {
1270 token::OpenDelim …
imports crate::maybe_recover_from_interpolated_ty_qpath pat.rs · lines 1–27
1use super::{Parser, PathStyle};
2use crate::{maybe_recover_from_interpolated_ty_qpath, maybe_whole};
3use rustc_ast::ast::{self, AttrVec, Attribute, FieldPat, MacCall, Pat, PatKind, RangeEnd};
4use rustc_ast::ast::{BindingMode, Expr, ExprKind, Mutability, Path, QSelf, RangeSyntax};
5use rustc_ast::mut_visit::{noop_visit_mac, noop_visit_pat, MutVisitor};
6use rustc_ast::ptr::P;
7use rustc_ast::token;
8use rustc_ast_pretty::pprust;
9use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder, PResult};
10use rustc_span::source_map::{respan, Span, Spanned};
11use rustc_span::symbol::{kw, sym, Ident};
12
13type Expected = Option<&'static str>;
14
15/// `Expected` for function and lambda parameter patterns.
16pub(super) const PARAM_EXPECTED: Expected = Some("parameter name");
17
18const WHILE_PARSING_OR_MSG: &str = "while parsing this or-pattern starting here";
19
20/// Whether or not an or-pattern should be gated when occurring in the current context.
21#[derive(PartialEq)]
22pub(super) enum GateOr {
⋯5 lines
Rust replaces matched string content pat.rs · lines 218–226
218:27… ertical bar to match on multiple alternatives",
219 seq_snippet.replace(",", " |"),
220 Applicability::MachineApplicable,
221 );
⋯5 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.