Skip to content

Commit 124dab9

Browse files
committed
Auto merge of rust-lang#134411 - jhpratt:rollup-3ozrvej, r=jhpratt
Rollup of 9 pull requests Successful merges: - rust-lang#133265 (Add a range argument to vec.extract_if) - rust-lang#134202 (Remove `rustc::existing_doc_keyword` lint) - rust-lang#134354 (Handle fndef rendering together with signature rendering) - rust-lang#134365 (Rename `rustc_mir_build::build` to `builder`) - rust-lang#134368 (Use links to edition guide for edition migrations) - rust-lang#134388 (Update books) - rust-lang#134397 (rustc_borrowck: Suggest changing `&raw const` to `&raw mut` if applicable) - rust-lang#134398 (AIX: add alignment info for test) - rust-lang#134400 (Fix some comments related to upvars handling) Failed merges: - rust-lang#134399 (Do not do if ! else, use unnegated cond and swap the branches instead) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 978c659 + e780f52 commit 124dab9

File tree

121 files changed

+547
-531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+547
-531
lines changed

Cargo.lock

-1
Original file line numberDiff line numberDiff line change
@@ -4275,7 +4275,6 @@ dependencies = [
42754275
"rustc_fluent_macro",
42764276
"rustc_hir",
42774277
"rustc_index",
4278-
"rustc_lexer",
42794278
"rustc_macros",
42804279
"rustc_middle",
42814280
"rustc_privacy",

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

+20-10
Original file line numberDiff line numberDiff line change
@@ -1474,16 +1474,27 @@ fn suggest_ampmut<'tcx>(
14741474
// let x: &i32 = &'a 5;
14751475
// ^^ lifetime annotation not allowed
14761476
//
1477-
if let Some(assignment_rhs_span) = opt_assignment_rhs_span
1478-
&& let Ok(src) = tcx.sess.source_map().span_to_snippet(assignment_rhs_span)
1479-
&& let Some(stripped) = src.strip_prefix('&')
1477+
if let Some(rhs_span) = opt_assignment_rhs_span
1478+
&& let Ok(rhs_str) = tcx.sess.source_map().span_to_snippet(rhs_span)
1479+
&& let Some(rhs_str_no_amp) = rhs_str.strip_prefix('&')
14801480
{
1481-
let is_raw_ref = stripped.trim_start().starts_with("raw ");
1482-
// We don't support raw refs yet
1483-
if is_raw_ref {
1484-
return None;
1481+
// Suggest changing `&raw const` to `&raw mut` if applicable.
1482+
if rhs_str_no_amp.trim_start().strip_prefix("raw const").is_some() {
1483+
let const_idx = rhs_str.find("const").unwrap() as u32;
1484+
let const_span = rhs_span
1485+
.with_lo(rhs_span.lo() + BytePos(const_idx))
1486+
.with_hi(rhs_span.lo() + BytePos(const_idx + "const".len() as u32));
1487+
1488+
return Some(AmpMutSugg {
1489+
has_sugg: true,
1490+
span: const_span,
1491+
suggestion: "mut".to_owned(),
1492+
additional: None,
1493+
});
14851494
}
1486-
let is_mut = if let Some(rest) = stripped.trim_start().strip_prefix("mut") {
1495+
1496+
// Figure out if rhs already is `&mut`.
1497+
let is_mut = if let Some(rest) = rhs_str_no_amp.trim_start().strip_prefix("mut") {
14871498
match rest.chars().next() {
14881499
// e.g. `&mut x`
14891500
Some(c) if c.is_whitespace() => true,
@@ -1500,9 +1511,8 @@ fn suggest_ampmut<'tcx>(
15001511
// if the reference is already mutable then there is nothing we can do
15011512
// here.
15021513
if !is_mut {
1503-
let span = assignment_rhs_span;
15041514
// shrink the span to just after the `&` in `&variable`
1505-
let span = span.with_lo(span.lo() + BytePos(1)).shrink_to_lo();
1515+
let span = rhs_span.with_lo(rhs_span.lo() + BytePos(1)).shrink_to_lo();
15061516

15071517
// FIXME(Ezrashaw): returning is bad because we still might want to
15081518
// update the annotated type, see #106857.

compiler/rustc_errors/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1569,18 +1569,18 @@ impl DiagCtxtInner {
15691569
debug!(?diagnostic);
15701570
debug!(?self.emitted_diagnostics);
15711571

1572-
let already_emitted_sub = |sub: &mut Subdiag| {
1572+
let not_yet_emitted = |sub: &mut Subdiag| {
15731573
debug!(?sub);
15741574
if sub.level != OnceNote && sub.level != OnceHelp {
1575-
return false;
1575+
return true;
15761576
}
15771577
let mut hasher = StableHasher::new();
15781578
sub.hash(&mut hasher);
15791579
let diagnostic_hash = hasher.finish();
15801580
debug!(?diagnostic_hash);
1581-
!self.emitted_diagnostics.insert(diagnostic_hash)
1581+
self.emitted_diagnostics.insert(diagnostic_hash)
15821582
};
1583-
diagnostic.children.extract_if(already_emitted_sub).for_each(|_| {});
1583+
diagnostic.children.retain_mut(not_yet_emitted);
15841584
if already_emitted {
15851585
let msg = "duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`";
15861586
diagnostic.sub(Note, msg, MultiSpan::new());

compiler/rustc_hir_typeck/src/upvar.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! to everything owned by `x`, so the result is the same for something
1515
//! like `x.f = 5` and so on (presuming `x` is not a borrowed pointer to a
1616
//! struct). These adjustments are performed in
17-
//! `adjust_upvar_borrow_kind()` (you can trace backwards through the code
17+
//! `adjust_for_non_move_closure` (you can trace backwards through the code
1818
//! from there).
1919
//!
2020
//! The fact that we are inferring borrow kinds as we go results in a
@@ -1684,8 +1684,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
16841684
// want to capture by ref to allow precise capture using reborrows.
16851685
//
16861686
// If the data will be moved out of this place, then the place will be truncated
1687-
// at the first Deref in `adjust_upvar_borrow_kind_for_consume` and then moved into
1688-
// the closure.
1687+
// at the first Deref in `adjust_for_move_closure` and then moved into the closure.
16891688
hir::CaptureBy::Value { .. } if !place.deref_tys().any(Ty::is_ref) => {
16901689
ty::UpvarCapture::ByValue
16911690
}

compiler/rustc_lint/messages.ftl

-3
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,6 @@ lint_non_camel_case_type = {$sort} `{$name}` should have an upper camel case nam
536536
.suggestion = convert the identifier to upper camel case
537537
.label = should have an UpperCamelCase name
538538
539-
lint_non_existent_doc_keyword = found non-existing keyword `{$keyword}` used in `#[doc(keyword = "...")]`
540-
.help = only existing keywords are allowed in core/std
541-
542539
lint_non_fmt_panic = panic message is not a string literal
543540
.note = this usage of `{$name}!()` is deprecated; it will be a hard error in Rust 2021
544541
.more_info_note = for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>

compiler/rustc_lint/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,7 @@ declare_lint! {
18141814
"detects edition keywords being used as an identifier",
18151815
@future_incompatible = FutureIncompatibleInfo {
18161816
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
1817-
reference: "issue #49716 <https://github.com/rust-lang/rust/issues/49716>",
1817+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/gen-keyword.html>",
18181818
};
18191819
}
18201820

compiler/rustc_lint/src/if_let_rescope.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ declare_lint! {
8484
rewriting in `match` is an option to preserve the semantics up to Edition 2021",
8585
@future_incompatible = FutureIncompatibleInfo {
8686
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
87-
reference: "issue #124085 <https://github.com/rust-lang/rust/issues/124085>",
87+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>",
8888
};
8989
}
9090

compiler/rustc_lint/src/internal.rs

+2-42
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ use rustc_middle::ty::{self, GenericArgsRef, Ty as MiddleTy};
1212
use rustc_session::{declare_lint_pass, declare_tool_lint};
1313
use rustc_span::Span;
1414
use rustc_span::hygiene::{ExpnKind, MacroKind};
15-
use rustc_span::symbol::{Symbol, kw, sym};
15+
use rustc_span::symbol::sym;
1616
use tracing::debug;
1717

1818
use crate::lints::{
19-
BadOptAccessDiag, DefaultHashTypesDiag, DiagOutOfImpl, LintPassByHand, NonExistentDocKeyword,
19+
BadOptAccessDiag, DefaultHashTypesDiag, DiagOutOfImpl, LintPassByHand,
2020
NonGlobImportTypeIrInherent, QueryInstability, QueryUntracked, SpanUseEqCtxtDiag,
2121
SymbolInternStringLiteralDiag, TyQualified, TykindDiag, TykindKind, TypeIrInherentUsage,
2222
UntranslatableDiag,
@@ -375,46 +375,6 @@ impl EarlyLintPass for LintPassImpl {
375375
}
376376
}
377377

378-
declare_tool_lint! {
379-
/// The `existing_doc_keyword` lint detects use `#[doc()]` keywords
380-
/// that don't exist, e.g. `#[doc(keyword = "..")]`.
381-
pub rustc::EXISTING_DOC_KEYWORD,
382-
Allow,
383-
"Check that documented keywords in std and core actually exist",
384-
report_in_external_macro: true
385-
}
386-
387-
declare_lint_pass!(ExistingDocKeyword => [EXISTING_DOC_KEYWORD]);
388-
389-
fn is_doc_keyword(s: Symbol) -> bool {
390-
s <= kw::Union
391-
}
392-
393-
impl<'tcx> LateLintPass<'tcx> for ExistingDocKeyword {
394-
fn check_item(&mut self, cx: &LateContext<'_>, item: &rustc_hir::Item<'_>) {
395-
for attr in cx.tcx.hir().attrs(item.hir_id()) {
396-
if !attr.has_name(sym::doc) {
397-
continue;
398-
}
399-
if let Some(list) = attr.meta_item_list() {
400-
for nested in list {
401-
if nested.has_name(sym::keyword) {
402-
let keyword = nested
403-
.value_str()
404-
.expect("#[doc(keyword = \"...\")] expected a value!");
405-
if is_doc_keyword(keyword) {
406-
return;
407-
}
408-
cx.emit_span_lint(EXISTING_DOC_KEYWORD, attr.span, NonExistentDocKeyword {
409-
keyword,
410-
});
411-
}
412-
}
413-
}
414-
}
415-
}
416-
}
417-
418378
declare_tool_lint! {
419379
/// The `untranslatable_diagnostic` lint detects messages passed to functions with `impl
420380
/// Into<{D,Subd}iagMessage` parameters without using translatable Fluent strings.

compiler/rustc_lint/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -600,8 +600,6 @@ fn register_internals(store: &mut LintStore) {
600600
store.register_late_mod_pass(|_| Box::new(DefaultHashTypes));
601601
store.register_lints(&QueryStability::lint_vec());
602602
store.register_late_mod_pass(|_| Box::new(QueryStability));
603-
store.register_lints(&ExistingDocKeyword::lint_vec());
604-
store.register_late_mod_pass(|_| Box::new(ExistingDocKeyword));
605603
store.register_lints(&TyTyKind::lint_vec());
606604
store.register_late_mod_pass(|_| Box::new(TyTyKind));
607605
store.register_lints(&TypeIr::lint_vec());
@@ -629,7 +627,6 @@ fn register_internals(store: &mut LintStore) {
629627
LintId::of(LINT_PASS_IMPL_WITHOUT_MACRO),
630628
LintId::of(USAGE_OF_QUALIFIED_TY),
631629
LintId::of(NON_GLOB_IMPORT_OF_TYPE_IR_INHERENT),
632-
LintId::of(EXISTING_DOC_KEYWORD),
633630
LintId::of(BAD_OPT_ACCESS),
634631
LintId::of(SPAN_USE_EQ_CTXT),
635632
]);

compiler/rustc_lint/src/lints.rs

-7
Original file line numberDiff line numberDiff line change
@@ -950,13 +950,6 @@ pub(crate) struct NonGlobImportTypeIrInherent {
950950
#[help]
951951
pub(crate) struct LintPassByHand;
952952

953-
#[derive(LintDiagnostic)]
954-
#[diag(lint_non_existent_doc_keyword)]
955-
#[help]
956-
pub(crate) struct NonExistentDocKeyword {
957-
pub keyword: Symbol,
958-
}
959-
960953
#[derive(LintDiagnostic)]
961954
#[diag(lint_diag_out_of_impl)]
962955
pub(crate) struct DiagOutOfImpl;

compiler/rustc_lint/src/non_ascii_idents.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl EarlyLintPass for NonAsciiIdents {
205205
(IdentifierType::Not_NFKC, "Not_NFKC"),
206206
] {
207207
let codepoints: Vec<_> =
208-
chars.extract_if(|(_, ty)| *ty == Some(id_ty)).collect();
208+
chars.extract_if(.., |(_, ty)| *ty == Some(id_ty)).collect();
209209
if codepoints.is_empty() {
210210
continue;
211211
}
@@ -217,7 +217,7 @@ impl EarlyLintPass for NonAsciiIdents {
217217
}
218218

219219
let remaining = chars
220-
.extract_if(|(c, _)| !GeneralSecurityProfile::identifier_allowed(*c))
220+
.extract_if(.., |(c, _)| !GeneralSecurityProfile::identifier_allowed(*c))
221221
.collect::<Vec<_>>();
222222
if !remaining.is_empty() {
223223
cx.emit_span_lint(UNCOMMON_CODEPOINTS, sp, IdentifierUncommonCodepoints {

compiler/rustc_lint/src/shadowed_into_iter.rs

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ declare_lint! {
6161
"detects calling `into_iter` on boxed slices in Rust 2015, 2018, and 2021",
6262
@future_incompatible = FutureIncompatibleInfo {
6363
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
64+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/intoiterator-box-slice.html>"
6465
};
6566
}
6667

compiler/rustc_lint_defs/src/builtin.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,7 @@ declare_lint! {
16771677
"detects patterns whose meaning will change in Rust 2024",
16781678
@future_incompatible = FutureIncompatibleInfo {
16791679
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
1680-
reference: "123076",
1680+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>",
16811681
};
16821682
}
16831683

@@ -2606,7 +2606,7 @@ declare_lint! {
26062606
"unsafe operations in unsafe functions without an explicit unsafe block are deprecated",
26072607
@future_incompatible = FutureIncompatibleInfo {
26082608
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
2609-
reference: "issue #71668 <https://github.com/rust-lang/rust/issues/71668>",
2609+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>",
26102610
explain_reason: false
26112611
};
26122612
@edition Edition2024 => Warn;
@@ -4189,7 +4189,7 @@ declare_lint! {
41894189
"never type fallback affecting unsafe function calls",
41904190
@future_incompatible = FutureIncompatibleInfo {
41914191
reason: FutureIncompatibilityReason::EditionAndFutureReleaseSemanticsChange(Edition::Edition2024),
4192-
reference: "issue #123748 <https://github.com/rust-lang/rust/issues/123748>",
4192+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html>",
41934193
};
41944194
@edition Edition2024 => Deny;
41954195
report_in_external_macro
@@ -4243,7 +4243,7 @@ declare_lint! {
42434243
"never type fallback affecting unsafe function calls",
42444244
@future_incompatible = FutureIncompatibleInfo {
42454245
reason: FutureIncompatibilityReason::EditionAndFutureReleaseError(Edition::Edition2024),
4246-
reference: "issue #123748 <https://github.com/rust-lang/rust/issues/123748>",
4246+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html>",
42474247
};
42484248
report_in_external_macro
42494249
}
@@ -4790,7 +4790,7 @@ declare_lint! {
47904790
"detects unsafe functions being used as safe functions",
47914791
@future_incompatible = FutureIncompatibleInfo {
47924792
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
4793-
reference: "issue #27970 <https://github.com/rust-lang/rust/issues/27970>",
4793+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/newly-unsafe-functions.html>",
47944794
};
47954795
}
47964796

@@ -4826,7 +4826,7 @@ declare_lint! {
48264826
"detects missing unsafe keyword on extern declarations",
48274827
@future_incompatible = FutureIncompatibleInfo {
48284828
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
4829-
reference: "issue #123743 <https://github.com/rust-lang/rust/issues/123743>",
4829+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-extern.html>",
48304830
};
48314831
}
48324832

@@ -4867,7 +4867,7 @@ declare_lint! {
48674867
"detects unsafe attributes outside of unsafe",
48684868
@future_incompatible = FutureIncompatibleInfo {
48694869
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
4870-
reference: "issue #123757 <https://github.com/rust-lang/rust/issues/123757>",
4870+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-attributes.html>",
48714871
};
48724872
}
48734873

@@ -5069,7 +5069,7 @@ declare_lint! {
50695069
"Detect and warn on significant change in drop order in tail expression location",
50705070
@future_incompatible = FutureIncompatibleInfo {
50715071
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
5072-
reference: "issue #123739 <https://github.com/rust-lang/rust/issues/123739>",
5072+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>",
50735073
};
50745074
}
50755075

@@ -5108,7 +5108,7 @@ declare_lint! {
51085108
"will be parsed as a guarded string in Rust 2024",
51095109
@future_incompatible = FutureIncompatibleInfo {
51105110
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
5111-
reference: "issue #123735 <https://github.com/rust-lang/rust/issues/123735>",
5111+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/reserved-syntax.html>",
51125112
};
51135113
crate_level_only
51145114
}

compiler/rustc_metadata/src/native_libs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ impl<'tcx> Collector<'tcx> {
544544
// can move them to the end of the list below.
545545
let mut existing = self
546546
.libs
547-
.extract_if(|lib| {
547+
.extract_if(.., |lib| {
548548
if lib.name.as_str() == passed_lib.name {
549549
// FIXME: This whole logic is questionable, whether modifiers are
550550
// involved or not, library reordering and kind overriding without

compiler/rustc_middle/src/ty/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ pub fn suggest_constraining_type_params<'a>(
309309
let Some(param) = param else { return false };
310310

311311
{
312-
let mut sized_constraints = constraints.extract_if(|(_, def_id, _)| {
312+
let mut sized_constraints = constraints.extract_if(.., |(_, def_id, _)| {
313313
def_id.is_some_and(|def_id| tcx.is_lang_item(def_id, LangItem::Sized))
314314
});
315315
if let Some((_, def_id, _)) = sized_constraints.next() {

compiler/rustc_mir_build/src/build/block.rs renamed to compiler/rustc_mir_build/src/builder/block.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use rustc_middle::{span_bug, ty};
55
use rustc_span::Span;
66
use tracing::debug;
77

8-
use crate::build::ForGuard::OutsideGuard;
9-
use crate::build::matches::{DeclareLetBindings, EmitStorageLive, ScheduleDrops};
10-
use crate::build::{BlockAnd, BlockAndExtension, BlockFrame, Builder};
8+
use crate::builder::ForGuard::OutsideGuard;
9+
use crate::builder::matches::{DeclareLetBindings, EmitStorageLive, ScheduleDrops};
10+
use crate::builder::{BlockAnd, BlockAndExtension, BlockFrame, Builder};
1111

1212
impl<'a, 'tcx> Builder<'a, 'tcx> {
1313
pub(crate) fn ast_block(

compiler/rustc_mir_build/src/build/cfg.rs renamed to compiler/rustc_mir_build/src/builder/cfg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc_middle::mir::*;
44
use rustc_middle::ty::TyCtxt;
55
use tracing::debug;
66

7-
use crate::build::CFG;
7+
use crate::builder::CFG;
88

99
impl<'tcx> CFG<'tcx> {
1010
pub(crate) fn block_data(&self, blk: BasicBlock) -> &BasicBlockData<'tcx> {

compiler/rustc_mir_build/src/build/coverageinfo.rs renamed to compiler/rustc_mir_build/src/builder/coverageinfo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use rustc_middle::thir::{ExprId, ExprKind, Pat, Thir};
88
use rustc_middle::ty::TyCtxt;
99
use rustc_span::def_id::LocalDefId;
1010

11-
use crate::build::coverageinfo::mcdc::MCDCInfoBuilder;
12-
use crate::build::{Builder, CFG};
11+
use crate::builder::coverageinfo::mcdc::MCDCInfoBuilder;
12+
use crate::builder::{Builder, CFG};
1313

1414
mod mcdc;
1515

compiler/rustc_mir_build/src/build/coverageinfo/mcdc.rs renamed to compiler/rustc_mir_build/src/builder/coverageinfo/mcdc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_middle::thir::LogicalOp;
99
use rustc_middle::ty::TyCtxt;
1010
use rustc_span::Span;
1111

12-
use crate::build::Builder;
12+
use crate::builder::Builder;
1313
use crate::errors::MCDCExceedsConditionLimit;
1414

1515
/// LLVM uses `i16` to represent condition id. Hence `i16::MAX` is the hard limit for number of

compiler/rustc_mir_build/src/build/custom/parse/instruction.rs renamed to compiler/rustc_mir_build/src/builder/custom/parse/instruction.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use rustc_span::Span;
99
use rustc_span::source_map::Spanned;
1010

1111
use super::{PResult, ParseCtxt, parse_by_kind};
12-
use crate::build::custom::ParseError;
13-
use crate::build::expr::as_constant::as_constant_inner;
12+
use crate::builder::custom::ParseError;
13+
use crate::builder::expr::as_constant::as_constant_inner;
1414

1515
impl<'a, 'tcx> ParseCtxt<'a, 'tcx> {
1616
pub(crate) fn parse_statement(&self, expr_id: ExprId) -> PResult<StatementKind<'tcx>> {

0 commit comments

Comments
 (0)