Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6484420
the emscripten OS no longer exists on non-wasm targets
RalfJung Nov 24, 2024
f3ad32b
Added a doc test for std::path::strip_prefix
CromFr Nov 24, 2024
d26e29f
Tweak parameter mismatch explanation to not say unknown
compiler-errors Nov 25, 2024
4301d02
Remove dead code stemming from the old effects desugaring (II)
fmease Nov 25, 2024
bf7d909
remove "onur-ozkan" from users_on_vacation
onur-ozkan Nov 25, 2024
402bdd1
Update test expectations to accept LLVM 'initializes' attribute
zmodem Nov 25, 2024
9f1cfec
use ReadCache for archive loading
mustartt Nov 25, 2024
8bc8adb
std::thread: avoid leading whitespace in some panic messages
RalfJung Nov 25, 2024
b77d8fa
tests: Add recursive associated type bound regression tests
Enselic Nov 25, 2024
f62753f
compiletest: remove `pretty-expanded` directive and infra
jieyouxu Nov 25, 2024
95ff642
tests: remove `//@ pretty-expanded` usages
jieyouxu Nov 25, 2024
259020c
tests: Add regression test for recursive enum with Cow and Clone
Enselic Nov 25, 2024
3a42fd2
tests: disable `avr-rjmp-offset` on Windows for now
jieyouxu Nov 25, 2024
7dae9ac
add test for alias-bound shadowing, rename folder
lcnr Nov 26, 2024
620cdfc
Rollup merge of #133411 - RalfJung:emscripten-is-on-wasm, r=workingju…
GuillaumeGomez Nov 26, 2024
ddb6904
Rollup merge of #133419 - CromFr:add-path-strip_prefix-test-example, …
GuillaumeGomez Nov 26, 2024
af6e2a5
Rollup merge of #133430 - compiler-errors:param-mismatch, r=WaffleLapkin
GuillaumeGomez Nov 26, 2024
03f56d3
Rollup merge of #133443 - fmease:rm-dead-eff-code-ii, r=compiler-errors
GuillaumeGomez Nov 26, 2024
85394cb
Rollup merge of #133450 - onur-ozkan:update-triagebot, r=onur-ozkan
GuillaumeGomez Nov 26, 2024
64c0eff
Rollup merge of #133454 - zmodem:initializes_fix, r=nikic
GuillaumeGomez Nov 26, 2024
7e3422f
Rollup merge of #133462 - mustartt:aix-improve-bootstrap-loading, r=j…
GuillaumeGomez Nov 26, 2024
a06532e
Rollup merge of #133464 - RalfJung:whitespace-panic, r=joboet
GuillaumeGomez Nov 26, 2024
c8c225f
Rollup merge of #133467 - Enselic:recurse-tests, r=lcnr
GuillaumeGomez Nov 26, 2024
0d9a57d
Rollup merge of #133470 - jieyouxu:ugly, r=compiler-errors
GuillaumeGomez Nov 26, 2024
52fcafe
Rollup merge of #133473 - Enselic:cow, r=nnethercote
GuillaumeGomez Nov 26, 2024
5518c62
Rollup merge of #133481 - jieyouxu:avr-jmp-linker, r=saethlin
GuillaumeGomez Nov 26, 2024
0dba983
Rollup merge of #133495 - lcnr:env-shadowing-tests, r=compiler-errors
GuillaumeGomez Nov 26, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove dead code stemming from the old effects desugaring (II)
  • Loading branch information
fmease committed Nov 25, 2024
commit 4301d0266d20d391e5b389e2b37bbe133e3f4e1c
18 changes: 3 additions & 15 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2117,11 +2117,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
hir::ConstArgKind::Anon(ct)
};

self.arena.alloc(hir::ConstArg {
hir_id: self.next_id(),
kind: ct_kind,
is_desugared_from_effects: false,
})
self.arena.alloc(hir::ConstArg { hir_id: self.next_id(), kind: ct_kind })
}

/// See [`hir::ConstArg`] for when to use this function vs
Expand Down Expand Up @@ -2163,19 +2159,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
None,
);

return ConstArg {
hir_id: self.next_id(),
kind: hir::ConstArgKind::Path(qpath),
is_desugared_from_effects: false,
};
return ConstArg { hir_id: self.next_id(), kind: hir::ConstArgKind::Path(qpath) };
}

let lowered_anon = self.lower_anon_const_to_anon_const(anon);
ConstArg {
hir_id: self.next_id(),
kind: hir::ConstArgKind::Anon(lowered_anon),
is_desugared_from_effects: false,
}
ConstArg { hir_id: self.next_id(), kind: hir::ConstArgKind::Anon(lowered_anon) }
}

/// See [`hir::ConstArg`] for when to use this function vs
Expand Down
11 changes: 1 addition & 10 deletions compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ pub struct ConstArg<'hir> {
#[stable_hasher(ignore)]
pub hir_id: HirId,
pub kind: ConstArgKind<'hir>,
/// Indicates whether this comes from a `~const` desugaring.
pub is_desugared_from_effects: bool,
}

impl<'hir> ConstArg<'hir> {
Expand Down Expand Up @@ -462,14 +460,7 @@ impl<'hir> GenericArgs<'hir> {
/// This function returns the number of type and const generic params.
/// It should only be used for diagnostics.
pub fn num_generic_params(&self) -> usize {
self.args
.iter()
.filter(|arg| match arg {
GenericArg::Lifetime(_)
| GenericArg::Const(ConstArg { is_desugared_from_effects: true, .. }) => false,
_ => true,
})
.count()
self.args.iter().filter(|arg| !matches!(arg, GenericArg::Lifetime(_))).count()
}

/// The span encompassing the arguments and constraints[^1] inside the surrounding brackets.
Expand Down
8 changes: 0 additions & 8 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2516,14 +2516,6 @@ fn clean_generic_args<'tcx>(
}
hir::GenericArg::Lifetime(_) => GenericArg::Lifetime(Lifetime::elided()),
hir::GenericArg::Type(ty) => GenericArg::Type(clean_ty(ty, cx)),
// Checking for `is_desugared_from_effects` on the `AnonConst` not only accounts for the case
// where the argument is `host` but for all possible cases (e.g., `true`, `false`).
hir::GenericArg::Const(hir::ConstArg {
is_desugared_from_effects: true,
..
}) => {
return None;
}
hir::GenericArg::Const(ct) => GenericArg::Const(Box::new(clean_const(ct, cx))),
hir::GenericArg::Infer(_inf) => GenericArg::Infer,
})
Expand Down
Loading