Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b5786dc
avoid some int2ptr casts in thread_local_key tests
RalfJung Aug 11, 2022
e182d12
Fix HIR pretty printing of let else
compiler-errors Aug 12, 2022
f94220f
Erase regions better in promote_candidate
compiler-errors Aug 12, 2022
43eda18
adapt test for msan message change
krasimirgg Aug 12, 2022
a65647a
remove Clean trait implementation for hir::PathSegment
GuillaumeGomez Aug 12, 2022
001cc12
remove Clean trait implementation for hir::BareFnTy
GuillaumeGomez Aug 12, 2022
dcead65
Make `[rust] use-lld=true` work on windows
khyperia Aug 12, 2022
2787eb0
Use different name for arity-2 `@has` and `@matches`
camelid Aug 10, 2022
01408fc
Rename `@{has,matches}-literal` to `...text`
camelid Aug 10, 2022
37eed1d
Update tests: arity-2 `@{has,matches}` -> `...text`
camelid Aug 10, 2022
13d5327
Rename `@hastext` to `@hasraw` (same for `matches`)
camelid Aug 10, 2022
9db6061
Fix line lengths
camelid Aug 11, 2022
52a1518
give a helpful diagnostic even when the next struct field has an attr…
chenyukang Aug 13, 2022
b34e240
Update `@!has` name in tests
camelid Aug 12, 2022
0d588e9
rustdoc: Fix incorrect usage of `@!has` and `@!matches`
camelid Aug 13, 2022
2dc9bf0
nicer Miri backtraces for from_exposed_addr
RalfJung Aug 13, 2022
40b1f61
move
BoxyUwU Aug 13, 2022
1ec2b9b
wf correctly shallow_resolve consts
lcnr Aug 13, 2022
4b51df3
Rollup merge of #100355 - camelid:has2-rename, r=GuillaumeGomez
compiler-errors Aug 13, 2022
ea42f3c
Rollup merge of #100407 - RalfJung:no-int2ptr, r=Mark-Simulacrum
compiler-errors Aug 13, 2022
2126cc6
Rollup merge of #100434 - compiler-errors:issue-100373, r=cjgillot
compiler-errors Aug 13, 2022
9ab54df
Rollup merge of #100438 - compiler-errors:issue-100360, r=lcnr
compiler-errors Aug 13, 2022
ef72484
Rollup merge of #100445 - krasimirgg:llvm-16-msan, r=tmiasko
compiler-errors Aug 13, 2022
b1d77dd
Rollup merge of #100447 - GuillaumeGomez:rm-clean-impl, r=Dylan-DPC
compiler-errors Aug 13, 2022
7a34d39
Rollup merge of #100464 - khyperia:lld-icf-on-windows, r=jyn514
compiler-errors Aug 13, 2022
29f905b
Rollup merge of #100475 - chenyukang:fix-100461, r=fee1-dead
compiler-errors Aug 13, 2022
aafaec3
Rollup merge of #100490 - lcnr:wf-consts, r=jackh726
compiler-errors Aug 13, 2022
f8bdd9c
Rollup merge of #100501 - RalfJung:miri-from-exposed-addr, r=Mark-Sim…
compiler-errors Aug 13, 2022
860e093
Rollup merge of #100509 - BoxyUwU:merge_hrtb_with_higher_rank_trait_b…
compiler-errors Aug 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions compiler/rustc_const_eval/src/transform/promote_consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,17 +839,12 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
let mut promoted_operand = |ty, span| {
promoted.span = span;
promoted.local_decls[RETURN_PLACE] = LocalDecl::new(ty, span);
let substs = tcx.erase_regions(InternalSubsts::identity_for_item(tcx, def.did));
let _const = tcx.mk_const(ty::ConstS {
ty,
kind: ty::ConstKind::Unevaluated(ty::Unevaluated {
def,
substs: InternalSubsts::for_item(tcx, def.did, |param, _| {
if let ty::GenericParamDefKind::Lifetime = param.kind {
tcx.lifetimes.re_erased.into()
} else {
tcx.mk_param_from_def(param)
}
}),
substs,
promoted: Some(promoted_id),
}),
});
Expand Down
13 changes: 13 additions & 0 deletions src/test/ui/const-generics/generic_const_exprs/issue-100360.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// check-pass
// (this requires debug assertions)

#![feature(adt_const_params)]
#![allow(incomplete_features)]

fn foo<const B: &'static bool>(arg: &'static bool) -> bool {
B == arg
}

fn main() {
foo::<{ &true }>(&false);
}
12 changes: 12 additions & 0 deletions src/test/ui/const-generics/generic_const_exprs/issue-89851.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// check-pass
// (this requires debug assertions)

#![feature(adt_const_params)]
#![allow(incomplete_features)]

pub const BAR: () = ice::<"">();
pub const fn ice<const N: &'static str>() {
&10;
}

fn main() {}